Lugre::cFIFO Class Reference

TODO : endian stuff for float, double, int, or general for 2,4,8 bytes of consecutive data ?? More...

#include <lugre_fifo.h>

Inheritance diagram for Lugre::cFIFO:

Inheritance graph
[legend]
Collaboration diagram for Lugre::cFIFO:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cFIFO (uint32 miCapacity=1024)
virtual ~cFIFO ()
void PushC (const char a)
void Push (const int a)
void PushU (const uint32 a)
void PushF (const float a)
void Push (const Ogre::Vector3 &a)
void Push (const Ogre::Quaternion &a)
void Push (const std::string &a)
void Push (cFIFO &a)
void PushFIFO (cFIFO &a)
void PushS (const std::string &a)
void PushPlainText (const std::string &s)
void PushFilledString (const std::string &s, unsigned int size)
void PushUint8 (const uint8 a)
void PushUint16 (const uint16 a)
void PushUint32 (const uint32 a)
void PushInt8 (const int8 a)
void PushInt16 (const int16 a)
void PushInt32 (const int32 a)
void PushNetUint8 (const uint8 a)
void PushNetUint16 (const uint16 a)
void PushNetUint32 (const uint32 a)
void PushPointer (const void *a)
void PushNetInt8 (const int8 a)
void PushNetInt16 (const int16 a)
void PushNetInt32 (const int32 a)
bool PeekDecompressIntoFifo (const unsigned int iLenCompressed, const unsigned int iLenDecompressed, cFIFO &dst)
int PushCompressFromFifo (cFIFO &src)
uint32 CRC (const uint32 size)
void PopC (char &a)
void Pop (int &a)
void PopU (uint32 &a)
void PopF (float &a)
void Pop (Ogre::Vector3 &a)
void Pop (Ogre::Quaternion &a)
void Pop (std::string &a)
void Pop (cFIFO &a, const uint32 len)
void PopUint32 (uint32 &a)
void PopUint16 (uint16 &a)
void PopUint8 (uint8 &a)
void PopInt32 (int32 &a)
void PopInt16 (int16 &a)
void PopInt8 (int8 &a)
void PopPointer (void *&a)
void PopNetUint32 (uint32 &a)
void PopNetUint16 (uint16 &a)
void PopNetUint8 (uint8 &a)
void PopNetInt32 (int32 &a)
void PopNetInt16 (int16 &a)
void PopNetInt8 (int8 &a)
std::string PopFilledString (uint32 size)
std::string PopTerminatedString (const char *terminationstring)
char PopC ()
int PopI ()
uint32 PopU ()
float PopF ()
Ogre::Vector3 PopV ()
Ogre::Quaternion PopQ ()
std::string PopS ()
uint32 PopUint32 ()
uint16 PopUint16 ()
uint8 PopUint8 ()
int32 PopInt32 ()
int16 PopInt16 ()
int8 PopInt8 ()
void * PopPointer ()
uint32 PopNetUint32 ()
uint16 PopNetUint16 ()
uint8 PopNetUint8 ()
int32 PopNetInt32 ()
int16 PopNetInt16 ()
int8 PopNetInt8 ()
void Skip (unsigned int len)
 pops len bytes to skip them
