#include <Stack.h>
Public Member Functions | |
Stack () | |
~Stack () | |
void | push (int value) |
void | pop () |
int & | top () |
int | top () const |
size_t | size () const |
bool | empty () const |
Private Attributes | |
Node | head |
Friends | |
void | print_stack (Stack const &st) |
Definition at line 6 of file Stack.h.
Stack::~Stack | ( | ) |
bool Stack::empty | ( | ) | const |
Definition at line 59 of file Stack.cpp.
References head, and Node::size().
Referenced by pop(), and print_stack().
void Stack::pop | ( | ) |
Definition at line 31 of file Stack.cpp.
References empty(), head, Node::pnext, and Node::remove_next().
Referenced by main().
void Stack::push | ( | int | value | ) |
Definition at line 25 of file Stack.cpp.
References head, and Node::insert().
Referenced by main().
size_t Stack::size | ( | ) | const |
Definition at line 52 of file Stack.cpp.
References head, and Node::size().
Referenced by main().
int Stack::top | ( | ) | const |
int & Stack::top | ( | ) |
Definition at line 40 of file Stack.cpp.
References Node::data, head, and Node::pnext.
Referenced by main().
Node Stack::head [private] |