|
HDK
|
#include <NET_CircularBuffer.h>
Classes | |
| class | base_iterator |
Public Types | |
| using | index_t = exint |
| using | range_t = std::pair< T *, int > |
| using | const_range_t = std::pair< const T *, int > |
| using | iterator = base_iterator< T > |
| using | const_iterator = base_iterator< const T > |
Public Member Functions | |
| NET_CircularBuffer () | |
| T & | front () |
| The first element in the buffer. Undefined behaviour if the buffer is empty. More... | |
| T & | back () |
| The last element in the buffer. Undefined behaviour if the buffer is empty. More... | |
| const T & | front () const |
| The first element in the buffer. Undefined behaviour if the buffer is empty. More... | |
| const T & | back () const |
| The last element in the buffer. Undefined behaviour if the buffer is empty. More... | |
| iterator | begin () |
| The begin iterator for the buffer. More... | |
| iterator | end () |
| The end iterator for the buffer. More... | |
| const_iterator | begin () const |
| The begin const iterator for the buffer. More... | |
| const_iterator | end () const |
| The end const iterator for the buffer. More... | |
| T & | operator[] (int index) |
| Retrieve element at provided index. More... | |
| const T & | operator[] (int index) const |
| Retrieve element at provided index. More... | |
| void | push (const T &data) |
| Place a single element onto the back of the buffer. More... | |
| void | push (const T *data, exint count) |
| Place an array of elements onto the back of the buffer. More... | |
| T | pop () |
| Remove a single element from the front of the buffer. More... | |
| void | pop (int count) |
| Remove multiple elements from the front of the buffer. More... | |
| bool | isFull () const |
| Is the buffer currently full. More... | |
| bool | isEmpty () const |
| Is the buffer currently empty. More... | |
| exint | size () const |
| The number of elements currently stored in the buffer. More... | |
| int | entries () const |
| The number of elements currently stored in the buffer. More... | |
| exint | capacity () const |
| The current capacity of the buffer. More... | |
| exint | maxSize () const |
| The absolute maximum size of the buffer. Use size() if you need to know the current size of the buffer. More... | |
| range_t | arrayOne () |
| A circular buffer can wrap around in memory. This is the first array of continious memory. If the buffer is not currently wrapped then the entire buffer will be present in this array and the second array will be empty. More... | |
| range_t | arrayTwo () |
| Holds information about the second array of contigous data. See arrayOne() for further details. More... | |
| const_range_t | arrayOne () const |
| Const variant of the arrayOne(). More... | |
| const_range_t | arrayTwo () const |
| Const variant of the arrayTwo(). More... | |
| void | clear () |
| Completely clear the buffer. This will free any currently allocated data. More... | |
| void | debug () const |
| Printout debug information about this buffer. More... | |
Definition at line 28 of file NET_CircularBuffer.h.
| using NET_CircularBuffer< T >::const_iterator = base_iterator<const T> |
Definition at line 156 of file NET_CircularBuffer.h.
| using NET_CircularBuffer< T >::const_range_t = std::pair<const T*, int> |
Definition at line 33 of file NET_CircularBuffer.h.
| using NET_CircularBuffer< T >::index_t = exint |
Definition at line 31 of file NET_CircularBuffer.h.
| using NET_CircularBuffer< T >::iterator = base_iterator<T> |
Definition at line 155 of file NET_CircularBuffer.h.
| using NET_CircularBuffer< T >::range_t = std::pair<T*, int> |
Definition at line 32 of file NET_CircularBuffer.h.
|
inline |
Definition at line 35 of file NET_CircularBuffer.h.
|
inline |
A circular buffer can wrap around in memory. This is the first array of continious memory. If the buffer is not currently wrapped then the entire buffer will be present in this array and the second array will be empty.
Definition at line 333 of file NET_CircularBuffer.h.
|
inline |
Const variant of the arrayOne().
Definition at line 361 of file NET_CircularBuffer.h.
|
inline |
Holds information about the second array of contigous data. See arrayOne() for further details.
Definition at line 348 of file NET_CircularBuffer.h.
|
inline |
Const variant of the arrayTwo().
Definition at line 368 of file NET_CircularBuffer.h.
|
inline |
The last element in the buffer. Undefined behaviour if the buffer is empty.
Definition at line 168 of file NET_CircularBuffer.h.
|
inline |
The last element in the buffer. Undefined behaviour if the buffer is empty.
Definition at line 178 of file NET_CircularBuffer.h.
|
inline |
The begin iterator for the buffer.
Definition at line 183 of file NET_CircularBuffer.h.
|
inline |
The begin const iterator for the buffer.
Definition at line 191 of file NET_CircularBuffer.h.
|
inline |
The current capacity of the buffer.
Definition at line 319 of file NET_CircularBuffer.h.
|
inline |
Completely clear the buffer. This will free any currently allocated data.
Definition at line 374 of file NET_CircularBuffer.h.
|
inline |
Printout debug information about this buffer.
Definition at line 382 of file NET_CircularBuffer.h.
|
inline |
The end iterator for the buffer.
Definition at line 187 of file NET_CircularBuffer.h.
|
inline |
The end const iterator for the buffer.
Definition at line 198 of file NET_CircularBuffer.h.
|
inline |
The number of elements currently stored in the buffer.
Definition at line 315 of file NET_CircularBuffer.h.
|
inline |
The first element in the buffer. Undefined behaviour if the buffer is empty.
Definition at line 162 of file NET_CircularBuffer.h.
|
inline |
The first element in the buffer. Undefined behaviour if the buffer is empty.
Definition at line 173 of file NET_CircularBuffer.h.
|
inline |
Is the buffer currently empty.
Definition at line 302 of file NET_CircularBuffer.h.
|
inline |
Is the buffer currently full.
Definition at line 298 of file NET_CircularBuffer.h.
|
inline |
The absolute maximum size of the buffer. Use size() if you need to know the current size of the buffer.
Definition at line 324 of file NET_CircularBuffer.h.
|
inline |
Retrieve element at provided index.
| index | The index to retrieve the element at. |
Definition at line 207 of file NET_CircularBuffer.h.
|
inline |
Retrieve element at provided index.
| index | The index to retrieve the element at. |
Definition at line 218 of file NET_CircularBuffer.h.
|
inline |
Remove a single element from the front of the buffer.
Definition at line 279 of file NET_CircularBuffer.h.
|
inline |
Remove multiple elements from the front of the buffer.
| count | The number of elements to remove. |
Definition at line 289 of file NET_CircularBuffer.h.
|
inline |
Place a single element onto the back of the buffer.
| data |
Definition at line 228 of file NET_CircularBuffer.h.
|
inline |
Place an array of elements onto the back of the buffer.
| data | The array of elements to add to the buffer. |
| count | The number of elements in the array to add. |
Definition at line 236 of file NET_CircularBuffer.h.
|
inline |
The number of elements currently stored in the buffer.
Definition at line 306 of file NET_CircularBuffer.h.