Instances of DtStreamWriter encode values into a byte array.
More...
Public Member Functions |
| | DtStreamWriter (int length=0) |
| | constructor takes size of internal buffer to create. Care must be taken to allocate enough space.
|
| virtual | ~DtStreamWriter () |
| | destructor
|
| unsigned char * | buffer () |
| | get a copy of the internal buffer
|
| 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
|
| void | writeInt8 (char num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeUInt8 (unsigned char num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeInt16 (short num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeUInt16 (unsigned short num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeInt32 (int num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeUInt32 (unsigned int num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeInt64 (long long num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| 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
|
| void | writeSingle (float num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeDouble (double num) |
| | value readers return a value and increment the current position in the byte stream based on the size value
|
| void | writeString (std::string &str) |
| | 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
|
Detailed Description
Instances of DtStreamWriter encode values into a byte array.
Constructor & Destructor Documentation
| DtStreamWriter::DtStreamWriter |
( |
int |
length = 0 | ) |
|
constructor takes size of internal buffer to create. Care must be taken to allocate enough space.
| virtual DtStreamWriter::~DtStreamWriter |
( |
| ) |
|
|
virtual |
Member Function Documentation
| unsigned char* DtStreamWriter::buffer |
( |
| ) |
|
get a copy of the internal buffer
| void DtStreamWriter::encodeStringSize |
( |
int |
size | ) |
|
|
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::writeDouble |
( |
double |
num | ) |
|
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
| void DtStreamWriter::writeInt32 |
( |
int |
num | ) |
|
value readers return a value and increment the current position in the byte stream based on the size value
| 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
| void DtStreamWriter::writeSingle |
( |
float |
num | ) |
|
value readers return a value and increment the current position in the byte stream based on the size value
| void DtStreamWriter::writeString |
( |
std::string & |
str | ) |
|
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
| 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
Member Data Documentation
| unsigned char* DtStreamWriter::myBuffer |
|
protected |
| int DtStreamWriter::myLength |
|
protected |
| unsigned char* DtStreamWriter::myWriteHead |
|
protected |
The documentation for this class was generated from the following file: