A simple FIFO ring buffer with a fixed size.
#include <FIFO.h>
Public Member Functions | |
FIFO () | |
FIFO (std::initializer_list< T > valuesToAdd) | |
template<size_t otherCapacity> | |
FIFO (const FIFO< T, otherCapacity > &other) | |
template<size_t otherCapacity> | |
FIFO< T, capacity > & | operator= (const FIFO< T, otherCapacity > &other) |
Public Member Functions inherited from daisy::FIFOBase< T > | |
FIFOBase< T > & | operator= (const FIFOBase< T > &other) |
~FIFOBase () | |
void | Clear () |
bool | PushBack (const T &elementToAdd) |
int | PushBack (std::initializer_list< T > valuesToAdd) |
T & | Back () |
const T & | Back () const |
T | PopFront () |
T & | Front () |
const T & | Front () const |
bool | Contains (const T &element) |
size_t | CountEqualTo (const T &element) |
bool | IsEmpty () const |
bool | IsFull () const |
size_t | GetNumElements () const |
bool | Insert (size_t idx, const T &element) |
bool | Remove (size_t idx) |
size_t | RemoveAllEqualTo (const T &element) |
T & | operator[] (size_t idx) |
const T & | operator[] (size_t idx) const |
size_t | GetCapacity () const |
Additional Inherited Members | |
Protected Member Functions inherited from daisy::FIFOBase< T > | |
FIFOBase (T *buffer, size_t bufferSize) | |
FIFOBase (T *buffer, size_t bufferSize, std::initializer_list< T > valuesToAdd) | |
|
inline |
Creates an empty FIFO
|
inlineexplicit |
Creates a FIFO and adds a list of values
|
inline |
|
inline |
Copies all values from another FIFO