![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/DataStructures/StackBase.hpp>
Public Member Functions | |
| virtual const T & | at (FwSizeType index) const =0 |
| void | copyDataFrom (const StackBase< T > &stack) |
| Copy data from another stack. More... | |
| virtual Success | push (const T &e)=0 |
| Success | peek (T &e, FwSizeType index=0) const |
| virtual Success | pop (T &e)=0 |
Public Member Functions inherited from Fw::SizedContainer | |
| virtual void | clear ()=0 |
| Clear the container. More... | |
| virtual FwSizeType | getSize () const =0 |
| virtual FwSizeType | getCapacity () const =0 |
| bool | isEmpty () const |
| bool | isFull () const |
Protected Member Functions | |
| StackBase () | |
| Zero-argument constructor. More... | |
| virtual | ~StackBase ()=default |
| Destructor. More... | |
Protected Member Functions inherited from Fw::SizedContainer | |
| SizedContainer () | |
| Zero-argument constructor. More... | |
| virtual | ~SizedContainer ()=default |
| Destructor. More... | |
Definition at line 17 of file StackBase.hpp.
|
inlineprotected |
Zero-argument constructor.
Definition at line 33 of file StackBase.hpp.
|
protectedvirtualdefault |
Destructor.
|
pure virtual |
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 |
Implemented in Fw::ExternalStack< T >, Fw::ExternalStack< Index >, and Fw::Stack< T, C >.
|
inline |
Copy data from another stack.
| stack | The stack |
Definition at line 62 of file StackBase.hpp.
|
inline |
Peek an item at an index Indices go from left to right in the range [0, size)
| e | The item (output) |
| index | The index (input) |
Definition at line 83 of file StackBase.hpp.
|
pure virtual |
Pop an item (remove from the right)
| e | The item (output) |
Implemented in Fw::ExternalStack< T >, Fw::ExternalStack< Index >, and Fw::Stack< T, C >.
|
pure virtual |
Push an item (add to the right)
| e | The item (output) |
Implemented in Fw::ExternalStack< T >, Fw::ExternalStack< Index >, and Fw::Stack< T, C >.