ClanLib
2.3.7
|
General purpose data buffer. More...
#include <databuffer.h>
Public Member Functions | |
Construction | |
CL_DataBuffer () | |
Constructs a data buffer of 0 size. More... | |
CL_DataBuffer (int size) | |
CL_DataBuffer (const void *data, int size) | |
CL_DataBuffer (const CL_DataBuffer &data, int pos, int size=-1) | |
~CL_DataBuffer () | |
Attributes | |
char * | get_data () |
Returns a pointer to the data. More... | |
const char * | get_data () const |
int | get_size () const |
Returns the size of the data. More... | |
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 | |
CL_DataBuffer & | operator= (const CL_DataBuffer ©) |
void | set_size (int size) |
Resize the buffer. More... | |
void | set_capacity (int capacity) |
Preallocate enough memory. More... | |
General purpose data buffer.
CL_DataBuffer::CL_DataBuffer | ( | ) |
Constructs a data buffer of 0 size.
CL_DataBuffer::CL_DataBuffer | ( | int | size) |
CL_DataBuffer::CL_DataBuffer | ( | const void * | data, |
int | size | ||
) |
CL_DataBuffer::CL_DataBuffer | ( | const CL_DataBuffer & | data, |
int | pos, | ||
int | size = -1 |
||
) |
CL_DataBuffer::~CL_DataBuffer | ( | ) |
int CL_DataBuffer::get_capacity | ( | ) | const |
Returns the capacity of the data buffer object.
char* CL_DataBuffer::get_data | ( | ) |
Returns a pointer to the data.
const char* CL_DataBuffer::get_data | ( | ) | const |
int CL_DataBuffer::get_size | ( | ) | const |
Returns the size of the data.
bool CL_DataBuffer::is_null | ( | ) | const |
Returns true if the buffer is 0 in size.
CL_DataBuffer& CL_DataBuffer::operator= | ( | const CL_DataBuffer & | copy) |
char& CL_DataBuffer::operator[] | ( | int | i) |
Returns a char in the buffer.
const char& CL_DataBuffer::operator[] | ( | int | i) | const |
char& CL_DataBuffer::operator[] | ( | unsigned int | i) |
const char& CL_DataBuffer::operator[] | ( | unsigned int | i) | const |
void CL_DataBuffer::set_capacity | ( | int | capacity) |
Preallocate enough memory.
void CL_DataBuffer::set_size | ( | int | size) |
Resize the buffer.