void PeekB (char &a, const uint32 offset=-1)
void Peek (int &a, const uint32 offset=-1)
void PeekU (uint32 &a, const uint32 offset=-1)
void PeekUint8 (uint8 &a, const uint32 offset=-1)
void PeekUint16 (uint16 &a, const uint32 offset=-1)
void PeekUint32 (uint32 &a, const uint32 offset=-1)
void PeekInt8 (int8 &a, const uint32 offset=-1)
void PeekInt16 (int16 &a, const uint32 offset=-1)
void PeekInt32 (int32 &a, const uint32 offset=-1)
void PokeNetUint8 (const uint32 offset, const uint8 x)
void PeekNetUint8 (uint8 &a, const uint32 offset=-1)
void PeekNetUint16 (uint16 &a, const uint32 offset=-1)
void PeekNetUint32 (uint32 &a, const uint32 offset=-1)
void PeekPointer (void *&a, const uint32 offset=-1)
void PeekFloat (float &a, const uint32 offset=-1)
int PeekI (const uint32 offset=-1)
uint32 PeekU (const uint32 offset=-1)
uint8 PeekUint8 (const uint32 offset=-1)
uint16 PeekUint16 (const uint32 offset=-1)
uint32 PeekUint32 (const uint32 offset=-1)
int8 PeekInt8 (const uint32 offset=-1)
int16 PeekInt16 (const uint32 offset=-1)
int32 PeekInt32 (const uint32 offset=-1)
float PeekFloat (const uint32 offset=-1)
uint8 PeekNetUint8 (const uint32 offset=-1)
uint16 PeekNetUint16 (const uint32 offset=-1)
uint32 PeekNetUint32 (const uint32 offset=-1)
void * PeekPointer (const uint32 offset=-1)
void HackSetU (const uint32 offset, const uint32 a)
uint32 size ()
uint32 GetLength ()
void Clear ()
 empty fifo
void Reserve (const uint32 minspace)
 make sure there is enough space, called automatically from Push
void Shrink ()
 remove any gaps, called automatically from Reserve and Push
const char * HackGetRawReader ()
 hack for optimizing usage with recv() in network-connection
char * HackGetRawWriter (const uint32 minspace)
 hack for optimizing usage with recv() in network-connection
void HackAddLength (const uint32 len)
 hack for optimizing usage with recv() in network-connection
void HackSubLength (const uint32 len)
 hack needed for rollback (first used in huffman decomp)
uint32 HackGetFreeSpace ()
 hack for optimizing usage with recv() in network-connection
void HackRestore (const uint32 len)
 hack for bug-handling in cMessageQueue, try to restore previously popped data
void PushRawEndian (const char *source, const uint32 len)
 copy len bytes from source
void PushRawFill (const char c, const uint32 len)
void PushRaw (const char *source, const uint32 len)
void HackSetRawEndian (const uint32 offset, const char *source, const uint32 len)
 change value inside fifo
void HackSetRaw (const uint32 offset, const char *source, const uint32 len)
void PopRawEndian (char *dest, const uint32 len)
 copy len bytes to dest and drop them
void PopRaw (char *dest, const uint32 len)
int GetTotalPopped ()
void PeekRawEndian (char *dest, const uint32 len, const uint32 offset=0)
 copy len bytes to dest
void PeekRaw (char *dest, const uint32 len, const uint32 offset=0)
void PopRaw (const uint32 len)
 drop len bytes

Public Attributes

char * mpBuf
uint32 miTotalPopped
 does not shrink when new data is pushed, usefull for network debugging
uint32 miCapacity
uint32 miLen
uint32 miStartOff


Detailed Description

TODO : endian stuff for float, double, int, or general for 2,4,8 bytes of consecutive data ??

size can only grow, not shrink; pop is in constant time (does not cause memmove) completely inlined, no source file This FIFO code is rather long as it contains basic message management, endian conversion (not completed yet) and some hack-methods for highly optimized usage (to avoid copying memory when writing data to socket...) also note the two classes at the bottom, cMessageWriter, cMessageReader, which offer a somewhat secure capsuling for reading and writing messages while maintaining direct access to the buffer of the main fifo (again for speed reasons, to avoid copying data)

Definition at line 63 of file lugre_fifo.h.


Constructor & Destructor Documentation

Lugre::cFIFO::cFIFO ( uint32  miCapacity = 1024  )  [inline]

Definition at line 74 of file lugre_fifo.h.

References assert, miCapacity, and mpBuf.

virtual Lugre::cFIFO::~cFIFO (  )  [inline, virtual]

Definition at line 78 of file lugre_fifo.h.

References mpBuf.


Member Function Documentation

void Lugre::cFIFO::PushC ( const char  a  )  [inline]

Definition at line 81 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::Push ( const int  a  )  [inline]

Definition at line 82 of file lugre_fifo.h.

References PushRawEndian().

Referenced by Lugre::cConnection_L::Pop(), PushFIFO(), PushS(), and cObject::SaveResyncData().

