This is an implementation of iDataBuffer interface.
More...
#include <csutil/databuf.h>
List of all members.
Public Member Functions |
| DataBuffer (size_t iSize) |
| Construct an preallocated data buffer (filled with garbage initially)
|
| DataBuffer (size_t iSize, const Allocator &alloc) |
| Construct an preallocated data buffer (filled with garbage initially)
|
| DataBuffer (char *iData, size_t iSize, bool should_delete=true) |
| Construct an data buffer object given a existing pointer.
|
| DataBuffer (char *iData, size_t iSize, bool should_delete, const Allocator &alloc) |
| Construct an data buffer object given a existing pointer.
|
| DataBuffer (iDataBuffer *source, bool appendNull=true) |
| Duplicate an existing data buffer. Also appends a 0 char.
|
virtual char * | GetData () const |
| Get the buffer as an abstract pointer.
|
bool | GetDeleteOnDestruct () const |
| Return true if this databuffer will destroy its memory on destruction.
|
virtual size_t | GetSize () const |
| Query the buffer size.
|
virtual | ~DataBuffer () |
| Destroy (free) the buffer.
|
Detailed Description
template<class Allocator = Memory::AllocatorMalloc>
class CS::DataBuffer< Allocator >
This is an implementation of iDataBuffer interface.
The object is extremely lightweight and is recommended for use in plugins as a mean to transparently exchange abstract data between plugins.
Definition at line 41 of file databuf.h.
Constructor & Destructor Documentation
template<class Allocator = Memory::AllocatorMalloc>
Construct an preallocated data buffer (filled with garbage initially)
Definition at line 53 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
Construct an preallocated data buffer (filled with garbage initially)
Definition at line 60 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
Construct an data buffer object given a existing pointer.
The pointer must be allocated by an allocator compatible to the given.
Definition at line 72 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
CS::DataBuffer< Allocator >::DataBuffer |
( |
char * |
iData, |
|
|
size_t |
iSize, |
|
|
bool |
should_delete, |
|
|
const Allocator & |
alloc |
|
) |
| [inline] |
Construct an data buffer object given a existing pointer.
The pointer must be allocated by an allocator compatible to the given.
Definition at line 83 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
Duplicate an existing data buffer. Also appends a 0 char.
Definition at line 92 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
Destroy (free) the buffer.
Definition at line 110 of file databuf.h.
Member Function Documentation
template<class Allocator = Memory::AllocatorMalloc>
template<class Allocator = Memory::AllocatorMalloc>
Return true if this databuffer will destroy its memory on destruction.
Definition at line 128 of file databuf.h.
template<class Allocator = Memory::AllocatorMalloc>
The documentation for this class was generated from the following file: