Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
for std::invalid_argument More...
#include <stack.hpp>
Public Types | |
using | value_type = ValueType |
Public Member Functions | |
void | display () const |
std::vector< value_type > | toVector () const |
bool | isEmptyStack () const |
void | push (const value_type &item) |
value_type | top () const |
void | pop () |
void | clear () |
Private Member Functions | |
void | ensureNotEmpty () const |
Private Attributes | |
std::shared_ptr< Node< value_type > > | stackTop |
std::size_t | size = 0 |
size of stack | |
for Node Definition of the stack class
value_type | type of data nodes of the linked list in the stack should contain |
|
inline |
Clear stack
|
inline |
|
inlineprivate |
|
inline |
Determine whether the stack is empty
|
inline |
|
inline |
|
inline |
Return the top element of the stack
|
inline |
|
private |
Pointer to the stack