open-dis-cpp
|
a class to support managing a network buffer. More...
#include <DataStream.h>
Public Member Functions | |
DataStream (Endian stream) | |
Setup the internal buffer's Endian type. More... | |
DataStream (const char *buffer, size_t length, Endian stream) | |
Setup the internal buffer. More... | |
const char & | operator[] (unsigned int offset) const |
a method for reading the stored buffer data. More... | |
void | SetStream (const char *buffer, size_t length, Endian order) |
take ownership of the data buffer. | |
DataStream & | operator<< (bool c) |
DataStream & | operator<< (char c) |
DataStream & | operator<< (unsigned char c) |
DataStream & | operator<< (float c) |
DataStream & | operator<< (double c) |
DataStream & | operator<< (int c) |
DataStream & | operator<< (unsigned int c) |
DataStream & | operator<< (long long c) |
DataStream & | operator<< (unsigned long long c) |
DataStream & | operator<< (unsigned short c) |
DataStream & | operator<< (short c) |
DataStream & | operator>> (bool &c) |
DataStream & | operator>> (char &c) |
DataStream & | operator>> (unsigned char &c) |
DataStream & | operator>> (float &c) |
DataStream & | operator>> (double &c) |
DataStream & | operator>> (int &c) |
DataStream & | operator>> (unsigned int &c) |
DataStream & | operator>> (long long &c) |
DataStream & | operator>> (unsigned long long &c) |
DataStream & | operator>> (unsigned short &c) |
DataStream & | operator>> (short &c) |
Endian | GetStreamEndian () const |
Endian | GetMachineEndian () const |
size_t | GetWritePos () const |
size_t | GetReadPos () const |
size_t | size () const |
void | clear () |
bool | empty () const |
DataStream (Endian stream) | |
Setup the internal buffer's Endian type. More... | |
DataStream (const char *buffer, size_t length, Endian stream) | |
Setup the internal buffer. More... | |
const char & | operator[] (unsigned int offset) const |
a method for reading the stored buffer data. More... | |
void | SetStream (const char *buffer, size_t length, Endian order) |
take ownership of the data buffer. | |
DataStream & | operator<< (bool c) |
DataStream & | operator<< (char c) |
DataStream & | operator<< (unsigned char c) |
DataStream & | operator<< (float c) |
DataStream & | operator<< (double c) |
DataStream & | operator<< (int c) |
DataStream & | operator<< (unsigned int c) |
DataStream & | operator<< (long long c) |
DataStream & | operator<< (unsigned long long c) |
DataStream & | operator<< (unsigned short c) |
DataStream & | operator<< (short c) |
DataStream & | operator>> (bool &c) |
DataStream & | operator>> (char &c) |
DataStream & | operator>> (unsigned char &c) |
DataStream & | operator>> (float &c) |
DataStream & | operator>> (double &c) |
DataStream & | operator>> (int &c) |
DataStream & | operator>> (unsigned int &c) |
DataStream & | operator>> (long long &c) |
DataStream & | operator>> (unsigned long long &c) |
DataStream & | operator>> (unsigned short &c) |
DataStream & | operator>> (short &c) |
Endian | GetStreamEndian () const |
Endian | GetMachineEndian () const |
size_t | GetWritePos () const |
size_t | GetReadPos () const |
size_t | size () const |
void | clear () |
bool | empty () const |
a class to support managing a network buffer.
the clients are responsible for managing the char buffer memory. this class explicitly defines operators for expected types.
DataStream::DataStream | ( | Endian | stream | ) |
Setup the internal buffer's Endian type.
stream | the Endian type to use for the internal buffer, which will be used for network socket writes. |
DataStream::DataStream | ( | const char * | buffer, |
size_t | length, | ||
Endian | stream | ||
) |
Setup the internal buffer.
buffer | the data to copy and manage. |
length | the number of bytes in the buffer. |
stream | the Endian type to use for the internal buffer, |
DIS::DataStream::DataStream | ( | Endian | stream | ) |
Setup the internal buffer's Endian type.
stream | the Endian type to use for the internal buffer, which will be used for network socket writes. |
DIS::DataStream::DataStream | ( | const char * | buffer, |
size_t | length, | ||
Endian | stream | ||
) |
Setup the internal buffer.
buffer | the data to copy and manage. |
length | the number of bytes in the buffer. |
stream | the Endian type to use for the internal buffer, |
const char& DIS::DataStream::operator[] | ( | unsigned int | offset | ) | const |
a method for reading the stored buffer data.
offset | the index distance with respect to the current read point. |
const char & DataStream::operator[] | ( | unsigned int | offset | ) | const |
a method for reading the stored buffer data.
offset | the index distance with respect to the current read point. |