General purpose data buffer. More...
#include <databuffer.h>
Public Member Functions | |
Construction | |
DataBuffer () | |
Constructs a data buffer of 0 size. More... | |
DataBuffer (unsigned int size) | |
DataBuffer (const void *data, unsigned int size) | |
DataBuffer (const DataBuffer &data, unsigned int pos, unsigned int size) | |
~DataBuffer () | |
Attributes | |
char * | get_data () |
Returns a pointer to the data. More... | |
const char * | get_data () const |
template<typename Type > | |
Type * | get_data () |
template<typename Type > | |
const Type * | get_data () const |
unsigned int | get_size () const |
Returns the size of the data. More... | |
unsigned int | get_capacity () const |
Returns the capacity of the data buffer object. More... | |
char & | operator[] (int i) |
Returns a char in the buffer. More... | |
const char & | operator[] (int i) const |
char & | operator[] (unsigned int i) |
const char & | operator[] (unsigned int i) const |
bool | is_null () const |
Returns true if the buffer is 0 in size. More... | |
Operations | |
DataBuffer & | operator= (const DataBuffer ©) |
void | set_size (unsigned int size) |
Resize the buffer. More... | |
void | set_capacity (unsigned int capacity) |
Preallocate enough memory. More... | |
General purpose data buffer.