Class daisy::FIFOBase¶
#include <FIFO.h>
Inherited by the following classes: daisy::FIFO, daisy::FIFO, daisy::FIFO
Public Functions¶
Type | Name |
---|---|
T & | Back () |
const T & | Back () const |
void | Clear () |
bool | Contains (const T & element) |
size_t | CountEqualTo (const T & element) |
T & | Front () |
const T & | Front () const |
size_t | GetCapacity () const |
size_t | GetNumElements () const |
bool | Insert (size_t idx, const T & element) |
bool | IsEmpty () const |
bool | IsFull () const |
T | PopFront () |
bool | PushBack (const T & elementToAdd) |
int | PushBack (std::initializer_list< T > valuesToAdd) |
bool | Remove (size_t idx) |
size_t | RemoveAllEqualTo (const T & element) |
FIFOBase< T > & | operator= (const FIFOBase< T > & other) |
T & | operator[] (size_t idx) |
const T & | operator[] (size_t idx) const |
~FIFOBase () |
Protected Functions¶
Type | Name |
---|---|
FIFOBase (T * buffer, size_t bufferSize) |
|
FIFOBase (T * buffer, size_t bufferSize, std::initializer_list< T > valuesToAdd) |
Detailed Description¶
Capacity-independent base class for FIFO. Use FIFO instead.
Public Functions Documentation¶
function Back [½]¶
returns a reference to the last element
function Back [2/2]¶
returns a reference to the last element
function Clear¶
Removes all elements from the FIFO
function Contains¶
Returns true if the buffer contains an element equal to the provided value
function CountEqualTo¶
Returns the number of elements in the buffer that are equal to the provided value
function Front [½]¶
returns a copy of the first element
function Front [2/2]¶
returns a reference to the first element
function GetCapacity¶
returns the total capacity
function GetNumElements¶
returns the number of elements in the buffer
function Insert¶
inserts an element "idx" positions behind the first element and returns true if successful
function IsEmpty¶
returns true, if the buffer is empty
function IsFull¶
returns true, if the buffer is Full
function PopFront¶
removes and returns an element from the front of the buffer
function PushBack [½]¶
Adds an element to the back of the buffer, returning true on success
function PushBack [2/2]¶
Adds multiple elements and returns the number of elements that were added
function Remove¶
removes the element "idx" positions behind the first element and returns true if successful
function RemoveAllEqualTo¶
removes all elements from the buffer for which (buffer(index) == element) returns true and returns the number of elements that were removed.
function operator=¶
Copies all elements from another FIFO
function operator[]¶
returns the element "idx" positions behind the first element
function operator[]¶
returns the element "idx" positions behind the first element
function ~FIFOBase¶
Protected Functions Documentation¶
function FIFOBase [⅓]¶
function FIFOBase [⅔]¶
inline daisy::FIFOBase::FIFOBase (
T * buffer,
size_t bufferSize,
std::initializer_list< T > valuesToAdd
)
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/FIFO.h