void Lugre::cFIFO::PushU ( const uint32  a  )  [inline]

Definition at line 83 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushF ( const float  a  )  [inline]

Definition at line 84 of file lugre_fifo.h.

References PushRawEndian().

Referenced by Push().

void Lugre::cFIFO::Push ( const Ogre::Vector3 &  a  )  [inline]

Definition at line 85 of file lugre_fifo.h.

References PushF().

void Lugre::cFIFO::Push ( const Ogre::Quaternion &  a  )  [inline]

Definition at line 86 of file lugre_fifo.h.

References PushF().

void Lugre::cFIFO::Push ( const std::string &  a  )  [inline]

Definition at line 87 of file lugre_fifo.h.

References PushNetUint32(), and PushRaw().

void Lugre::cFIFO::Push ( cFIFO a  )  [inline]

Definition at line 88 of file lugre_fifo.h.

References HackGetRawReader(), PushRaw(), and size().

void Lugre::cFIFO::PushFIFO ( cFIFO a  )  [inline]

Definition at line 90 of file lugre_fifo.h.

References Push().

void Lugre::cFIFO::PushS ( const std::string &  a  )  [inline]

Definition at line 91 of file lugre_fifo.h.

References Push().

void Lugre::cFIFO::PushPlainText ( const std::string &  s  )  [inline]

Definition at line 94 of file lugre_fifo.h.

References PushFilledString().

void Lugre::cFIFO::PushFilledString ( const std::string &  s,
unsigned int  size 
) [inline]

Definition at line 95 of file lugre_fifo.h.

References Lugre::mymin(), PushRaw(), and PushRawFill().

Referenced by PushPlainText().

void Lugre::cFIFO::PushUint8 ( const uint8  a  )  [inline]

Definition at line 106 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushUint16 ( const uint16  a  )  [inline]

Definition at line 107 of file lugre_fifo.h.

References PushRawEndian().

Referenced by cObject::SaveResyncData().

void Lugre::cFIFO::PushUint32 ( const uint32  a  )  [inline]

Definition at line 108 of file lugre_fifo.h.

References PushRawEndian().

Referenced by cObject::SaveResyncData().

void Lugre::cFIFO::PushInt8 ( const int8  a  )  [inline]

Definition at line 109 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushInt16 ( const int16  a  )  [inline]

Definition at line 110 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushInt32 ( const int32  a  )  [inline]

Definition at line 111 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetUint8 ( const uint8  a  )  [inline]

Definition at line 114 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetUint16 ( const uint16  a  )  [inline]

Definition at line 115 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetUint32 ( const uint32  a  )  [inline]

Definition at line 116 of file lugre_fifo.h.

References PushRawEndian().

Referenced by Push().

void Lugre::cFIFO::PushPointer ( const void *  a  )  [inline]

Definition at line 117 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetInt8 ( const int8  a  )  [inline]

Definition at line 118 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetInt16 ( const int16  a  )  [inline]

Definition at line 119 of file lugre_fifo.h.

References PushRawEndian().

void Lugre::cFIFO::PushNetInt32 ( const int32  a  )  [inline]

Definition at line 120 of file lugre_fifo.h.

References PushRawEndian().

bool Lugre::cFIFO::PeekDecompressIntoFifo ( const unsigned int  iLenCompressed,
const unsigned int  iLenDecompressed,
cFIFO dst 
) [inline]

Definition at line 127 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PushRaw(), and size().

int Lugre::cFIFO::PushCompressFromFifo ( cFIFO src  )  [inline]

Definition at line 141 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PushRaw(), and size().

uint32 Lugre::cFIFO::CRC ( const uint32  size  )  [inline]

Definition at line 154 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), and size().

void Lugre::cFIFO::PopC ( char &  a  )  [inline]

Definition at line 162 of file lugre_fifo.h.

References PopRawEndian().

Referenced by Lugre::cFIFO_L::PopUnicodeLEString(), and Lugre::cFIFO_L::PopUnicodeString().

void Lugre::cFIFO::Pop ( int &  a  )  [inline]

Definition at line 163 of file lugre_fifo.h.

