VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtStreamWriter Class Reference

Instances of DtStreamWriter encode values into a byte array. More...

+ Collaboration diagram for DtStreamWriter:

Public Member Functions

 DtStreamWriter (int length=0, unsigned char *buffer=0)
 constructor takes size of internal buffer to create. Care must be taken to allocate enough space.
virtual ~DtStreamWriter ()
 destructor
unsigned char * buffer ()
 get a copy of the internal buffer
int length ()
void writeBool (bool b)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeInt8 (char num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeUInt8 (unsigned char num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeInt16 (short num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeUInt16 (unsigned short num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeInt32 (int num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeUInt32 (unsigned int num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeInt64 (long long num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeUInt64 (unsigned long long num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeSingle (float num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeDouble (double num)
 value readers return a value and increment the current position in the byte stream based on the size value
void writeString (std::string &str)
 value readers return a value and increment the current position in the byte stream based on the size value

Protected Member Functions

void encodeStringSize (int size)
 encode the size of the string as a variable sized integer

Protected Attributes

unsigned char * myBuffer
unsigned char * myWriteHead
int myLength
bool myBufferAlloced

Detailed Description

Instances of DtStreamWriter encode values into a byte array.

Constructor & Destructor Documentation

DtStreamWriter::DtStreamWriter ( int  length = 0,
unsigned char *  buffer = 0 
)

constructor takes size of internal buffer to create. Care must be taken to allocate enough space.

virtual DtStreamWriter::~DtStreamWriter ( )
virtual

destructor

Member Function Documentation

unsigned char* DtStreamWriter::buffer ( )

get a copy of the internal buffer

void DtStreamWriter::encodeStringSize ( int  size)
protected

encode the size of the string as a variable sized integer

int DtStreamWriter::length ( )
void DtStreamWriter::writeBool ( bool  b)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EmitterStateMessage::Beam::serialize().

void DtStreamWriter::writeDouble ( double  num)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by TransmitterStateMessage::BeamAntennaPattern::serialize().

void DtStreamWriter::writeInt16 ( short  num)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EntityStateMessage::AttPart::serialize().

void DtStreamWriter::writeInt32 ( int  num)
void DtStreamWriter::writeInt64 ( long long  num)

value readers return a value and increment the current position in the byte stream based on the size value

void DtStreamWriter::writeInt8 ( char  num)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EntityStateMessage::AttPart::serialize().

void DtStreamWriter::writeSingle ( float  num)
void DtStreamWriter::writeString ( std::string &  str)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EmitterStateMessage::Beam::serialize().

void DtStreamWriter::writeUInt16 ( unsigned short  num)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EmitterStateMessage::Beam::serialize(), and TransmitterStateMessage::ModulationType::serialize().

void DtStreamWriter::writeUInt32 ( unsigned int  num)

value readers return a value and increment the current position in the byte stream based on the size value

Referenced by EmitterStateMessage::Beam::serialize().

void DtStreamWriter::writeUInt64 ( unsigned long long  num)

value readers return a value and increment the current position in the byte stream based on the size value

void DtStreamWriter::writeUInt8 ( unsigned char  num)

Member Data Documentation

unsigned char* DtStreamWriter::myBuffer
protected
bool DtStreamWriter::myBufferAlloced
protected
int DtStreamWriter::myLength
protected
unsigned char* DtStreamWriter::myWriteHead
protected

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

Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)