|
VR-Engage
2.2
|
This class extends DtStreamWriter to write and encode data into a byte array in big endian format. It overrides the methods that need byte swapping to convert from the system's native format to big endian.
#include <byteStream.h>
Public Member Functions | |
| DtBigEndianStreamWriter (int length) | |
| DtBigEndianStreamWriter (unsigned char *buffer, int length) | |
| virtual | ~DtBigEndianStreamWriter () |
Big Endian Value Writing Methods | |
Each method writes a value in big endian format and advances the write position | |
| void | writeInt16 (short num) |
| void | writeUInt16 (unsigned short num) |
| void | writeInt32 (int num) |
| void | writeUInt32 (unsigned int num) |
| void | writeInt64 (long long num) |
| void | writeUInt64 (unsigned long long num) |
| void | writeSingle (float num) |
| void | writeDouble (double num) |
Public Member Functions inherited from makRadarFx::DtStreamWriter | |
| DtStreamWriter (int length) | |
| DtStreamWriter (unsigned char *buffer, int length) | |
| virtual | ~DtStreamWriter () |
| virtual unsigned char * | buffer () |
| virtual int | length () |
| virtual void | writeBool (bool b) |
| virtual void | writeInt8 (char num) |
| virtual void | writeUInt8 (unsigned char 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) |
Additional Inherited Members | |
| void | encodeStringSize (int size) |
| unsigned char * | myBuffer |
| unsigned char * | myWriteHead |
| int | myLength |
| bool | myShouldDelete |
| makRadarFx::DtBigEndianStreamWriter::DtBigEndianStreamWriter | ( | int | length | ) |
Constructor that creates an internal buffer.
| length | Size of the internal buffer to create |
Creates a new big endian stream writer with an internal buffer of the specified size. Care must be taken to allocate enough space for all the intended writes.
References makRadarFx::DtStreamWriter::length().
| makRadarFx::DtBigEndianStreamWriter::DtBigEndianStreamWriter | ( | unsigned char * | buffer, |
| int | length ) |
Constructor that uses an existing buffer.
| buffer | Pointer to the buffer to write to |
| length | Size of the buffer in bytes |
Creates a new big endian stream writer using the provided buffer. Care must be taken to ensure the buffer has enough space for all writes.
References makRadarFx::DtStreamWriter::buffer(), and makRadarFx::DtStreamWriter::length().
|
virtual |
Virtual destructor.
|
virtual |
Writes a 16-bit signed integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 16-bit unsigned integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 32-bit signed integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 32-bit unsigned integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 64-bit signed integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 64-bit unsigned integer in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 32-bit floating point value in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.
|
virtual |
Writes a 64-bit floating point value in big endian format.
| num | Value to write |
Reimplemented from makRadarFx::DtStreamWriter.