WPILibC++ 2025.2.1
|
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 | |
constexpr iterator | begin () |
Returns begin iterator. | |
constexpr iterator | end () |
Returns end iterator. | |
constexpr const_iterator | begin () const |
Returns begin iterator. | |
constexpr const_iterator | end () const |
Returns end iterator. | |
constexpr const_iterator | cbegin () const |
Returns begin iterator. | |
constexpr const_iterator | cend () const |
Returns end iterator. | |
constexpr size_t | size () const |
Returns number of elements in buffer. | |
constexpr T & | front () |
Returns value at front of buffer. | |
constexpr const T & | front () const |
Returns value at front of buffer. | |
constexpr T & | back () |
Returns value at back of buffer. | |
constexpr const T & | back () const |
Returns value at back of buffer. | |
constexpr void | push_front (T value) |
Push a new value onto the front of the buffer. | |
constexpr void | push_back (T value) |
Push a new value onto the back of the buffer. | |
template<class... Args> | |
constexpr void | emplace_front (Args &&... args) |
Push a new value onto the front of the buffer that is constructed with the provided constructor arguments. | |
template<class... Args> | |
constexpr void | emplace_back (Args &&... args) |
Push a new value onto the back of the buffer that is constructed with the provided constructor arguments. | |
constexpr T | pop_front () |
Pop value at front of buffer. | |
constexpr T | pop_back () |
Pop value at back of buffer. | |
constexpr void | reset () |
Empties internal buffer. | |
constexpr T & | operator[] (size_t index) |
constexpr const T & | operator[] (size_t index) const |
This is a simple circular buffer so we don't need to "bucket brigade" copy old values.
T | Buffer element type. |
N | Maximum number of buffer elements. |
|
inlineconstexpr |
Returns value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inlineconstexpr |
Returns value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inlineconstexpr |
Returns begin iterator.
|
inlineconstexpr |
Returns begin iterator.
|
inlineconstexpr |
Returns begin iterator.
|
inlineconstexpr |
Returns end iterator.
|
inlineconstexpr |
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.
|
inlineconstexpr |
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.
|
inlineconstexpr |
Returns end iterator.
|
inlineconstexpr |
Returns end iterator.
|
inlineconstexpr |
Returns value at front of buffer.
|
inlineconstexpr |
Returns value at front of buffer.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Pop value at back of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inlineconstexpr |
Pop value at front of buffer.
If there are no elements in the buffer, calling this function results in undefined behavior.
|
inlineconstexpr |
Push a new value onto the back of the buffer.
The value at the front is overwritten if the buffer is full.
|
inlineconstexpr |
Push a new value onto the front of the buffer.
The value at the back is overwritten if the buffer is full.
|
inlineconstexpr |
Empties internal buffer.
|
inlineconstexpr |
Returns number of elements in buffer.