uicore::DataBuffer Class Referenceabstract

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< DataBuffercopy (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< DataBuffercreate (size_t size)
 Constructs a data buffer. More...
 
static std::shared_ptr< DataBuffercreate (const void *data, size_t size)
 

Detailed Description

General purpose data buffer.

Member Function Documentation

virtual size_t uicore::DataBuffer::capacity ( ) const
pure virtual

Returns the capacity of the data buffer object.

virtual std::shared_ptr<DataBuffer> uicore::DataBuffer::copy ( size_t  pos,
size_t  size 
)
pure virtual

Copy buffer to a new buffer.

static std::shared_ptr<DataBuffer> uicore::DataBuffer::create ( size_t  size)
static

Constructs a data buffer.

static std::shared_ptr<DataBuffer> uicore::DataBuffer::create ( const void *  data,
size_t  size 
)
static
virtual char* uicore::DataBuffer::data ( )
pure virtual

Returns a pointer to the data.

virtual const char* uicore::DataBuffer::data ( ) const
pure virtual
template<typename Type >
Type* uicore::DataBuffer::data ( )
inline

References data().

Referenced by data().

template<typename Type >
const Type* uicore::DataBuffer::data ( ) const
inline

References data().

Referenced by data().

virtual void uicore::DataBuffer::set_capacity ( size_t  capacity)
pure virtual

Preallocate enough memory.

virtual void uicore::DataBuffer::set_size ( size_t  size)
pure virtual

Resize the buffer.

virtual size_t uicore::DataBuffer::size ( ) const
pure virtual

Returns the size of the data.


The documentation for this class was generated from the following file: