DDraceNetwork Docs
CSnapIdPool Class Reference

#include <snap_id_pool.h>

Collaboration diagram for CSnapIdPool:
[legend]

Classes

class  CID
 

Public Member Functions

 CSnapIdPool ()
 
void Reset ()
 
void RemoveFirstTimeout ()
 
int NewId ()
 
void TimeoutIds ()
 
void FreeId (int Id)
 

Private Types

enum  { MAX_IDS = 32 * 1024 }
 
enum  { ID_FREE = 0 , ID_ALLOCATED = 1 , ID_TIMED = 2 }
 

Private Attributes

CID m_aIds [MAX_IDS]
 
int m_FirstFree
 
int m_FirstTimed
 
int m_LastTimed
 
int m_Usage
 
int m_InUsage
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MAX_IDS 

◆ anonymous enum

anonymous enum
private
Enumerator
ID_FREE 
ID_ALLOCATED 
ID_TIMED 

Constructor & Destructor Documentation

◆ CSnapIdPool()

CSnapIdPool::CSnapIdPool ( )

Member Function Documentation

◆ FreeId()

void CSnapIdPool::FreeId ( int  Id)

◆ NewId()

int CSnapIdPool::NewId ( )

◆ RemoveFirstTimeout()

void CSnapIdPool::RemoveFirstTimeout ( )

◆ Reset()

void CSnapIdPool::Reset ( )

◆ TimeoutIds()

void CSnapIdPool::TimeoutIds ( )

Member Data Documentation

◆ m_aIds

CID CSnapIdPool::m_aIds[MAX_IDS]
private

◆ m_FirstFree

int CSnapIdPool::m_FirstFree
private

◆ m_FirstTimed

int CSnapIdPool::m_FirstTimed
private

◆ m_InUsage

int CSnapIdPool::m_InUsage
private

◆ m_LastTimed

int CSnapIdPool::m_LastTimed
private

◆ m_Usage

int CSnapIdPool::m_Usage
private

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