SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
BitStream Class Reference

#include <BitStream.h>

Inheritance diagram for BitStream:
Inheritance graph
Collaboration diagram for BitStream:
Collaboration graph

Public Member Functions

 BitStream (size_t size)
 
 BitStream (uint8_t *from, size_t bitsize)
 
 BitStream (const BitStream &bs)
 
BitStreamoperator= (const BitStream &bs)
 
 ~BitStream ()
 
void StoreBits (uint32_t nBits, uint32_t dataBits)
 
void uStoreBits (uint32_t nBits, uint32_t dataBits)
 
void StoreFloat (float val)
 
void StorePackedBits (uint32_t nBits, uint32_t dataBits)
 
void appendBitStream (BitStream &src)
 
void StoreBitArray (const uint8_t *array, size_t nBits)
 BitStream::StoreBitArray Stores an array of bits in the bit stream buffer. The main difference between StoreBitArray and StoreBits, is that StoreBitArray can accept more than 32 bits at a time. More...
 
void StoreString (const char *str)
 
void StoreString (const QString &str)
 
int32_t GetBits (uint32_t nBits)
 
int32_t uGetBits (uint32_t nBits)
 
int32_t GetPackedBits (uint32_t minbits)
 
void GetBitArray (uint8_t *array, uint32_t nBits)
 
void GetString (QString &str)
 Retrieves a null-terminated C-style string from the bit stream. More...
 
float GetFloat ()
 
int64_t Get64Bits ()
 Read upto 8 bytes from input stream and return them as 64bit integer. More...
 
size_t GetWritableBits () const
 
size_t GetReadableBits () const
 
size_t GetAvailSize () const
 
bool IsByteAligned () const
 
void SetReadPos (uint32_t pos)
 
size_t GetReadPos () const
 
void SetWritePos (uint32_t pos)
 
size_t GetWritePos () const
 
void UseByteAlignedMode (bool toggle)
 
void ByteAlign (bool read_part=true, bool write_part=true)
 
void ResetReading ()
 
void ResetOffsets ()
 
void CompressAndStoreString (const char *str)
 
void GetAndDecompressString (QString &tgt)
 
- Public Member Functions inherited from GrowingBuffer
 GrowingBuffer (const GrowingBuffer &)
 
 GrowingBuffer (uint8_t *buf, size_t size, bool become_owner)
 
 GrowingBuffer (size_t max_size, uint8_t safe_area, size_t current_size)
 
 ~GrowingBuffer ()
 
void PutString (const char *t)
 
void PutBytes (const uint8_t *t, size_t len)
 
void GetString (char *t)
 
bool GetBytes (uint8_t *t, size_t len)
 
void uGetString (char *t)
 
void uGetBytes (uint8_t *t, size_t len)
 
void uPutString (const char *t)
 
void uPutBytes (const uint8_t *t, size_t len)
 
template<typename T >
void Put (const T &val)
 
template<typename T >
void Get (T &val)
 
template<typename T >
void uPut (const T &val)
 
template<typename T >
void uGet (T &val)
 
template<typename T >
ruGet ()
 
void PopFront (size_t count)
 
size_t GetMaxSize () const
 this method removes up-to 'count' elements from the beginning of the buffer More...
 
size_t GetAvailSize () const
 
size_t GetDataSize () const
 
size_t GetReadableDataSize () const
 
uint8_t * GetBuffer () const
 
uint32_t getLastError () const
 
void setLastError (uint32_t val)
 
uint8_t * read_ptr ()
 
const uint8_t * read_ptr () const
 
void read_ptr (int off)
 
uint8_t * write_ptr ()
 
void write_ptr (int off)
 
void Reset ()
 
void ResetReading ()
 
void ResetWriting ()
 
void ResetContents ()
 

Additional Inherited Members

- Protected Member Functions inherited from GrowingBuffer
GrowingBufferoperator= (const GrowingBuffer &)=delete
 
int resize (size_t accommodate_size)
 
- Protected Attributes inherited from GrowingBuffer
uint8_t * m_buf
 
size_t m_write_off
 
size_t m_read_off
 
size_t m_size
 
size_t m_max_size
 
uint32_t m_last_err
 
uint8_t m_safe_area
 

Member Function Documentation

void BitStream::appendBitStream ( BitStream src)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

size_t BitStream::GetReadableBits ( ) const
inline

Here is the call graph for this function:

Here is the caller graph for this function:

size_t BitStream::GetReadPos ( ) const
inline

Here is the caller graph for this function:

size_t BitStream::GetWritableBits ( ) const
inline

Here is the call graph for this function:

Here is the caller graph for this function:

size_t BitStream::GetWritePos ( ) const
inline

Here is the caller graph for this function:

bool BitStream::IsByteAligned ( ) const
inline

Here is the caller graph for this function:

void BitStream::ResetReading ( )
inline

Here is the caller graph for this function:

void BitStream::SetReadPos ( uint32_t  pos)
inline

Here is the caller graph for this function:

void BitStream::SetWritePos ( uint32_t  pos)
inline

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