VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtStreamWriter Class Reference

Instances of DtStreamWriter encode values into a byte array this writes the data to the stream in little endian format.

Inheritance diagram for makVrf::DtStreamWriter:
Inheritance graph
[legend]

Public Member Functions

 DtStreamWriter (int length)
 
 DtStreamWriter (unsigned char *buffer, int length)
 
virtual ~DtStreamWriter ()
 
virtual unsigned charbuffer ()
 
virtual int length ()
 
virtual void writeBool (bool b)
 
virtual void writeInt8 (char num)
 
virtual void writeUInt8 (unsigned char num)
 
virtual void writeInt16 (short num)
 
virtual void writeUInt16 (unsigned short num)
 
virtual void writeInt32 (int num)
 
virtual void writeUInt32 (unsigned int num)
 
virtual void writeInt64 (long long num)
 
virtual void writeUInt64 (unsigned long long num)
 
virtual void writeSingle (float num)
 
virtual void writeDouble (double num)
 
virtual void writeString (std::string &str)
 
virtual void writeVector (DtVector &vec)
 
virtual void writeTaitBryan (DtTaitBryan &tb)
 
virtual void writeQuaternion (const DtQuaternion &q)
 
virtual void writeEntityId (const DtEntityIdentifier &id)
 
virtual void writeEntityType (const DtEntityType &type)
 
virtual void writeBytes (unsigned char *buffer, int length)
 

Protected Member Functions

void encodeStringSize (int size)
 

Protected Attributes

unsigned charmyBuffer
 
unsigned charmyWriteHead
 
int myLength
 
bool myShouldDelete
 

Constructor & Destructor Documentation

makVrf::DtStreamWriter::DtStreamWriter ( int  length)

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

makVrf::DtStreamWriter::DtStreamWriter ( unsigned char buffer,
int  length 
)

constructor a given buffer and it's size. Care must be taken to allocate enough space.

virtual makVrf::DtStreamWriter::~DtStreamWriter ( )
virtual

destructor

Member Function Documentation

virtual unsigned char* makVrf::DtStreamWriter::buffer ( )
virtual

get a copy of the internal buffer

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

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

virtual void makVrf::DtStreamWriter::writeInt8 ( char  num)
virtual

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

virtual void makVrf::DtStreamWriter::writeUInt8 ( unsigned char  num)
virtual

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

virtual void makVrf::DtStreamWriter::writeInt16 ( short  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeUInt16 ( unsigned short  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeInt32 ( int  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeUInt32 ( unsigned int  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeInt64 ( long long  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeUInt64 ( unsigned long long  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeSingle ( float  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeDouble ( double  num)
virtual

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

Reimplemented in makVrf::DtBigEndianStreamWriter.

virtual void makVrf::DtStreamWriter::writeString ( std::string &  str)
virtual

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

virtual void makVrf::DtStreamWriter::writeVector ( DtVector &  vec)
virtual

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

virtual void makVrf::DtStreamWriter::writeTaitBryan ( DtTaitBryan &  tb)
virtual

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

virtual void makVrf::DtStreamWriter::writeQuaternion ( const DtQuaternion &  q)
virtual

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

virtual void makVrf::DtStreamWriter::writeEntityId ( const DtEntityIdentifier &  id)
virtual

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

virtual void makVrf::DtStreamWriter::writeEntityType ( const DtEntityType &  type)
virtual

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

virtual void makVrf::DtStreamWriter::writeBytes ( unsigned char buffer,
int  length 
)
virtual

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

void makVrf::DtStreamWriter::encodeStringSize ( int  size)
protected

encode the size of the string as a variable sized integer

Member Data Documentation

unsigned char* makVrf::DtStreamWriter::myBuffer
protected
unsigned char* makVrf::DtStreamWriter::myWriteHead
protected
int makVrf::DtStreamWriter::myLength
protected
bool makVrf::DtStreamWriter::myShouldDelete
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)