SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
Components

Macros

#define BITS_PER_BYTE   8
 
#define BITS_PER_UINT32   (BITS_PER_BYTE * uint32_t(sizeof(uint32_t)))
 
#define BIT_MASK(x)   ((uint32_t)((1ULL << (x)) - 1))
 
#define BITS_TO_BYTES(x)   (((x) + 7) >> 3)
 
#define BITS_LEFT(x)   (BITS_PER_BYTE - (x))
 
#define BYTE_ALIGN(x)   (((x) + 7) & ~7)
 
#define SEGS_LOGGING_CATEGORY(name, string)
 

Functions

bool parseAddress (const QString &src, ACE_INET_Addr &tgt)
 
void setLoggingFilter ()
 
void toggleLogging (QString &category)
 
void dumpLogging ()
 
void settingsDump ()
 
void settingsDump (QSettings *s)
 
 BitStream::BitStream (size_t size)
 
 BitStream::BitStream (const BitStream &bs)
 
 BitStream::BitStream (uint8_t *from, size_t bitsize)
 
BitStreamBitStream::operator= (const BitStream &bs)
 
 BitStream::~BitStream ()
 
void BitStream::StoreBits (uint32_t nBits, uint32_t dataBits)
 
void BitStream::uStoreBits (uint32_t nBits, uint32_t dataBits)
 
void BitStream::StorePackedBits (uint32_t nBits, uint32_t dataBits)
 
void BitStream::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 BitStream::StoreString (const char *str)
 
void BitStream::StoreString (const QString &str)
 
int32_t BitStream::GetBits (uint32_t nBits)
 
int32_t BitStream::uGetBits (uint32_t nBits)
 
int32_t BitStream::GetPackedBits (uint32_t minbits)
 
void BitStream::GetBitArray (uint8_t *array, uint32_t nBits)
 
void BitStream::GetString (QString &str)
 Retrieves a null-terminated C-style string from the bit stream. More...
 
int64_t BitStream::Get64Bits ()
 Read upto 8 bytes from input stream and return them as 64bit integer. More...
 
size_t BitStream::GetAvailSize () const
 
float BitStream::GetFloat ()
 
void BitStream::StoreFloat (float val)
 
void BitStream::ResetOffsets ()
 
void BitStream::UseByteAlignedMode (bool toggle)
 
void BitStream::ByteAlign (bool read_part=true, bool write_part=true)
 
void BitStream::CompressAndStoreString (const char *str)
 
void BitStream::GetAndDecompressString (QString &tgt)
 
 GrowingBuffer::GrowingBuffer (uint8_t *buf, size_t size, bool become_owner)
 
 GrowingBuffer::GrowingBuffer (size_t max_size, uint8_t safe_area, size_t current_size)
 
 GrowingBuffer::GrowingBuffer (const GrowingBuffer &)
 
 GrowingBuffer::~GrowingBuffer ()
 
void GrowingBuffer::PutString (const char *t)
 
void GrowingBuffer::uPutString (const char *t)
 
void GrowingBuffer::PutBytes (const uint8_t *t, size_t len)
 
void GrowingBuffer::uPutBytes (const uint8_t *t, size_t len)
 
void GrowingBuffer::GetString (char *t)
 
void GrowingBuffer::uGetString (char *t)
 
bool GrowingBuffer::GetBytes (uint8_t *t, size_t len)
 
void GrowingBuffer::uGetBytes (uint8_t *t, size_t len)
 
void GrowingBuffer::PopFront (size_t count)
 
int GrowingBuffer::resize (size_t accommodate_size)
 
int EventProcessor::open (void *args=nullptr)
 
int EventProcessor::handle_timeout (const ACE_Time_Value &current_time, const void *act)
 
virtual const char * SEGSEvent::info ()
 
 SEGSTimer::SEGSTimer (EventProcessor *m_processor, void *data, const ACE_Time_Value &fire_delta_time, bool one_shot=true)
 
 SEGSTimer::~SEGSTimer ()
 
void SEGSTimer::schedule ()
 
void SEGSTimer::cancel ()
 
void SEGSTimer::reset ()
 
void SEGSTimer::reschedule (const ACE_Time_Value &new_time)
 
void SEGSTimer::schedule_repeatable ()
 
static void Settings::setSettingsPath (const QString path)
 
static QString Settings::getSettingsPath ()
 
void Settings::createSettingsFile ()
 
void Settings::setDefaultSettings ()
 

Variables

static SEGSEvent SEGSEvent::s_ev_finish
 

Detailed Description

Macro Definition Documentation

#define BIT_MASK (   x)    ((uint32_t)((1ULL << (x)) - 1))
#define BITS_LEFT (   x)    (BITS_PER_BYTE - (x))
#define BITS_PER_BYTE   8
#define BITS_PER_UINT32   (BITS_PER_BYTE * uint32_t(sizeof(uint32_t)))
#define BITS_TO_BYTES (   x)    (((x) + 7) >> 3)
#define BYTE_ALIGN (   x)    (((x) + 7) & ~7)
#define SEGS_LOGGING_CATEGORY (   name,
  string 
)
Value:
QLoggingCategory &name() \
{ \
static QLoggingCategory category(string); \
return category; \
}

Function Documentation

BitStream::BitStream ( size_t  size)
explicit

Here is the call graph for this function:

BitStream::BitStream ( uint8_t *  from,
size_t  bitsize 
)
BitStream::BitStream ( const BitStream bs)
void BitStream::ByteAlign ( bool  read_part = true,
bool  write_part = true 
)

Here is the caller graph for this function:

void SEGSTimer::cancel ( )

Here is the caller graph for this function:

void BitStream::CompressAndStoreString ( const char *  str)

