DDraceNetwork Docs
CRingBufferBase Class Reference

#include <ringbuffer.h>

Inheritance diagram for CRingBufferBase:
[legend]
Collaboration diagram for CRingBufferBase:
[legend]

Classes

class  CItem
 

Public Types

enum  { FLAG_RECYCLE = 1 }
 

Public Member Functions

void Clear ()
 

Static Public Attributes

static constexpr int ITEM_SIZE = sizeof(CItem)
 

Protected Member Functions

void * Allocate (int Size)
 
void * Prev (void *pCurrent)
 
void * Next (void *pCurrent)
 
void * First ()
 
void * Last ()
 
void Init (void *pMemory, int Size, int Flags)
 
int PopFirst ()
 
void SetPopCallback (const std::function< void(void *pCurrent)> PopCallback)
 

Private Member Functions

CItemNextBlock (CItem *pItem)
 
CItemPrevBlock (CItem *pItem)
 
CItemMergeBack (CItem *pItem)
 

Private Attributes

CItemm_pBuffer
 
CItemm_pProduce
 
CItemm_pConsume
 
CItemm_pFirst
 
CItemm_pLast
 
int m_Size
 
int m_Flags
 
std::function< void(void *pCurrent)> m_PopCallback = nullptr
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAG_RECYCLE 

Member Function Documentation

◆ Allocate()

void * CRingBufferBase::Allocate ( int  Size)
protected

◆ Clear()

void CRingBufferBase::Clear ( )

◆ First()

void * CRingBufferBase::First ( )
protected

◆ Init()

void CRingBufferBase::Init ( void *  pMemory,
int  Size,
int  Flags 
)
protected

◆ Last()

void * CRingBufferBase::Last ( )
protected

◆ MergeBack()

CRingBufferBase::CItem * CRingBufferBase::MergeBack ( CItem pItem)
private

◆ Next()

void * CRingBufferBase::Next ( void *  pCurrent)
protected

◆ NextBlock()

CRingBufferBase::CItem * CRingBufferBase::NextBlock ( CItem pItem)
private

◆ PopFirst()

int CRingBufferBase::PopFirst ( )
protected

◆ Prev()

void * CRingBufferBase::Prev ( void *  pCurrent)
protected

◆ PrevBlock()

CRingBufferBase::CItem * CRingBufferBase::PrevBlock ( CItem pItem)
private

◆ SetPopCallback()

void CRingBufferBase::SetPopCallback ( const std::function< void(void *pCurrent)>  PopCallback)
protected

Member Data Documentation

◆ ITEM_SIZE

constexpr int CRingBufferBase::ITEM_SIZE = sizeof(CItem)
staticconstexpr

◆ m_Flags

int CRingBufferBase::m_Flags
private

◆ m_pBuffer

CItem* CRingBufferBase::m_pBuffer
private

◆ m_pConsume

CItem* CRingBufferBase::m_pConsume
private

◆ m_pFirst

CItem* CRingBufferBase::m_pFirst
private

◆ m_pLast

CItem* CRingBufferBase::m_pLast
private

◆ m_PopCallback

std::function<void(void *pCurrent)> CRingBufferBase::m_PopCallback = nullptr
private

◆ m_pProduce

CItem* CRingBufferBase::m_pProduce
private

◆ m_Size

int CRingBufferBase::m_Size
private

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