Go to the documentation of this file. 7 #ifndef AULA1_DYNAMICSTACK_HPP 8 #define AULA1_DYNAMICSTACK_HPP 27 std::string
getName() {
return "Dynamic Stack"; }
33 throw std::out_of_range(
"The stack is empty");
39 throw std::out_of_range(
"The stack is empty");
Stack implementation with dynamic memory allocation.
bool isFull()
Check whether the structure is full.
T peek()
See the value from the top of the stack, without removing it.
int getSize()
Outputs the number of elements stored in the structure.
Abstract stack interface.
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
bool isFull()
Check whether the structure is full.
=======
>>>>>>> 36f9b37... fixed dependency of ProtectedLinkedList to Iterator
=======
>>>>>>> bded2143692dca559ffcc9e7202d9eb5fbfc45bf
=======
>>>>>>> master
std::string getName()
Provides the name of the data structure as a string representation.
bool isEmpty()
Check whether the structure is empty.
Doubly-linked list implementation with dynamic memory allocation.
DynamicStack(T data[])
create the structure and populate it with the data from the array
T pop()
Remove an element from the top of the stack.
void push(T val)
Add an element to the top of the stack.