A simple FILO (stack) buffer with a fixed size (usefull when allocation on the heap is not an option
#include <Stack.h>
Public Member Functions | |
Stack () | |
Stack (std::initializer_list< T > valuesToAdd) | |
template<size_t otherCapacity> | |
Stack (const Stack< T, otherCapacity > &other) | |
template<size_t otherCapacity> | |
Stack< T, capacity > & | operator= (const Stack< T, otherCapacity > &other) |
Public Member Functions inherited from daisy::StackBase< T > | |
StackBase< T > & | operator= (const StackBase< T > &other) |
~StackBase () | |
bool | PushBack (const T &elementToAdd) |
int | PushBack (std::initializer_list< T > valuesToAdd) |
T | PopBack () |
void | Clear () |
T & | operator[] (uint32_t idx) |
const T & | operator[] (uint32_t idx) const |
bool | Remove (uint32_t idx) |
int | RemoveAllEqualTo (const T &element) |
bool | Insert (uint32_t idx, const T &item) |
bool | Contains (const T &element) |
size_t | CountEqualTo (const T &element) |
bool | IsEmpty () const |
bool | IsFull () const |
size_t | GetNumElements () const |
size_t | GetCapacity () const |
Additional Inherited Members | |
Protected Member Functions inherited from daisy::StackBase< T > | |
StackBase (T *buffer, size_t bufferSize) | |
StackBase (T *buffer, size_t bufferSize, std::initializer_list< T > valuesToAdd) | |
|
inline |
Creates an empty Stack
|
inlineexplicit |
Creates a Stack and adds a list of values
|
inline |
|
inline |
Copies all values from another Stack