WPILibC++ 2023.4.3-108-ge5452e3
|
This is a simple circular buffer so we don't need to "bucket brigade" copy old values. More...
#include <wpi/static_circular_buffer.h>
Classes | |
class | const_iterator |
class | iterator |
Public Member Functions | |
iterator | begin () |
Returns begin iterator. More... | |
iterator | end () |
Returns end iterator. More... | |
const_iterator | begin () const |
Returns begin iterator. More... | |
const_iterator | end () const |
Returns end iterator. More... | |
const_iterator | cbegin () const |
Returns begin iterator. More... | |
const_iterator | cend () const |
Returns end iterator. More... | |
size_t | size () const |
Returns number of elements in buffer. More... | |
T & | front () |
Returns value at front of buffer. More... | |
const T & | front () const |
Returns value at front of buffer. More... | |
T & | back () |
Returns value at back of buffer. More... | |
const T & | back () const |
Returns value at back of buffer. More... | |
void | push_front (T value) |
Push a new value onto the front of the buffer. More... | |
void | push_back (T value) |
Push a new value onto the back of the buffer. More... | |
template<class... Args> | |
void | emplace_front (Args &&... args) |
Push a new value onto the front of the buffer that is constructed with the provided constructor arguments. More... | |
template<class... Args> | |
void | emplace_back (Args &&... args) |
Push a new value onto the back of the buffer that is constructed with the provided constructor arguments. More... | |
T | pop_front () |
Pop value at front of buffer. More... | |
T | pop_back () |
Pop value at back of buffer. More... | |
void | reset () |
Empties internal buffer. More... | |
T & | operator[] (size_t index) |
const T & | operator[] (size_t index) const |
This is a simple circular buffer so we don't need to "bucket brigade" copy old values.
|
inline |
Returns value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inline |
Returns value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inline |
Returns begin iterator.
|
inline |
Returns begin iterator.
|
inline |
Returns begin iterator.
|
inline |
Returns end iterator.
|
inline |
Push a new value onto the back of the buffer that is constructed with the provided constructor arguments.
The value at the front is overwritten if the buffer is full.
|
inline |
Push a new value onto the front of the buffer that is constructed with the provided constructor arguments.
The value at the back is overwritten if the buffer is full.
|
inline |
Returns end iterator.
|
inline |
Returns end iterator.
|
inline |
Returns value at front of buffer.
|
inline |
Returns value at front of buffer.
|
inline |
|
inline |
|
inline |
Pop value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inline |
Pop value at front of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inline |
Push a new value onto the back of the buffer.
The value at the front is overwritten if the buffer is full.
|
inline |
Push a new value onto the front of the buffer.
The value at the back is overwritten if the buffer is full.
|
inline |
Empties internal buffer.
|
inline |
Returns number of elements in buffer.