RadarFX API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makRadarFx::DtStreamWriter Class Reference

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

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

Public Member Functions

 DtStreamWriter (int length)
 constructor takes size of internal buffer to create. Care must be taken to allocate enough space.
 DtStreamWriter (unsigned char *buffer, int length)
 constructor a given buffer and it's size. Care must be taken to allocate enough space.
virtual ~DtStreamWriter ()
 destructor
virtual unsigned char * buffer ()
 get a copy of the internal buffer
virtual int length ()
virtual void writeBool (bool b)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeInt8 (char num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeUInt8 (unsigned char num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeInt16 (short num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeUInt16 (unsigned short num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeInt32 (int num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeUInt32 (unsigned int num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeInt64 (long long num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual 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
virtual void writeSingle (float num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeDouble (double num)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeString (std::string &str)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeVector (DtVector &vec)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeTaitBryan (DtTaitBryan &tb)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeQuaternion (const DtQuaternion &q)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeEntityId (const DtEntityIdentifier &id)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeEntityType (const DtEntityType &type)
 value readers return a value and increment the current position in the byte stream based on the size value
virtual void writeBytes (unsigned char *buffer, int length)
 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 myShouldDelete

Detailed Description

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

Constructor & Destructor Documentation

makRadarFx::DtStreamWriter::DtStreamWriter ( int  length)

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

makRadarFx::DtStreamWriter::DtStreamWriter ( unsigned char *  buffer,
int  length 
)

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

virtual makRadarFx::DtStreamWriter::~DtStreamWriter ( )
virtual

destructor

Member Function Documentation

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

get a copy of the internal buffer

virtual int makRadarFx::DtStreamWriter::length ( )
virtual
virtual void makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::DtBigEndianStreamWriter.

virtual void makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::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 makRadarFx::DtStreamWriter::encodeStringSize ( int  size)
protected

encode the size of the string as a variable sized integer

Member Data Documentation

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

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


Copyright © 2024 MAK Technologies, Inc. All Rights Reserved (www.mak.com)