Non allocating buffer class holds a maximum of given entries and allows an endless insert by overrinding previous elements in the buffer.
More...
|
|
iterator | begin () |
| |
|
iterator | end () |
| |
|
iterator | begin () const |
| |
|
iterator | end () const |
| |
|
size_t | size () const |
| |
|
constexpr size_t | capacity () const |
| |
|
bool | empty () const |
| |
| const TYPE & | front () const |
| | Access to the first element in the buffer. More...
|
| |
| TYPE & | front () |
| | Access to the first element in the buffer. More...
|
| |
| const TYPE & | back () const |
| | Access to the last element in the buffer. More...
|
| |
| TYPE & | back () |
| | Access to the last element in the buffer. More...
|
| |
| void | clear () |
| | Clears the whole ring buffer. More...
|
| |
|
void | push_back (const TYPE &x) |
| | Pushes an element to the end of the buffer.
|
| |
| template<typename... _Args> |
| void | emplace_back (_Args &&...args) |
| | Pushes an elements to the end of the buffer. More...
|
| |
|
void | pop () |
| | Removes element from the beginning of the buffer.
|
| |
|
void | erase_back (const size_t n) |
| | Erase the given amount of elements from the end of the buffer.
|
| |
|
void | erase_front (const size_t n) |
| | Erase the given amount of elements from the beginning of the buffer.
|
| |
|
TYPE & | operator[] (size_t i) |
| |
|
const TYPE & | operator[] (size_t i) const |
| |
template<typename TYPE, size_t SIZE = 64u>
class TwinE::RingBuffer< TYPE, SIZE >
Non allocating buffer class holds a maximum of given entries and allows an endless insert by overrinding previous elements in the buffer.