References PopRawEndian().

Referenced by cObject::LoadResyncData(), PopI(), PopQ(), PopS(), and PopV().

void Lugre::cFIFO::PopU ( uint32 a  )  [inline]

Definition at line 164 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopF ( float &  a  )  [inline]

Definition at line 165 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::Pop ( Ogre::Vector3 &  a  )  [inline]

Definition at line 166 of file lugre_fifo.h.

References PopF().

void Lugre::cFIFO::Pop ( Ogre::Quaternion &  a  )  [inline]

Definition at line 167 of file lugre_fifo.h.

References PopF().

void Lugre::cFIFO::Pop ( std::string &  a  )  [inline]

Definition at line 168 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PopNetUint32(), PopRaw(), and size().

void Lugre::cFIFO::Pop ( cFIFO a,
const uint32  len 
) [inline]

Definition at line 175 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PopRaw(), PushRaw(), and size().

void Lugre::cFIFO::PopUint32 ( uint32 a  )  [inline]

Definition at line 181 of file lugre_fifo.h.

References PopRawEndian().

Referenced by cObject::LoadResyncData().

void Lugre::cFIFO::PopUint16 ( uint16 a  )  [inline]

Definition at line 182 of file lugre_fifo.h.

References PopRawEndian().

Referenced by cObject::LoadResyncData().

void Lugre::cFIFO::PopUint8 ( uint8 a  )  [inline]

Definition at line 183 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopInt32 ( int32 a  )  [inline]

Definition at line 184 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopInt16 ( int16 a  )  [inline]

Definition at line 185 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopInt8 ( int8 a  )  [inline]

Definition at line 186 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopPointer ( void *&  a  )  [inline]

Definition at line 188 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetUint32 ( uint32 a  )  [inline]

Definition at line 189 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetUint16 ( uint16 a  )  [inline]

Definition at line 190 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetUint8 ( uint8 a  )  [inline]

Definition at line 191 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetInt32 ( int32 a  )  [inline]

Definition at line 193 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetInt16 ( int16 a  )  [inline]

Definition at line 194 of file lugre_fifo.h.

References PopRawEndian().

void Lugre::cFIFO::PopNetInt8 ( int8 a  )  [inline]

Definition at line 195 of file lugre_fifo.h.

References PopRawEndian().

std::string Lugre::cFIFO::PopFilledString ( uint32  size  )  [inline]

Definition at line 197 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PopRaw(), and size().

std::string Lugre::cFIFO::PopTerminatedString ( const char *  terminationstring  )  [inline]

Definition at line 206 of file lugre_fifo.h.

References FIFO_ASSERT, HackGetRawReader(), PopRaw(), and size().

char Lugre::cFIFO::PopC (  )  [inline]

Definition at line 223 of file lugre_fifo.h.

int Lugre::cFIFO::PopI (  )  [inline]

Definition at line 224 of file lugre_fifo.h.

References Pop().

uint32 Lugre::cFIFO::PopU (  )  [inline]

Definition at line 225 of file lugre_fifo.h.

float Lugre::cFIFO::PopF (  )  [inline]

Definition at line 226 of file lugre_fifo.h.

Referenced by Pop().

Ogre::Vector3 Lugre::cFIFO::PopV (  )  [inline]

Definition at line 227 of file lugre_fifo.h.

References Pop().

Ogre::Quaternion Lugre::cFIFO::PopQ (  )  [inline]

Definition at line 228 of file lugre_fifo.h.

References Pop().

std::string Lugre::cFIFO::PopS (  )  [inline]

Definition at line 229 of file lugre_fifo.h.

References Pop().

uint32 Lugre::cFIFO::PopUint32 (  )  [inline]

Definition at line 231 of file lugre_fifo.h.

uint16 Lugre::cFIFO::PopUint16 (  )  [inline]

Definition at line 232 of file lugre_fifo.h.

uint8 Lugre::cFIFO::PopUint8 (  )  [inline]

Definition at line 233 of file lugre_fifo.h.

int32 Lugre::cFIFO::PopInt32 (  )  [inline]

