Class daisy::StackBase¶
#include <Stack.h>
Inherited by the following classes: daisy::Stack, daisy::Stack, daisy::Stack
Public Functions¶
Type | Name |
---|---|
void | Clear () |
bool | Contains (const T & element) |
size_t | CountEqualTo (const T & element) |
size_t | GetCapacity () const |
size_t | GetNumElements () const |
bool | Insert (uint32_t idx, const T & item) |
bool | IsEmpty () const |
bool | IsFull () const |
T | PopBack () |
bool | PushBack (const T & elementToAdd) |
int | PushBack (std::initializer_list< T > valuesToAdd) |
bool | Remove (uint32_t idx) |
int | RemoveAllEqualTo (const T & element) |
StackBase< T > & | operator= (const StackBase< T > & other) |
T & | operator[] (uint32_t idx) |
const T & | operator[] (uint32_t idx) const |
~StackBase () |
Protected Functions¶
Type | Name |
---|---|
StackBase (T * buffer, size_t bufferSize) |
|
StackBase (T * buffer, size_t bufferSize, std::initializer_list< T > valuesToAdd) |
Detailed Description¶
Capacity-independent base class for Stack. Use Stack instead.
Public Functions Documentation¶
function Clear¶
clears the buffer
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 GetCapacity¶
returns the total capacity
function GetNumElements¶
returns the number of elements in the buffer
function Insert¶
adds a single element to the buffer and returns true if successfull
function IsEmpty¶
returns true, if the buffer is empty
function IsFull¶
returns true, if the buffer is Full
function PopBack¶
removes and returns an element from the back 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 a single element from the buffer and returns true if successfull
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 Stack
function operator[]¶
returns an element at the given index without checking for the index to be within range.
function operator[]¶
returns an element at the given index without checking for the index to be within range.
function ~StackBase¶
Protected Functions Documentation¶
function StackBase [½]¶
function StackBase [2/2]¶
inline daisy::StackBase::StackBase (
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/Stack.h