CL_DataBuffer Class Reference
[clanCore System]

General purpose data buffer. More...

#include <databuffer.h>

List of all members.

Public Member Functions

Construction

 CL_DataBuffer ()
 Constructs a data buffer of 0 size.
 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.
const char * get_data () const
int get_size () const
 Returns the size of the data.
int get_capacity () const
 Returns the capacity of the data buffer object.
char & operator[] (int i)
 Returns a char in the buffer.
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.
Operations

CL_DataBufferoperator= (const CL_DataBuffer &copy)
void set_size (int size)
 Resize the buffer.
void set_capacity (int capacity)
 Preallocate enough memory.

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[] ( unsigned int  i  ) 
const char& CL_DataBuffer::operator[] ( int  i  )  const
const char& CL_DataBuffer::operator[] ( unsigned int  i  )  const
char& CL_DataBuffer::operator[] ( int  i  ) 

Returns a char in the buffer.

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: