#include <TypeStream.h>
Inheritance diagram for rel::TypeStream:
Public Types | |
typedef StreamCoder::size_type | size_type |
typedef bool(* | CodingWriteFunction )(TypeStream &, const OpaqueValue &) |
Public Methods | |
TypeStream (const SmartPtr< StreamCoder > &streamCoder) | |
virtual | ~TypeStream () |
bool | atEnd () const |
void | flush () |
int | getReadDescriptor () const |
bool | isDirectAccess () const |
size_type | at () const |
void | at (size_type offset) |
bool | read (uint8_t &) const |
bool | read (int32_t &) const |
bool | read (int64_t &) const |
bool | read (double &) const |
bool | read (std::string &) const |
bool | read (OpaqueValue &) const |
bool | write (const uint8_t &) |
bool | write (const int32_t &) |
bool | write (const int64_t &) |
bool | write (const double &) |
bool | write (const std::string &) |
bool | write (const char *bytes, size_type length) |
bool | write (const OpaqueValue &) |
bool | writeBeginKey () |
bool | writeEndKey () |
bool | readBeginKey () const |
bool | readEndKey () const |
bool | writeNull () |
bool | readNull () const |
bool | append (const TypeStream &src) |
SmartPtr< char *> | print () |
Static Public Methods | |
void | addEncoder (CodingWriteFunction func, const char *typeName) |
In order to be able to write typed information, it needs to know what type of data is being written. Methods are provided for basic types, as well as a way of extending the operation to include arbitrary data types (which must be broken down into a collection of simple types or raw data).