Here is the call graph for this function:

void Settings::createSettingsFile ( )

Here is the call graph for this function:

void dumpLogging ( )

Here is the caller graph for this function:

int64_t BitStream::Get64Bits ( )

Read upto 8 bytes from input stream and return them as 64bit integer.

Returns
received 64 bit value

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::GetAndDecompressString ( QString &  tgt)

Here is the call graph for this function:

size_t BitStream::GetAvailSize ( ) const

Here is the caller graph for this function:

void BitStream::GetBitArray ( uint8_t *  array,
uint32_t  nBits 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t BitStream::GetBits ( uint32_t  nBits)

Here is the call graph for this function:

Here is the caller graph for this function:

bool GrowingBuffer::GetBytes ( uint8_t *  t,
size_t  len 
)

Here is the call graph for this function:

Here is the caller graph for this function:

float BitStream::GetFloat ( )

Here is the call graph for this function:

Here is the caller graph for this function:

int32_t BitStream::GetPackedBits ( uint32_t  minbits)

Here is the call graph for this function:

Here is the caller graph for this function:

QString Settings::getSettingsPath ( )
static

Here is the call graph for this function:

Here is the caller graph for this function:

void GrowingBuffer::GetString ( char *  t)

Here is the call graph for this function:

void BitStream::GetString ( QString &  str)

Retrieves a null-terminated C-style string from the bit stream.

Note
will set stream error status in case of stream exhaustion

Here is the call graph for this function:

Here is the caller graph for this function:

GrowingBuffer::GrowingBuffer ( const GrowingBuffer from)
explicit
GrowingBuffer::GrowingBuffer ( uint8_t *  buf,
size_t  size,
bool  become_owner 
)

Here is the call graph for this function:

GrowingBuffer::GrowingBuffer ( size_t  max_size,
uint8_t  safe_area,
size_t  current_size 
)

Here is the call graph for this function:

int EventProcessor::handle_timeout ( const ACE_Time_Value &  current_time,
const void *  act 
)

Here is the call graph for this function:

const char * SEGSEvent::info ( )
virtual

Reimplemented in EntitiesResponse.

Here is the caller graph for this function:

int EventProcessor::open ( void *  args = nullptr)

Here is the caller graph for this function:

BitStream & BitStream::operator= ( const BitStream bs)
bool parseAddress ( const QString &  src,
ACE_INET_Addr &  tgt 
)

Here is the caller graph for this function:

void GrowingBuffer::PopFront ( size_t  count)

Here is the caller graph for this function:

void GrowingBuffer::PutBytes ( const uint8_t *  t,
size_t  len 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void GrowingBuffer::PutString ( const char *  t)

Here is the call graph for this function:

Here is the caller graph for this function:

void SEGSTimer::reschedule ( const ACE_Time_Value &  new_time)

Here is the call graph for this function:

void SEGSTimer::reset ( )

Here is the call graph for this function:

void BitStream::ResetOffsets ( )

Here is the call graph for this function:

Here is the caller graph for this function:

int GrowingBuffer::resize ( size_t  accommodate_size)
protected

this method will try to resize GrowingBuffer to accommodate_size elements (in reality it preallocates a 'few' more ) if the new size is 0, then internal buffer object is deleted, freeing all memory Warning: when buffer is growing, only it's part that contains any valid data is copied (i.e. from start, to write_off ) returns -2 if there were problems allocating new block of memory for the internal storage returns -1 if new size exceeds maximum size allowed for this buffer returns 0 if everything went ok

Here is the caller graph for this function:

void SEGSTimer::schedule ( )

Here is the caller graph for this function:

void SEGSTimer::schedule_repeatable ( )

Here is the caller graph for this function:

SEGSTimer::SEGSTimer ( EventProcessor m_processor,
void *  data,
const ACE_Time_Value &  fire_delta_time,
bool  one_shot = true 
)

Here is the call graph for this function:

void Settings::setDefaultSettings ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void setLoggingFilter ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void Settings::setSettingsPath ( const QString  path)
static

Here is the caller graph for this function:

void settingsDump ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void settingsDump ( QSettings *  s)
void BitStream::StoreBitArray ( const uint8_t *  src,
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.

Parameters
src
nBits

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::StoreBits ( uint32_t  nBits,
uint32_t  dataBits 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::StoreFloat ( float  val)

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::StorePackedBits ( uint32_t  nBits,
uint32_t  dataBits 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::StoreString ( const char *  str)

Here is the call graph for this function:

Here is the caller graph for this function:

void BitStream::StoreString ( const QString &  str)

Here is the call graph for this function:

void toggleLogging ( QString &  category)

Here is the call graph for this function:

int32_t BitStream::uGetBits ( uint32_t  nBits)

Here is the call graph for this function:

Here is the caller graph for this function:

void GrowingBuffer::uGetBytes ( uint8_t *  t,
size_t  len 
)

Here is the caller graph for this function:

void GrowingBuffer::uGetString ( char *  t)
inline

Here is the call graph for this function:

void GrowingBuffer::uPutBytes ( const uint8_t *  t,
size_t  len 
)

Here is the caller graph for this function:

void GrowingBuffer::uPutString ( const char *  t)
inline

Here is the call graph for this function:

void BitStream::UseByteAlignedMode ( bool  toggle)

Here is the call graph for this function:

void BitStream::uStoreBits ( uint32_t  nBits,
uint32_t  dataBits 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BitStream::~BitStream ( )
GrowingBuffer::~GrowingBuffer ( )
SEGSTimer::~SEGSTimer ( )

Here is the call graph for this function:

Variable Documentation

SEGSEvent SEGSEvent::s_ev_finish
static