CzzBuffer Class Reference

General data buffer with automatic memory handeling. More...

#include <base/zz_buffer.h>

List of all members.

Public Member Functions

 CzzBuffer (unsigned long initsize, unsigned long realloc)
 Create a buffer.
 CzzBuffer (unsigned long initsize)
 Create a buffer.
virtual ~CzzBuffer ()
void append (char *more, unsigned long size)
 Append data to the buffer.
void clear (void)
 Clears the buffer.
char * getData (void)
 Pointer to the raw data.
unsigned long getSize (void)
 Buffer size.

Protected Attributes

unsigned long m_Used
unsigned long m_Size
unsigned long m_Realloc
char * m_Tmp
char * m_Data


Detailed Description

General data buffer with automatic memory handeling.

Author:
Toni Thomsson, toni@tonjac.org


Constructor & Destructor Documentation

CzzBuffer::CzzBuffer unsigned long  initsize,
unsigned long  realloc
 

Create a buffer.

Parameters:
initsize Initial size in bytes
realloc Size of reallocation block

CzzBuffer::CzzBuffer unsigned long  initsize  ) 
 

Create a buffer.

Reallocation size of 1024 bytes.

Parameters:
initsize Initial size in bytes

CzzBuffer::~CzzBuffer  )  [virtual]
 


Member Function Documentation

void CzzBuffer::append char *  more,
unsigned long  size
 

Append data to the buffer.

Parameters:
more Data to be appended
size Size of the data

void CzzBuffer::clear void   ) 
 

Clears the buffer.

char* CzzBuffer::getData void   )  [inline]
 

Pointer to the raw data.

unsigned long CzzBuffer::getSize void   )  [inline]
 

Buffer size.


Member Data Documentation

char* CzzBuffer::m_Data [protected]
 

unsigned long CzzBuffer::m_Realloc [protected]
 

unsigned long CzzBuffer::m_Size [protected]
 

char* CzzBuffer::m_Tmp [protected]
 

unsigned long CzzBuffer::m_Used [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Sep 21 21:45:45 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO