The VgBinaryBuffer class is used to manipulate binary data. More...
Public Member Functions | |
VgBinaryBuffer () | |
Constructor. | |
VgBinaryBuffer (char *pData, UInt pLength, bool pVgBinaryBufferDoesDelete=true) | |
Constructor. | |
virtual | ~VgBinaryBuffer () |
Destructor. | |
virtual UInt | getLength () const |
Retrieves the buffer length. | |
virtual const char * | getData () const |
Retrieves the buffer's data (const version). | |
Protected Attributes | |
Private * | mPrivate |
Private data for this buffer. | |
Friends | |
class | VgObjectBridge |
The VgBinaryBuffer class is used to manipulate binary data.
A VgBinaryBuffer inherits from VgReferenced, so if it's correctly used (see documentation of VgRefPtr) it will be automatically deleted when it's no longer referenced (except if pVgBinaryBufferDoesDelete is false at its creation, as should be the case for static buffers).
VgEngine::VgBinaryBuffer::VgBinaryBuffer | ( | ) |
Constructor.
VgEngine::VgBinaryBuffer::VgBinaryBuffer | ( | char * | pData, |
UInt | pLength, | ||
bool | pVgBinaryBufferDoesDelete = true |
||
) |
Constructor.
pData | The buffer (must be allocated using new [] because it will be deleted using delete [], except if pData is a static data, in this case be careful to use the pVgBinaryBufferDoesDelete flag). |
pLength | The buffer length in bytes. |
pVgBinaryBufferDoesDelete | This flag indicates whether the buffer will delete the data when it's no longer used (default is true). |
virtual VgEngine::VgBinaryBuffer::~VgBinaryBuffer | ( | ) | [virtual] |
Destructor.
virtual const char* VgEngine::VgBinaryBuffer::getData | ( | ) | const [virtual] |
Retrieves the buffer's data (const version).
virtual UInt VgEngine::VgBinaryBuffer::getLength | ( | ) | const [virtual] |
Retrieves the buffer length.
friend class VgObjectBridge [friend] |
Private* VgEngine::VgBinaryBuffer::mPrivate [protected] |
Private data for this buffer.