General purpose data buffer. More...
#include <databuffer.h>
Public Member Functions | |
virtual size_t | capacity () const =0 |
Returns the capacity of the data buffer object. More... | |
virtual std::shared_ptr< DataBuffer > | copy (size_t pos, size_t size)=0 |
Copy buffer to a new buffer. More... | |
virtual char * | data ()=0 |
Returns a pointer to the data. More... | |
virtual const char * | data () const =0 |
template<typename Type > | |
Type * | data () |
template<typename Type > | |
const Type * | data () const |
virtual void | set_capacity (size_t capacity)=0 |
Preallocate enough memory. More... | |
virtual void | set_size (size_t size)=0 |
Resize the buffer. More... | |
virtual size_t | size () const =0 |
Returns the size of the data. More... | |
Static Public Member Functions | |
static std::shared_ptr< DataBuffer > | create (size_t size) |
Constructs a data buffer. More... | |
static std::shared_ptr< DataBuffer > | create (const void *data, size_t size) |
General purpose data buffer.
|
pure virtual |
Returns the capacity of the data buffer object.
|
pure virtual |
Copy buffer to a new buffer.
|
static |
Constructs a data buffer.
|
static |
|
pure virtual |
Returns a pointer to the data.
|
pure virtual |
|
inline |
|
inline |
|
pure virtual |
Preallocate enough memory.
|
pure virtual |
Resize the buffer.
|
pure virtual |
Returns the size of the data.