GClasses
GClasses::GBlobOutgoing Class Reference

Detailed Description

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

#include <GBlob.h>

Public Member Functions

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

Protected Member Functions

void resizeBuffer (size_t nRequiredSize)
 

Protected Attributes

bool m_bOkToResizeBuffer
 
size_t m_nBufferPos
 
size_t m_nBufferSize
 
unsigned char * m_pBuffer
 

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 char  c)

Pushes a char into the blob.

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

Pushes an int 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 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 double  d)

Pushes a double into the blob.

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

Pushes a null-terminated string into the blob.

unsigned char* GClasses::GBlobOutgoing::getBlob ( )
inline
size_t GClasses::GBlobOutgoing::getBlobSize ( )
inline
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::poke ( size_t  nIndex,
const int  n 
)

Puts an int 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

bool GClasses::GBlobOutgoing::m_bOkToResizeBuffer
protected
size_t GClasses::GBlobOutgoing::m_nBufferPos
protected
size_t GClasses::GBlobOutgoing::m_nBufferSize
protected
unsigned char* GClasses::GBlobOutgoing::m_pBuffer
protected