![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cQueue.h>
Public Member Functions | |
| cQueueRW () noexcept | |
| cQueueRW (TYPE *pData, ITERATE_t iDataAlloc, ITERATE_t iReadLast, ITERATE_t iWriteLast, ITERATE_t iAutoReadCommit=0) | |
| cQueueRW (const TYPE *pData, ITERATE_t iDataMax) | |
| ~cQueueRW () | |
| void | ReadCommitCheck () |
| ITERATE_t | get_AutoReadCommit () const |
| void | put_AutoReadCommit (ITERATE_t iAutoReadCommit=8 *1024) |
| void | put_ReadIndex (ITERATE_t iReadLo) |
| STREAM_SEEKRET_t | SeekQ (STREAM_OFFSET_t iOffset, SEEK_ORIGIN_TYPE eSeekOrigin=SEEK_Set) |
| HRESULT | ReadQty (TYPE *pData, ITERATE_t iDataMaxQty) |
| HRESULT | ReadX (void *pData, size_t nDataSize) |
| bool | isFullQ () const |
| ITERATE_t | get_WriteQty () const |
| TYPE * | get_WritePtr () const |
| HRESULT | WriteQty (const TYPE *pData, ITERATE_t iQtyMax) |
| HRESULT | WriteX (const void *pData, size_t nDataSize) |
| void | AdvanceWrite (ITERATE_t iCount=1) |
Public Member Functions inherited from Gray::cQueueRead< BYTE > | |
| cQueueRead (const BYTE *pData=nullptr, ITERATE_t iReadLast=0, ITERATE_t iWriteLast=0) noexcept | |
| ~cQueueRead () | |
| const BYTE * | get_ReadPtr () const |
| void | SetQueueRead (const BYTE *pData, ITERATE_t iReadLast=0, ITERATE_t iWriteLast=0) |
| BYTE | Read1 (void) |
| HRESULT | ReadPeek (BYTE *pData, ITERATE_t iDataMaxQty) |
| HRESULT | ReadQty (BYTE *pData, ITERATE_t iDataMaxQty) |
| void | ReadCommitNow () |
Public Member Functions inherited from Gray::cQueueBase | |
| 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 Member Functions | |
| void | WriteQN (const TYPE *pData, ITERATE_t iQtyMax) |
Protected Attributes | |
| ITERATE_t | m_iDataSizeAlloc |
| The max qty we can write into m_pData. Maybe NOT exactly same as m_pData true OS allocated size? More... | |
| ITERATE_t | m_iAutoReadCommit |
| Read data is destroyed once read more than this amount. make more room for writing. 0 = don't do this, just fail write if we run out of space. More... | |
Protected Attributes inherited from Gray::cQueueRead< BYTE > | |
| BYTE * | m_pData |
| NOT owned/managed block of memory I read from. not freed on destruct. More... | |
Protected Attributes inherited from Gray::cQueueBase | |
| ITERATE_t | m_iReadLast |
| old items removed/read from here. More... | |
| ITERATE_t | m_iWriteLast |
| new items added/written here. end of read. More... | |
Create an simple arbitrary queue of TYPE elements. can read and write.
|
inlinenoexcept |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Does NOT free m_pData memory.
|
inline |
paired with GetWritePrepared
|
inline |
|
inline |
get start of data i could write directly. contiguous
|
inline |
How much space is avail for write into buffer? (given the current m_iDataSizeAlloc allocation size)
|
inline |
|
inline |
For SetSeekSizeMin
|
inline |
Reset the read index back to some new place.
|
inline |
is it time to attempt to reclaim the space in the queue
|
inline |
Just read a block. like ReadX but for TYPE
|
inline |
bytes
|
inline |
move the current read start location.
|
inlineprotected |
Copy stuff into the Q ASSUME iQtyMax is safe size.
|
inline |
add iQty * TYPE data to the q. like WriteX but for TYPE
|
inline |
nDataSize = bytes NOT instances of TYPE
|
protected |
Read data is destroyed once read more than this amount. make more room for writing. 0 = don't do this, just fail write if we run out of space.
|
protected |
The max qty we can write into m_pData. Maybe NOT exactly same as m_pData true OS allocated size?