Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cQueueBase Class Reference

#include <cQueue.h>

Inheritance diagram for Gray::cQueueBase:
Gray::cQueueRead< BYTE > Gray::cQueueRead< TYPE > Gray::cQueueStatic< TYPE, _QTY > Gray::cQueueRW< TYPE > Gray::cQueueRW< BYTE > Gray::cQueueDyn< BYTE > Gray::cQueueDyn< TYPE > Gray::cQueueDyn< TYPE > Gray::cStreamStatic Gray::cQueueBytes Gray::cQueueChunked< TYPE >::cQueueChunk Gray::cStreamStringA Gray::cStreamQueue Gray::cStreamStackInp Gray::cStreamStackOut GrayLib::cThreadQueue Gray::cStreamTextReader GrayCodec::cAudioAACDec GrayCodec::cAudioMP3Dec GrayCodec::cAudioOpusDec GrayLib::cAudioADPCMDec GrayLib::cStreamBZ2Decompress GrayLib::cStreamCipherDec GrayLib::cStreamZLibDecompress Gray::cStreamStackPackets GrayCodec::cAudioAACEnc GrayCodec::cAudioMP3Enc GrayCodec::cAudioOpusEnc GrayLib::cAudioADPCMEnc GrayLib::cStreamBZ2Compress GrayLib::cStreamCipherEnc GrayLib::cStreamZLibCompress

Public Member Functions

 cQueueBase (ITERATE_t iReadLast=0, ITERATE_t iWriteLast=0) noexcept
 
void InitQ (ITERATE_t iReadLast=0, ITERATE_t iWriteLast=0) noexcept
 
bool isEmptyQ () const noexcept
 
void EmptyQ () noexcept
 
ITERATE_t get_ReadIndex () const noexcept
 
ITERATE_t get_WriteIndex () const noexcept
 
ITERATE_t get_ReadQty () const
 
void AdvanceRead (ITERATE_t iCount=1)
 
STREAM_SEEKRET_t SeekQ (STREAM_OFFSET_t iOffset, SEEK_ORIGIN_TYPE eSeekOrigin=SEEK_Set)
 

Protected Attributes

ITERATE_t m_iReadLast
 old items removed/read from here. More...
 
ITERATE_t m_iWriteLast
 new items added/written here. end of read. More...
 

Friends

class cQueueTests
 

Detailed Description

All types of queues have this in common. read index and write index. This might be grow-able, static vs dynamic memory, fixed size, wrappable, etc. Base class for all Queues.

Constructor & Destructor Documentation

◆ cQueueBase()

Gray::cQueueBase::cQueueBase ( ITERATE_t  iReadLast = 0,
ITERATE_t  iWriteLast = 0 
)
inlinenoexcept

Member Function Documentation

◆ AdvanceRead()

void Gray::cQueueBase::AdvanceRead ( ITERATE_t  iCount = 1)
inline

◆ EmptyQ()

void Gray::cQueueBase::EmptyQ ( )
inlinenoexcept

◆ get_ReadIndex()

ITERATE_t Gray::cQueueBase::get_ReadIndex ( ) const
inlinenoexcept
Returns
Next read position.

◆ get_ReadQty()

ITERATE_t Gray::cQueueBase::get_ReadQty ( ) const
inline

How much data is avail to read? // Assume will not will wrap to fill.

Returns
Quantity of TYPE COUNT_t

◆ get_WriteIndex()

ITERATE_t Gray::cQueueBase::get_WriteIndex ( ) const
inlinenoexcept
Returns
Next write position.

◆ InitQ()

void Gray::cQueueBase::InitQ ( ITERATE_t  iReadLast = 0,
ITERATE_t  iWriteLast = 0 
)
inlinenoexcept

◆ isEmptyQ()

bool Gray::cQueueBase::isEmptyQ ( ) const
inlinenoexcept

◆ SeekQ()

STREAM_SEEKRET_t Gray::cQueueBase::SeekQ ( STREAM_OFFSET_t  iOffset,
SEEK_ORIGIN_TYPE  eSeekOrigin = SEEK_Set 
)

eSeekOrigin = SEEK_CUR, etc move the current read start location.

Returns
the New stream/file position, <0=FAILED = INVALID_SET_FILE_POINTER

Friends And Related Function Documentation

◆ cQueueTests

friend class cQueueTests
friend

Member Data Documentation

◆ m_iReadLast

ITERATE_t Gray::cQueueBase::m_iReadLast
protected

old items removed/read from here.

◆ m_iWriteLast

ITERATE_t Gray::cQueueBase::m_iWriteLast
protected

new items added/written here. end of read.


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