ClanLib  2.3.7
List of all members
CL_DataBuffer Class Reference

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_DataBufferoperator= (const CL_DataBuffer &copy)
 
void set_size (int size)
 Resize the buffer. More...
 
void set_capacity (int capacity)
 Preallocate enough memory. More...
 

Detailed Description

General purpose data buffer.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

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.


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