GClasses

GClasses::GBlobOutgoing Class Reference

This class is for serializing objects. It is the complement to GBlobIncoming. More...

#include <GBlob.h>

List of all members.

Public Member Functions

 GBlobOutgoing (size_t nBufferSize, bool bOkToResizeBuffer)
 ~GBlobOutgoing ()
void setPos (size_t pos)
unsigned char * getBlob ()
size_t getBlobSize ()
void add (const unsigned char *pData, size_t nSize)
 Pushes a blob into the blob.
void add (const wchar_t wc)
 Pushes a wide char into the blob.
void add (const char c)
 Pushes a char into the blob.
void add (const int n)
 Pushes an int into the blob.
void add (const unsigned int n)
 Pushes an unsigned int into the blob.
void add (const unsigned long long n)
 Pushes an unsigned 64-bit int into the blob.
void add (const unsigned char uc)
 Pushes an unsigned char into the blob.
void add (const float f)
 Pushes a float into the blob.
void add (const double d)
 Pushes a double into the blob.
void add (const char *szString)
 Pushes a null-terminated string into the blob.
void poke (size_t nIndex, const unsigned char *pData, size_t nSize)
 Puts bytes into the buffer (overwriting existing data)
void poke (size_t nIndex, const int n)
 Puts an int into the buffer (overwriting existing data)

Protected Member Functions

void resizeBuffer (size_t nRequiredSize)

Protected Attributes

size_t m_nBufferSize
size_t m_nBufferPos
unsigned char * m_pBuffer
bool m_bOkToResizeBuffer

Detailed Description

This class is for serializing objects. It is the complement to GBlobIncoming.


Constructor & Destructor Documentation

GClasses::GBlobOutgoing::GBlobOutgoing ( size_t  nBufferSize,
bool  bOkToResizeBuffer 
)
GClasses::GBlobOutgoing::~GBlobOutgoing ( )

Member Function Documentation

void GClasses::GBlobOutgoing::add ( const unsigned char *  pData,
size_t  nSize 
)

Pushes a blob into the blob.

void GClasses::GBlobOutgoing::add ( const wchar_t  wc)

Pushes a wide char into the blob.

void GClasses::GBlobOutgoing::add ( const unsigned int  n)

Pushes an unsigned int into the blob.

void GClasses::GBlobOutgoing::add ( const unsigned long long  n)

Pushes an unsigned 64-bit int into the blob.

void GClasses::GBlobOutgoing::add ( const char *  szString)

Pushes a null-terminated string into the blob.

void GClasses::GBlobOutgoing::add ( const unsigned char  uc)

Pushes an unsigned char into the blob.

void GClasses::GBlobOutgoing::add ( const float  f)

Pushes a float into the blob.

void GClasses::GBlobOutgoing::add ( const char  c)

Pushes a char into the blob.

void GClasses::GBlobOutgoing::add ( const double  d)

Pushes a double into the blob.

void GClasses::GBlobOutgoing::add ( const int  n)

Pushes an int into the blob.

unsigned char* GClasses::GBlobOutgoing::getBlob ( ) [inline]
size_t GClasses::GBlobOutgoing::getBlobSize ( ) [inline]
void GClasses::GBlobOutgoing::poke ( size_t  nIndex,
const int  n 
)

Puts an int into the buffer (overwriting existing data)

void GClasses::GBlobOutgoing::poke ( size_t  nIndex,
const unsigned char *  pData,
size_t  nSize 
)

Puts bytes into the buffer (overwriting existing data)

void GClasses::GBlobOutgoing::resizeBuffer ( size_t  nRequiredSize) [protected]
void GClasses::GBlobOutgoing::setPos ( size_t  pos) [inline]

Member Data Documentation

unsigned char* GClasses::GBlobOutgoing::m_pBuffer [protected]