#include <ixlib_ring_queue.hh>
Public Methods | |
ring_queue (TIndex capacity=0) | |
TSize | capacity () const |
Query the maximal capacity of the ring queue. More... | |
TSize | size () const |
Query the number of entries in the ring_queue. More... | |
TSize | pop (T *data, TSize maxcount=1) |
Retrieve maximally maxcount entries from the ring queue. More... | |
void | push (T *data, TSize count=1) |
Place count entries starting at data in the ring queue. More... | |
T * | popPointer (TSize &maxcount) |
Get a pointer where data may be read directly out of the ring_queue buffer. More... | |
void | popPointerCommit (TSize count) |
Inform the ring_queue that count entries have actually been read. More... | |
T * | pushPointer (TSize &maxcount) |
Get a pointer where data may be written directly into the ring_queue buffer. More... | |
void | pushPointerCommit (TSize count) |
Inform the ring_queue that count entries have actually been written. More... | |
void | allocate (TSize capacity) |
Reallocate the buffer, invalidate all current contents. More... |
The "Pointer" variants of the push and pop operations are guaranteed not to throw exceptions, making them the perfect choice for operations in other threads and other critical environments where standard library functionality is only available in a restricted way.
Definition at line 33 of file ixlib_ring_queue.hh.
|
Definition at line 40 of file ixlib_ring_queue.hh. |
|
Reallocate the buffer, invalidate all current contents.
Definition at line 84 of file ixlib_ring_queue.hh. |
|
Query the maximal capacity of the ring queue.
Definition at line 45 of file ixlib_ring_queue.hh. |
|
Retrieve maximally maxcount entries from the ring queue.
Definition at line 96 of file ixlib_ring_queue.hh. |
|
Get a pointer where data may be read directly out of the ring_queue buffer.
Definition at line 138 of file ixlib_ring_queue.hh. Referenced by pop().
|
|
Inform the ring_queue that count entries have actually been read.
Definition at line 150 of file ixlib_ring_queue.hh. Referenced by pop().
|
|
Place count entries starting at data in the ring queue.
Definition at line 116 of file ixlib_ring_queue.hh. |
|
Get a pointer where data may be written directly into the ring_queue buffer.
Definition at line 158 of file ixlib_ring_queue.hh. Referenced by push().
|
|
Inform the ring_queue that count entries have actually been written.
Definition at line 173 of file ixlib_ring_queue.hh. Referenced by push().
|
|
Query the number of entries in the ring_queue.
Definition at line 50 of file ixlib_ring_queue.hh. |