![]() |
scire
Sadh's C++ Impromptu Routines Ensemble
|
array implementation of stack More...
#include <stack.hpp>
Public Member Functions | |
| StackCrate (SzType stackCapacity) | |
| initialize a StackCrate object and allocate array crate More... | |
| ~StackCrate () | |
| finalize a StackCrate object by deleting array crate More... | |
| SzType | Capacity () const |
| SzType | Size () const |
| number of elements contained in More... | |
| bool | Push (const Type &element) |
| Push a new element at the top of stack. More... | |
| bool | Pop () |
| Pop (remove/deduce) an element from the top. More... | |
| Type | Top () const |
| Access the top element of stack. More... | |
| bool | Add (const Type &element) |
| add an element More... | |
| bool | Deduce () |
| deduce one element More... | |
| Type | Peek () const |
| peek into next element contained in More... | |
| virtual bool | IsEmpty () const |
| check if empty More... | |
array implementation of stack
| scire::StackCrate< Type, SzType >::StackCrate | ( | SzType | stackCapacity | ) |
initialize a StackCrate object and allocate array crate
| scire::StackCrate< Type, SzType >::~StackCrate | ( | ) |
finalize a StackCrate object by deleting array crate
|
inlinevirtualinherited |
add an element
| element | element to be added as new element |
Implements scire::AContainer< Type, SzType >.
|
virtual |
Implements scire::ICrate< Type, SzType >.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
virtual |
Pop (remove/deduce) an element from the top.
Implements scire::AStack< Type, SzType >.
|
virtual |
Push a new element at the top of stack.
| element | element to push |
Implements scire::AStack< Type, SzType >.
|
virtual |
|
virtual |
Access the top element of stack.
Implements scire::AStack< Type, SzType >.