Definition at line 234 of file lugre_fifo.h.

int16 Lugre::cFIFO::PopInt16 (  )  [inline]

Definition at line 235 of file lugre_fifo.h.

int8 Lugre::cFIFO::PopInt8 (  )  [inline]

Definition at line 236 of file lugre_fifo.h.

void* Lugre::cFIFO::PopPointer (  )  [inline]

Definition at line 238 of file lugre_fifo.h.

uint32 Lugre::cFIFO::PopNetUint32 (  )  [inline]

Definition at line 239 of file lugre_fifo.h.

Referenced by Pop().

uint16 Lugre::cFIFO::PopNetUint16 (  )  [inline]

Definition at line 240 of file lugre_fifo.h.

uint8 Lugre::cFIFO::PopNetUint8 (  )  [inline]

Definition at line 241 of file lugre_fifo.h.

int32 Lugre::cFIFO::PopNetInt32 (  )  [inline]

Definition at line 243 of file lugre_fifo.h.

int16 Lugre::cFIFO::PopNetInt16 (  )  [inline]

Definition at line 244 of file lugre_fifo.h.

int8 Lugre::cFIFO::PopNetInt8 (  )  [inline]

Definition at line 245 of file lugre_fifo.h.

void Lugre::cFIFO::Skip ( unsigned int  len  )  [inline]

pops len bytes to skip them

Definition at line 248 of file lugre_fifo.h.

References PopRaw().

Referenced by cObject::LoadResyncData(), and cObject::SkipResyncData().

void Lugre::cFIFO::PeekB ( char &  a,
const uint32  offset = -1 
) [inline]

Definition at line 252 of file lugre_fifo.h.

References PeekRawEndian().

void Lugre::cFIFO::Peek ( int &  a,
const uint32  offset = -1 
) [inline]

Definition at line 253 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekI().

void Lugre::cFIFO::PeekU ( uint32 a,
const uint32  offset = -1 
) [inline]

Definition at line 254 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekU().

void Lugre::cFIFO::PeekUint8 ( uint8 a,
const uint32  offset = -1 
) [inline]

Definition at line 256 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekUint8().

void Lugre::cFIFO::PeekUint16 ( uint16 a,
const uint32  offset = -1 
) [inline]

Definition at line 257 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekUint16().

void Lugre::cFIFO::PeekUint32 ( uint32 a,
const uint32  offset = -1 
) [inline]

void Lugre::cFIFO::PeekInt8 ( int8 a,
const uint32  offset = -1 
) [inline]

Definition at line 259 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekInt8().

void Lugre::cFIFO::PeekInt16 ( int16 a,
const uint32  offset = -1 
) [inline]

Definition at line 260 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekInt16().

void Lugre::cFIFO::PeekInt32 ( int32 a,
const uint32  offset = -1 
) [inline]

Definition at line 261 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekInt32().

void Lugre::cFIFO::PokeNetUint8 ( const uint32  offset,
const uint8  x 
) [inline]

Definition at line 263 of file lugre_fifo.h.

References FIFO_ASSERT, miLen, miStartOff, and mpBuf.

void Lugre::cFIFO::PeekNetUint8 ( uint8 a,
const uint32  offset = -1 
) [inline]

Definition at line 268 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekNetUint8().

void Lugre::cFIFO::PeekNetUint16 ( uint16 a,
const uint32  offset = -1 
) [inline]

Definition at line 269 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekNetUint16().

void Lugre::cFIFO::PeekNetUint32 ( uint32 a,
const uint32  offset = -1 
) [inline]

Definition at line 270 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekNetUint32().

void Lugre::cFIFO::PeekPointer ( void *&  a,
const uint32  offset = -1 
) [inline]

Definition at line 271 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekPointer().

void Lugre::cFIFO::PeekFloat ( float &  a,
const uint32  offset = -1 
) [inline]

Definition at line 272 of file lugre_fifo.h.

References PeekRawEndian().

Referenced by PeekFloat().

int Lugre::cFIFO::PeekI ( const uint32  offset = -1  )  [inline]

