Fixed-capacity FIFO with history, for time-stepping. More...
#include <cl_ShiftRegister.hpp>
Public Member Functions | |
| ShiftRegister (const size_t aCapacity) | |
| ShiftRegister (const size_t aCapacity, const T &aInitValue) | |
| ShiftRegister (const std::initializer_list< T > &aInitList) | |
| ShiftRegister (const ShiftRegister &aOther) | |
| ShiftRegister (ShiftRegister &&aOther) noexcept | |
| ShiftRegister & | operator= (const ShiftRegister &aOther) |
| ShiftRegister & | operator= (ShiftRegister &&aOther) noexcept |
| ~ShiftRegister () | |
| void | push (T &aValue) |
| void | push (const T &aValue) |
| void | revert () |
| T & | operator() (const uint aIndex) |
| Access element by index (0 = newest, N-1 = oldest). | |
| const T & | operator() (const uint aIndex) const |
| Access element by index (const version). | |
| auto | size () const -> decltype(mSize) |
| Get current number of elements. | |
| auto | capacity () const -> decltype(mCapacity) |
| Get maximum capacity. | |
| bool | empty () const |
| Check if the register is empty. | |
| bool | full () const |
| Check if the register is full. | |
| void | clear () |
| Clear all elements. | |
| T * | data () |
| Get raw pointer to data array. | |
| const T * | data () const |
| Get raw pointer to data array (const version). | |
| T * | begin () |
| T * | end () |
| const T * | begin () const |
| const T * | end () const |
| void | fill (const T aValue) |
| void | reserve (const index_t aCapacity) |
| void | free () |
Fixed-capacity FIFO with history, for time-stepping.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
Get maximum capacity.
|
inline |
Clear all elements.
|
inline |
Get raw pointer to data array.
|
inline |
Get raw pointer to data array (const version).
|
inline |
Check if the register is empty.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check if the register is full.
|
inline |
Access element by index (0 = newest, N-1 = oldest).
|
inline |
Access element by index (const version).
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get current number of elements.