VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
makVrv::DtMessageStream Class Reference

Class for serializing objects as a byte stream for transmitting to othe rdisplay engines. More...

List of all members.

Public Types

typedef std::vector< DtMessage * > MessageList
typedef unsigned char Byte
typedef std::vector< ByteByteBuffer

Public Member Functions

 DtMessageStream (size_t initialReserve=0xFFF)
 Create a stream with an initial reserve.
 ~DtMessageStream ()
 DTOR.
void clearStream ()
 Clears all the data in the stream.
void writeMessageToStream (DtMessage *message)
 Methods used to encode messages onto a stream.
void writeMessagesToStream (MessageList &messages)
 Add messages to stream.
BytestreamData () const
 Methods for getting the binary data.
size_t streamDataSize () const
 Get the size of the stream data (binary).
void addDataToStream (char *data, size_t size)
 Methods for added raw data to a stream.
ByteaddSpaceToStream (size_t size)
 Add Empty space to stream and return pointer to data (for writing directly into.
void trimEnd (size_t n)
 Removes the last 'n' bytes from the end of the stream.
int readMessagesFromStream (MessageList &messages)
 Read messages from a stream.

Static Public Attributes

static const size_t theMaxPersistentStreamSize = 0x500000

Protected Attributes

ByteBuffer myMessageBuffer

Detailed Description

Class for serializing objects as a byte stream for transmitting to othe rdisplay engines.


Member Typedef Documentation

typedef unsigned char makVrv::DtMessageStream::Byte

Constructor & Destructor Documentation

makVrv::DtMessageStream::DtMessageStream ( size_t  initialReserve = 0xFFF)

Create a stream with an initial reserve.

DTOR.


Member Function Documentation

Clears all the data in the stream.

Methods used to encode messages onto a stream.

Add a message to the stream.

Add messages to stream.

Methods for getting the binary data.

Get a pointer to the stream data (binary).

Get the size of the stream data (binary).

void makVrv::DtMessageStream::addDataToStream ( char *  data,
size_t  size 
)

Methods for added raw data to a stream.

Add Raw data.

Add Empty space to stream and return pointer to data (for writing directly into.

Removes the last 'n' bytes from the end of the stream.

Read messages from a stream.

The stream data will shrink after each call. Returns the number of messages read.


Member Data Documentation

const size_t makVrv::DtMessageStream::theMaxPersistentStreamSize = 0x500000 [static]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)