Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

rel::TypeStream Class Reference

#include <TypeStream.h>

Inheritance diagram for rel::TypeStream:

Inheritance graph
Collaboration diagram for rel::TypeStream:

Collaboration graph
List of all members.

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)

Detailed Description

Reads / writes typed information rather then raw data. This stores information in the stream telling what types of values are in the stream.

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).

The documentation for this class was generated from the following files:
Generated at Sat Sep 22 02:20:02 2001 for librel by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001