#include <FIFO.h>
Public Member Functions | |
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 |
Protected Member Functions | |
FIFOBase (T *buffer, size_t bufferSize) | |
FIFOBase (T *buffer, size_t bufferSize, std::initializer_list< T > valuesToAdd) | |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
returns a reference to the last element
|
inline |
returns a reference to the last element
|
inline |
Removes all elements from the FIFO
|
inline |
Returns true if the buffer contains an element equal to the provided value
|
inline |
Returns the number of elements in the buffer that are equal to the provided value
|
inline |
returns a copy of the first element
|
inline |
returns a reference to the first element
|
inline |
returns the total capacity
|
inline |
returns the number of elements in the buffer
|
inline |
inserts an element "idx" positions behind the first element and returns true if successful
|
inline |
returns true, if the buffer is empty
|
inline |
returns true, if the buffer is Full
|
inline |
Copies all elements from another FIFO
|
inline |
returns the element "idx" positions behind the first element
|
inline |
returns the element "idx" positions behind the first element
|
inline |
removes and returns an element from the front of the buffer
|
inline |
Adds an element to the back of the buffer, returning true on success
|
inline |
Adds multiple elements and returns the number of elements that were added
|
inline |
removes the element "idx" positions behind the first element and returns true if successful
|
inline |
removes all elements from the buffer for which (buffer(index) == element) returns true and returns the number of elements that were removed.