![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/DataStructures/ExternalStack.hpp>
Public Member Functions | |
ExternalStack ()=default | |
Zero-argument constructor. More... | |
ExternalStack (T *items, FwSizeType capacity) | |
Constructor providing typed backing storage. More... | |
ExternalStack (ByteArray data, FwSizeType capacity) | |
Constructor providing untyped backing storage. More... | |
ExternalStack (const ExternalStack< T > &stack) | |
Copy constructor. More... | |
~ExternalStack () override=default | |
Destructor. More... | |
ExternalStack< T > & | operator= (const ExternalStack< T > &stack) |
operator= More... | |
void | clear () override |
Clear the stack. More... | |
void | setStorage (T *items, FwSizeType capacity) |
Set the storage (typed data) More... | |
void | setStorage (ByteArray data, FwSizeType capacity) |
Set the storage (untyped data) More... | |
Success | push (const T &e) override |
const T & | at (FwSizeType index) const override |
Success | pop (T &e) override |
FwSizeType | getSize () const override |
FwSizeType | getCapacity () const override |
![]() | |
void | copyDataFrom (const StackBase< T > &stack) |
Copy data from another stack. More... | |
Success | peek (T &e, FwSizeType index=0) const |
![]() | |
bool | isEmpty () const |
bool | isFull () const |
Static Public Member Functions | |
static constexpr U8 | getByteArrayAlignment () |
static constexpr FwSizeType | getByteArraySize (FwSizeType capacity) |
Friends | |
template<typename TT > | |
class | ExternalStackTester |
Additional Inherited Members | |
![]() | |
StackBase () | |
Zero-argument constructor. More... | |
virtual | ~StackBase ()=default |
Destructor. More... | |
![]() | |
SizedContainer () | |
Zero-argument constructor. More... | |
virtual | ~SizedContainer ()=default |
Destructor. More... | |
Definition at line 17 of file ExternalStack.hpp.
|
default |
Zero-argument constructor.
|
inline |
Constructor providing typed backing storage.
items | The items |
capacity | The capacity |
Definition at line 34 of file ExternalStack.hpp.
|
inline |
Constructor providing untyped backing storage.
data | The data |
capacity | The capacity |
Definition at line 42 of file ExternalStack.hpp.
|
inline |
Copy constructor.
Definition at line 50 of file ExternalStack.hpp.
|
overridedefault |
Destructor.
|
inlineoverridevirtual |
Get an item at an index. Index 0 is the rightmost (latest) element in the stack. Increasing indices go from right to left. Fails an assertion if the index is out of range.
index | The index |
Implements Fw::StackBase< T >.
Definition at line 106 of file ExternalStack.hpp.
|
inlineoverridevirtual |
|
inlinestatic |
Get the alignment of the storage for an ExternalStack
Definition at line 141 of file ExternalStack.hpp.
|
inlinestatic |
Get the size of the storage for an ExternalStack of the specified capacity, as a byte array
capacity | The capacity |
Definition at line 146 of file ExternalStack.hpp.
|
inlineoverridevirtual |
Get the capacity (maximum number of items stored in the stack)
Implements Fw::SizedContainer.
Definition at line 132 of file ExternalStack.hpp.
|
inlineoverridevirtual |
Get the size (number of items stored in the stack)
Implements Fw::SizedContainer.
Definition at line 128 of file ExternalStack.hpp.
|
inline |
operator=
Definition at line 61 of file ExternalStack.hpp.
|
inlineoverridevirtual |
Pop an element (remove from the right)
e | The element (output) |
Implements Fw::StackBase< T >.
Definition at line 115 of file ExternalStack.hpp.
|
inlineoverridevirtual |
Push an element (push on the right)
e | The element (output) |
Implements Fw::StackBase< T >.
Definition at line 90 of file ExternalStack.hpp.
|
inline |
Set the storage (typed data)
items | The items |
capacity | The capacity |
Definition at line 73 of file ExternalStack.hpp.
|
inline |
Set the storage (untyped data)
data | The data |
capacity | The capacity |
Definition at line 81 of file ExternalStack.hpp.
|
friend |
Definition at line 23 of file ExternalStack.hpp.