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

#include <Buffer.h>

Inheritance diagram for GrowingBuffer:
Inheritance graph
Collaboration diagram for GrowingBuffer:
Collaboration graph

Public Member Functions

 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 ()
 

Protected Member Functions

GrowingBufferoperator= (const GrowingBuffer &)=delete
 
int resize (size_t accommodate_size)
 

Protected Attributes

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

template<typename T >
void GrowingBuffer::Get ( T &  val)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

size_t GrowingBuffer::GetAvailSize ( ) const
inline

Here is the caller graph for this function:

uint8_t* GrowingBuffer::GetBuffer ( ) const
inline

Here is the caller graph for this function:

size_t GrowingBuffer::GetDataSize ( ) const
inline
uint32_t GrowingBuffer::getLastError ( ) const
inline
size_t GrowingBuffer::GetMaxSize ( ) const
inline

this method removes up-to 'count' elements from the beginning of the buffer

size_t GrowingBuffer::GetReadableDataSize ( ) const
inline

Here is the caller graph for this function:

GrowingBuffer& GrowingBuffer::operator= ( const GrowingBuffer )
protecteddelete
template<typename T >
void GrowingBuffer::Put ( const T &  val)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t* GrowingBuffer::read_ptr ( )
inline

Here is the caller graph for this function:

const uint8_t* GrowingBuffer::read_ptr ( ) const
inline
void GrowingBuffer::read_ptr ( int  off)
inline
void GrowingBuffer::Reset ( )
inline

Here is the caller graph for this function:

void GrowingBuffer::ResetContents ( )
inline
void GrowingBuffer::ResetReading ( )
inline

Here is the caller graph for this function:

void GrowingBuffer::ResetWriting ( )
inline
template<typename T >
T GrowingBuffer::ruGet ( )
inline
void GrowingBuffer::setLastError ( uint32_t  val)
inline

Here is the caller graph for this function:

template<typename T >
void GrowingBuffer::uGet ( T &  val)
inline

Here is the caller graph for this function:

template<typename T >
void GrowingBuffer::uPut ( const T &  val)
inline

Here is the caller graph for this function:

uint8_t* GrowingBuffer::write_ptr ( )
inline

Here is the caller graph for this function:

void GrowingBuffer::write_ptr ( int  off)
inline

Member Data Documentation

uint8_t* GrowingBuffer::m_buf
protected
uint32_t GrowingBuffer::m_last_err
protected
size_t GrowingBuffer::m_max_size
protected
size_t GrowingBuffer::m_read_off
protected
uint8_t GrowingBuffer::m_safe_area
protected
size_t GrowingBuffer::m_size
protected
size_t GrowingBuffer::m_write_off
protected

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