VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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...

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

Constructor & Destructor Documentation

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

Create a stream with an initial reserve.

makVrv::DtMessageStream::~DtMessageStream ( )

DTOR.

Member Function Documentation

void makVrv::DtMessageStream::clearStream ( )

Clears all the data in the stream.

void makVrv::DtMessageStream::writeMessageToStream ( DtMessage message)

Methods used to encode messages onto a stream.

Add a message to the stream.

void makVrv::DtMessageStream::writeMessagesToStream ( MessageList messages)

Add messages to stream.

Byte* makVrv::DtMessageStream::streamData ( ) const

Methods for getting the binary data.

Get a pointer to the stream data (binary).

size_t makVrv::DtMessageStream::streamDataSize ( ) const

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.

Byte* makVrv::DtMessageStream::addSpaceToStream ( size_t  size)

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

void makVrv::DtMessageStream::trimEnd ( size_t  n)

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

int makVrv::DtMessageStream::readMessagesFromStream ( MessageList messages)

Read messages from a stream.

The stream data will shrink after each call. Returns the number of messages read. If a corrupted message is detected, this will return -1.

Member Data Documentation

const size_t makVrv::DtMessageStream::theMaxPersistentStreamSize = 0x500000
static
ByteBuffer makVrv::DtMessageStream::myMessageBuffer
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)