Definition at line 275 of file lugre_fifo.h.

References Peek().

uint32 Lugre::cFIFO::PeekU ( const uint32  offset = -1  )  [inline]

Definition at line 276 of file lugre_fifo.h.

References PeekU().

uint8 Lugre::cFIFO::PeekUint8 ( const uint32  offset = -1  )  [inline]

Definition at line 278 of file lugre_fifo.h.

References PeekUint8().

uint16 Lugre::cFIFO::PeekUint16 ( const uint32  offset = -1  )  [inline]

Definition at line 279 of file lugre_fifo.h.

References PeekUint16().

uint32 Lugre::cFIFO::PeekUint32 ( const uint32  offset = -1  )  [inline]

Definition at line 280 of file lugre_fifo.h.

References PeekUint32().

int8 Lugre::cFIFO::PeekInt8 ( const uint32  offset = -1  )  [inline]

Definition at line 281 of file lugre_fifo.h.

References PeekInt8().

int16 Lugre::cFIFO::PeekInt16 ( const uint32  offset = -1  )  [inline]

Definition at line 282 of file lugre_fifo.h.

References PeekInt16().

int32 Lugre::cFIFO::PeekInt32 ( const uint32  offset = -1  )  [inline]

Definition at line 283 of file lugre_fifo.h.

References PeekInt32().

float Lugre::cFIFO::PeekFloat ( const uint32  offset = -1  )  [inline]

Definition at line 284 of file lugre_fifo.h.

References PeekFloat().

uint8 Lugre::cFIFO::PeekNetUint8 ( const uint32  offset = -1  )  [inline]

Definition at line 286 of file lugre_fifo.h.

References PeekNetUint8().

uint16 Lugre::cFIFO::PeekNetUint16 ( const uint32  offset = -1  )  [inline]

Definition at line 287 of file lugre_fifo.h.

References PeekNetUint16().

uint32 Lugre::cFIFO::PeekNetUint32 ( const uint32  offset = -1  )  [inline]

Definition at line 288 of file lugre_fifo.h.

References PeekNetUint32().

void* Lugre::cFIFO::PeekPointer ( const uint32  offset = -1  )  [inline]

Definition at line 289 of file lugre_fifo.h.

References PeekPointer().

void Lugre::cFIFO::HackSetU ( const uint32  offset,
const uint32  a 
) [inline]

Definition at line 292 of file lugre_fifo.h.

References HackSetRawEndian().

uint32 Lugre::cFIFO::size (  )  [inline]

uint32 Lugre::cFIFO::GetLength (  )  [inline]

Definition at line 297 of file lugre_fifo.h.

References miLen.

void Lugre::cFIFO::Clear (  )  [inline]

empty fifo

Definition at line 299 of file lugre_fifo.h.

References miLen, and miStartOff.

Referenced by cResyncReceiver::ReceiveResyncs(), cLocation::SendResyncs(), and Lugre::cBroadcast::Step().

void Lugre::cFIFO::Reserve ( const uint32  minspace  )  [inline]

make sure there is enough space, called automatically from Push

Definition at line 302 of file lugre_fifo.h.

References assert, miCapacity, miLen, miStartOff, mpBuf, and Shrink().

Referenced by HackGetRawWriter(), PushRaw(), and PushRawFill().

void Lugre::cFIFO::Shrink (  )  [inline]

remove any gaps, called automatically from Reserve and Push

Definition at line 316 of file lugre_fifo.h.

References miLen, miStartOff, and mpBuf.

Referenced by Reserve().

const char* Lugre::cFIFO::HackGetRawReader (  )  [inline]

char* Lugre::cFIFO::HackGetRawWriter ( const uint32  minspace  )  [inline]

hack for optimizing usage with recv() in network-connection

Definition at line 327 of file lugre_fifo.h.

References assert, miLen, miStartOff, mpBuf, and Reserve().

Referenced by Lugre::cThread_NetRequestImpl::operator()(), Lugre::cUDP_ReceiveSocket::Receive(), and Lugre::cConnection::Step().

void Lugre::cFIFO::HackAddLength ( const uint32  len  )  [inline]

