19#include <vlpi/entityIdentifier.h>
20#include <vlpi/entityType.h>
21#include <vlpi/simulationAddress.h>
22#include <matrix/vlVector.h>
23#include <matrix/vlTaitBryan.h>
24#include <matrix/vlQuaternion.h>
unsigned char readUInt8()
Reads an unsigned 8-bit integer.
virtual ~DtStreamReader()
Virtual destructor.
short readInt16()
Reads a signed 16-bit integer.
DtQuaternion readQuaternion()
Reads a quaternion.
float readSingle()
Reads a 32-bit floating point value.
int readInt32()
Reads a signed 32-bit integer.
std::string readString()
Reads a string value.
Int64 readInt64()
Reads a signed 64-bit integer.
DtStreamReader(char *buffer, int length, bool makeCopy=false)
Constructor.
DtEntityType readEntityType()
Reads an entity type.
DtEntityIdentifier readEntityId()
Reads an entity identifier.
UInt64 readUInt64()
Reads an unsigned 64-bit integer.
char * myReadHead
Current position in the buffer.
Definition byteStream.h:147
int myLength
Total length of the buffer.
Definition byteStream.h:150
DtVector readVector()
Reads a 3D vector.
unsigned int readUInt32()
Reads an unsigned 32-bit integer.
unsigned short readUInt16()
Reads an unsigned 16-bit integer.
int decodeStringSize()
Determines the size of a string from a variable length encoded integer.
char * readBytes(int length)
Reads a byte array of specified length.
DtSimulationAddress readSimulationAddress()
Reads a simulation address.
double readDouble()
Reads a 64-bit floating point value.
bool myShouldDelete
Flag indicating if the buffer should be deleted on destruction.
Definition byteStream.h:153
char readInt8()
Reads a signed 8-bit integer.
bool readBool()
Reads a boolean value.
DtTaitBryan readTaitBryan()
Reads a Tait-Bryan angles representation.
char * myBuffer
Pointer to the buffer being read from.
Definition byteStream.h:144
char * myWriteHead
Current position in the buffer.
Definition byteStream.h:284
void writeInt16(short num)
Writes a signed 16-bit integer.
char * myBuffer
Pointer to the buffer being written to.
Definition byteStream.h:281
bool myShouldDelete
Flag indicating if the buffer should be deleted on destruction.
Definition byteStream.h:290
void writeUInt16(unsigned short num)
Writes an unsigned 16-bit integer.
void encodeStringSize(int size)
Encodes the size of a string as a variable length integer.
char * buffer()
Gets a pointer to the internal buffer.
void writeSingle(float num)
Writes a 32-bit floating point value.
void writeVector(const DtVector &vec)
Writes a 3D vector.
void writeUInt32(unsigned int num)
Writes an unsigned 32-bit integer.
int myLength
Total length of the buffer.
Definition byteStream.h:287
void writeEntityId(const DtEntityIdentifier &id)
Writes an entity identifier.
virtual ~DtStreamWriter()
Virtual destructor.
DtStreamWriter(int length=0)
Constructor that creates an internal buffer.
void writeBool(bool b)
Writes a boolean value.
void writeInt8(char num)
Writes a signed 8-bit integer.
void writeUInt64(UInt64 num)
Writes an unsigned 64-bit integer.
void writeDouble(double num)
Writes a 64-bit floating point value.
int length()
Gets the current length of data in the buffer.
void writeTaitBryan(const DtTaitBryan &tb)
Writes a Tait-Bryan angles representation.
void writeInt32(int num)
Writes a signed 32-bit integer.
void writeEntityType(const DtEntityType &type)
Writes an entity type.
void writeInt64(Int64 num)
Writes a signed 64-bit integer.
void writeBytes(char *bytes, int length)
Writes a byte array.
void writeString(const std::string &str)
Writes a string value.
DtStreamWriter(char *buffer, int length)
Constructor that uses an existing buffer.
void writeUInt8(unsigned char num)
Writes an unsigned 8-bit integer.
void writeSimulationAddress(const DtSimulationAddress &addr)
Writes a simulation address.
void writeQuaternion(const DtQuaternion &q)
Writes a quaternion.
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
unsigned long long UInt64
Unsigned 64-bit integer type.
Definition utilFunctions.h:42
int UTIL_DLL DtEncodedStringSize(const std::string &str)
Calculates the size of a string when encoded in the byte stream format.
long long Int64
Signed 64-bit integer type.
Definition utilFunctions.h:44
Provides common utility functions for the VREngage system.