DDraceNetwork Docs
CAbstractPacker Class Reference

#include <packer.h>

Inheritance diagram for CAbstractPacker:
[legend]

Public Member Functions

void Reset ()
 
void AddInt (int i)
 
void AddString (const char *pStr, int Limit=0, bool AllowTruncation=true)
 
void AddRaw (const void *pData, int Size)
 
int Size () const
 
const unsigned char * Data () const
 
bool Error () const
 

Protected Member Functions

 CAbstractPacker (unsigned char *pBuffer, size_t Size)
 

Private Attributes

unsigned char *const m_pBuffer
 
const size_t m_BufferSize
 
unsigned char * m_pCurrent
 
unsigned char * m_pEnd
 
bool m_Error
 

Detailed Description

Abstract packer implementation. Subclasses must supply the buffer.

Constructor & Destructor Documentation

◆ CAbstractPacker()

CAbstractPacker::CAbstractPacker ( unsigned char *  pBuffer,
size_t  Size 
)
protected

Member Function Documentation

◆ AddInt()

void CAbstractPacker::AddInt ( int  i)

◆ AddRaw()

void CAbstractPacker::AddRaw ( const void *  pData,
int  Size 
)

◆ AddString()

void CAbstractPacker::AddString ( const char *  pStr,
int  Limit = 0,
bool  AllowTruncation = true 
)

◆ Data()

const unsigned char * CAbstractPacker::Data ( ) const
inline

◆ Error()

bool CAbstractPacker::Error ( ) const
inline

◆ Reset()

void CAbstractPacker::Reset ( )

◆ Size()

int CAbstractPacker::Size ( ) const
inline

Member Data Documentation

◆ m_BufferSize

const size_t CAbstractPacker::m_BufferSize
private

◆ m_Error

bool CAbstractPacker::m_Error
private

◆ m_pBuffer

unsigned char* const CAbstractPacker::m_pBuffer
private

◆ m_pCurrent

unsigned char* CAbstractPacker::m_pCurrent
private

◆ m_pEnd

unsigned char* CAbstractPacker::m_pEnd
private

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