hack for optimizing usage with recv() in network-connection

Definition at line 333 of file lugre_fifo.h.

References FIFO_ASSERT, miCapacity, miLen, and miStartOff.

Referenced by Lugre::cThread_NetRequestImpl::operator()(), Lugre::cUDP_ReceiveSocket::Receive(), and Lugre::cConnection::Step().

void Lugre::cFIFO::HackSubLength ( const uint32  len  )  [inline]

hack needed for rollback (first used in huffman decomp)

Definition at line 338 of file lugre_fifo.h.

References FIFO_ASSERT, and miLen.

uint32 Lugre::cFIFO::HackGetFreeSpace (  )  [inline]

hack for optimizing usage with recv() in network-connection

Definition at line 343 of file lugre_fifo.h.

References miCapacity, miLen, and miStartOff.

Referenced by Lugre::cThread_NetRequestImpl::operator()(), and Lugre::cConnection::Step().

void Lugre::cFIFO::HackRestore ( const uint32  len  )  [inline]

hack for bug-handling in cMessageQueue, try to restore previously popped data

Definition at line 346 of file lugre_fifo.h.

References FIFO_ASSERT, miLen, and miStartOff.

void Lugre::cFIFO::PushRawEndian ( const char *  source,
const uint32  len 
) [inline]

void Lugre::cFIFO::PushRawFill ( const char  c,
const uint32  len 
) [inline]

Definition at line 358 of file lugre_fifo.h.

References assert, miLen, miStartOff, mpBuf, and Reserve().

Referenced by PushFilledString().

void Lugre::cFIFO::PushRaw ( const char *  source,
const uint32  len 
) [inline]

void Lugre::cFIFO::HackSetRawEndian ( const uint32  offset,
const char *  source,
const uint32  len 
) [inline]

change value inside fifo

Definition at line 375 of file lugre_fifo.h.

References HackSetRaw().

Referenced by HackSetU().

void Lugre::cFIFO::HackSetRaw ( const uint32  offset,
const char *  source,
const uint32  len 
) [inline]

Definition at line 378 of file lugre_fifo.h.

References miStartOff, and mpBuf.

Referenced by HackSetRawEndian().

void Lugre::cFIFO::PopRawEndian ( char *  dest,
const uint32  len 
) [inline]

copy len bytes to dest and drop them

Definition at line 388 of file lugre_fifo.h.

References PopRaw().

Referenced by Pop(), PopC(), PopF(), PopInt16(), PopInt32(), PopInt8(), PopNetInt16(), PopNetInt32(), PopNetInt8(), PopNetUint16(), PopNetUint32(), PopNetUint8(), PopPointer(), PopU(), PopUint16(), PopUint32(), and PopUint8().

void Lugre::cFIFO::PopRaw ( char *  dest,
const uint32  len 
) [inline]

int Lugre::cFIFO::GetTotalPopped (  )  [inline]

Definition at line 398 of file lugre_fifo.h.

References miTotalPopped.

void Lugre::cFIFO::PeekRawEndian ( char *  dest,
const uint32  len,
const uint32  offset = 0 
) [inline]

void Lugre::cFIFO::PeekRaw ( char *  dest,
const uint32  len,
const uint32  offset = 0 
) [inline]

Definition at line 404 of file lugre_fifo.h.

References FIFO_ASSERT, miLen, miStartOff, and mpBuf.

Referenced by PeekRawEndian(), and PopRaw().

void Lugre::cFIFO::PopRaw ( const uint32  len  )  [inline]

drop len bytes

Definition at line 412 of file lugre_fifo.h.

References FIFO_ASSERT, miLen, miStartOff, and miTotalPopped.


Member Data Documentation

does not shrink when new data is pushed, usefull for network debugging

Definition at line 67 of file lugre_fifo.h.

Referenced by GetTotalPopped(), and PopRaw().

Definition at line 68 of file lugre_fifo.h.

Referenced by cFIFO(), HackAddLength(), HackGetFreeSpace(), and Reserve().


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

Generated on Wed Feb 8 06:00:21 2012 for cpp by  doxygen 1.5.6