Data Structures in C++
|
Abstract stack interface. More...
#include <Stack.hpp>
Public Member Functions | |
std::string | getName () |
Provides the name of the data structure as a string representation. More... | |
virtual void | push (T val)=0 |
Add an element to the top of the stack. More... | |
virtual T | pop ()=0 |
Remove an element from the top of the stack. More... | |
virtual T | peek ()=0 |
See the value from the top of the stack, without removing it. More... | |
![]() | |
virtual int | getSize ()=0 |
Outputs the number of elements stored in the structure. More... | |
virtual bool | isEmpty ()=0 |
Check whether the structure is empty. More... | |
virtual bool | isFull ()=0 |
Check whether the structure is full. More... | |
Abstract stack interface.
T | The type of object the data structure will contain |
|
inlinevirtual |
Provides the name of the data structure as a string representation.
Implements DataStructure.
Reimplemented in StaticStack< T >.
|
pure virtual |
See the value from the top of the stack, without removing it.
Implemented in StaticStack< T >, and DynamicStack< T >.
|
pure virtual |
Remove an element from the top of the stack.
Implemented in StaticStack< T >, and DynamicStack< T >.
|
pure virtual |
Add an element to the top of the stack.
val | the value to be added to the stack |
Implemented in StaticStack< T >, and DynamicStack< T >.