daisy::FIFOBase¶
#include <FIFO.h>
Inherited by daisy::FIFO< Event, 256 >, daisy::FIFO< daisy::MidiEvent, 256 >, daisy::FIFO< T, capacity >
Public Functions¶
Name | |
---|---|
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 Functions¶
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 operator=¶
Copies all elements from another FIFO
function ~FIFOBase¶
function Clear¶
Removes all elements from the FIFO
function PushBack¶
Adds an element to the back of the buffer, returning true on success
function PushBack¶
Adds multiple elements and returns the number of elements that were added
function Back¶
returns a reference to the last element
function Back¶
returns a reference to the last element
function PopFront¶
removes and returns an element from the front of the buffer
function Front¶
returns a copy of the first element
function Front¶
returns a reference to the first element
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 IsEmpty¶
returns true, if the buffer is empty
function IsFull¶
returns true, if the buffer is Full
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 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[]¶
returns the element "idx" positions behind the first element
function operator[]¶
returns the element "idx" positions behind the first element
function GetCapacity¶
returns the total capacity
Protected Functions Documentation¶
function FIFOBase¶
function FIFOBase¶
Updated on 2024-01-03 at 19:41:00 +0000