Skip to content

Class daisy::FIFOBase

template <typename T>

ClassList > daisy > FIFOBase

More...

  • #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 [½]

inline T & daisy::FIFOBase::Back () 

returns a reference to the last element


function Back [2/2]

inline const  T & daisy::FIFOBase::Back () const

returns a reference to the last element


function Clear

inline void daisy::FIFOBase::Clear () 

Removes all elements from the FIFO


function Contains

inline bool daisy::FIFOBase::Contains (
    const  T & element
) 

Returns true if the buffer contains an element equal to the provided value


function CountEqualTo

inline size_t daisy::FIFOBase::CountEqualTo (
    const  T & element
) 

Returns the number of elements in the buffer that are equal to the provided value


function Front [½]

inline T & daisy::FIFOBase::Front () 

returns a copy of the first element


function Front [2/2]

inline const  T & daisy::FIFOBase::Front () const

returns a reference to the first element


function GetCapacity

inline size_t daisy::FIFOBase::GetCapacity () const

returns the total capacity


function GetNumElements

inline size_t daisy::FIFOBase::GetNumElements () const

returns the number of elements in the buffer


function Insert

inline bool daisy::FIFOBase::Insert (
    size_t idx,
    const  T & element
) 

inserts an element "idx" positions behind the first element and returns true if successful


function IsEmpty

inline bool daisy::FIFOBase::IsEmpty () const

returns true, if the buffer is empty


function IsFull

inline bool daisy::FIFOBase::IsFull () const

returns true, if the buffer is Full


function PopFront

inline T daisy::FIFOBase::PopFront () 

removes and returns an element from the front of the buffer


function PushBack [½]

inline bool daisy::FIFOBase::PushBack (
    const  T & elementToAdd
) 

Adds an element to the back of the buffer, returning true on success


function PushBack [2/2]

inline int daisy::FIFOBase::PushBack (
    std::initializer_list< T > valuesToAdd
) 

Adds multiple elements and returns the number of elements that were added


function Remove

inline bool daisy::FIFOBase::Remove (
    size_t idx
) 

removes the element "idx" positions behind the first element and returns true if successful


function RemoveAllEqualTo

inline size_t daisy::FIFOBase::RemoveAllEqualTo (
    const  T & element
) 

removes all elements from the buffer for which (buffer(index) == element) returns true and returns the number of elements that were removed.


function operator=

inline FIFOBase < T > & daisy::FIFOBase::operator= (
    const  FIFOBase < T > & other
) 

Copies all elements from another FIFO


function operator[]

inline T & daisy::FIFOBase::operator[] (
    size_t idx
) 

returns the element "idx" positions behind the first element


function operator[]

inline const  T & daisy::FIFOBase::operator[] (
    size_t idx
) const

returns the element "idx" positions behind the first element


function ~FIFOBase

inline daisy::FIFOBase::~FIFOBase () 

Protected Functions Documentation

function FIFOBase [⅓]

inline daisy::FIFOBase::FIFOBase (
    T * buffer,
    size_t bufferSize
) 

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