![]() |
VR-Link API Documentation for HLA 4
|
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. More... | |
| DtStreamWriter (unsigned char *buffer, int length) | |
| constructor works on a given buffer and it's size. More... | |
| virtual | ~DtStreamWriter () |
| destructor More... | |
| unsigned char * | buffer () |
| get a copy of the buffer being written to More... | |
| 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 More... | |
| void | writeInt8 (char num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeUInt8 (unsigned char num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeInt16 (short num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeUInt16 (unsigned short num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeInt32 (int num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeUInt32 (unsigned int num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeInt64 (long long num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| 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 More... | |
| void | writeSingle (float num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeDouble (double num) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeString (const std::string &str) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeVector (const DtVector &vec) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeTaitBryan (const DtTaitBryan &tb) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeQuaternion (const DtQuaternion &q) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeEntityId (const DtEntityIdentifier &id) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeEntityType (const DtEntityType &type) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
| void | writeBytes (unsigned char *bytes, int length) |
| value readers return a value and increment the current position in the byte stream based on the size value More... | |
Protected Member Functions | |
| void | encodeStringSize (int size) |
| encode the size of the string as a variable sized integer More... | |
Protected Attributes | |
| unsigned char * | myBuffer |
| unsigned char * | myWriteHead |
| int | myLength |
| bool | myBufferAlloced |
Instances of DtStreamWriter encode values into a byte array.
| DtStreamWriter::DtStreamWriter | ( | int | length = 0 | ) |
constructor takes size of internal buffer to create. Care must be taken to allocate enough space.
| DtStreamWriter::DtStreamWriter | ( | unsigned char * | buffer, |
| int | length | ||
| ) |
constructor works on a given buffer and it's size.
Optionally creates a buffer if the input buffer is null
|
virtual |
destructor
| unsigned char* DtStreamWriter::buffer | ( | ) |
get a copy of the buffer being written to
|
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::writeBytes | ( | unsigned char * | bytes, |
| int | length | ||
| ) |
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
Referenced by TransmitterStateMessage::BeamAntennaPattern::serialize().
| void DtStreamWriter::writeEntityId | ( | const DtEntityIdentifier & | id | ) |
value readers return a value and increment the current position in the byte stream based on the size value
| void DtStreamWriter::writeEntityType | ( | const DtEntityType & | type | ) |
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
Referenced by EntityStateMessage::AttPart::serialize().
| void DtStreamWriter::writeInt32 | ( | int | num | ) |
value readers return a value and increment the current position in the byte stream based on the size value
Referenced by ActionRequestMessage::VariableData::serialize(), DataMessage::VariableData::serialize(), SetDataMessage::VariableData::serialize(), AttributeChangeRequestMessage::AttributePair::serialize(), DetonateMessage::Parameter::serialize(), ActionResponseMessage::VariableData::serialize(), EventReportMessage::VariableData::serialize(), EntityStateMessage::Parameter::serialize(), TransmitterStateMessage::SphericalAntennaPattern::serialize(), DetonateMessage::ArtPart::serialize(), SetDataMessage::FixedData::serialize(), ActionRequestMessage::FixedData::serialize(), DataMessage::FixedData::serialize(), ActionResponseMessage::FixedData::serialize(), EventReportMessage::FixedData::serialize(), EntityStateMessage::ArtPart::serialize(), TransmitterStateMessage::ModulationType::serialize(), EntityStateMessage::AttPart::serialize(), and TransmitterStateMessage::BeamAntennaPattern::serialize().
| 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
Referenced by EntityStateMessage::AttPart::serialize().
| void DtStreamWriter::writeQuaternion | ( | const DtQuaternion & | q | ) |
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
Referenced by DetonateMessage::Parameter::serialize(), EntityStateMessage::Parameter::serialize(), TransmitterStateMessage::SphericalAntennaPattern::serialize(), TransmitterStateMessage::BeamAntennaPattern::serialize(), EntityStateMessage::PStruct::serialize(), and EntityStateMessage::VNStruct::serialize().
| void DtStreamWriter::writeString | ( | const std::string & | str | ) |
value readers return a value and increment the current position in the byte stream based on the size value
Referenced by AttributeChangeRequestMessage::AttributePair::serialize().
| void DtStreamWriter::writeTaitBryan | ( | const DtTaitBryan & | tb | ) |
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
Referenced by IffStateMessage::SimulationAddress::serialize(), and TransmitterStateMessage::ModulationType::serialize().
| 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
Referenced by ActionRequestMessage::VariableData::serialize(), DataMessage::VariableData::serialize(), SetDataMessage::VariableData::serialize(), EventReportMessage::VariableData::serialize(), ActionResponseMessage::VariableData::serialize(), AttributeChangeRequestMessage::AttributePair::serialize(), and TransmitterStateMessage::SphericalAntennaPattern::serialize().
| void DtStreamWriter::writeVector | ( | const DtVector & | vec | ) |
value readers return a value and increment the current position in the byte stream based on the size value
|
protected |
|
protected |
|
protected |
|
protected |