A minimal implementation of circular buffer class. More...
#include <circular_buffer.hpp>
Public Member Functions | |
circular_buffer (const size_type n) | |
reference | next () |
Get next element in the circular buffer. More... | |
void | push_back (const value_type &item) |
Add new last element. More... | |
reference | front () |
Accesses the first element. More... | |
const_reference | front () const |
Accesses the first element. More... | |
reference | back () |
Accesses the last element. More... | |
const_reference | back () const |
Access the last element. More... | |
const_reference | operator[] (size_type i) const |
Accesses the element. More... | |
reference | operator[] (size_type i) |
Accesses the element. More... | |
void | clear () |
Removes all elements. More... | |
size_type | size () const |
Counts the number of elements. More... | |
A minimal implementation of circular buffer class.
|
inlineexplicit |
|
inline |
Accesses the last element.
|
inline |
Access the last element.
|
inline |
Removes all elements.
|
inline |
Accesses the first element.
|
inline |
Accesses the first element.
|
inline |
Get next element in the circular buffer.
|
inline |
Accesses the element.
|
inline |
Accesses the element.
|
inline |
Add new last element.
|
inline |
Counts the number of elements.