VR-Link API Documentation for HLA 1.3
 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)
 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

Detailed Description

Instances of DtStreamWriter encode values into a byte array.

Constructor & Destructor Documentation

DtStreamWriter::DtStreamWriter ( int  length = 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

void DtStreamWriter::writeDouble ( double  num)

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

void DtStreamWriter::writeInt16 ( short  num)

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

void DtStreamWriter::writeInt32 ( int  num)

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

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

void DtStreamWriter::writeSingle ( float  num)

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

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

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

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

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)

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

Member Data Documentation

unsigned char* DtStreamWriter::myBuffer
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 Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)