template<typename T>
Stack class
Contents
Constructors, destructors, conversion operators
Public functions
Function documentation
template<typename T>
void bpf:: collection:: Stack<T>:: Clear()
Clears this stack
template<typename T>
void bpf:: collection:: Stack<T>:: Push(const T& element)
| Parameters | |
|---|---|
| element | the element to push |
| Exceptions | |
| StackOverflowException | if the stack is full |
Pushes an element on the stack
template<typename T>
void bpf:: collection:: Stack<T>:: Push(T&& element)
| Parameters | |
|---|---|
| element | the element to push |
| Exceptions | |
| StackOverflowException | if the stack is full |
Pushes an element on the stack
template<typename T>
T bpf:: collection:: Stack<T>:: Pop()
| Returns | the extracted/removed item |
|---|---|
| Exceptions | |
| StackUnderflowException | if the stack is empty |
Extracts the top of the stack
template<typename T>
T& bpf:: collection:: Stack<T>:: Top()
| Returns | mutable item |
|---|---|
| Exceptions | |
| IndexException | if the stack is empty |
Returns the top of the stack
template<typename T>
const T& bpf:: collection:: Stack<T>:: Top() const
| Returns | immutable item |
|---|---|
| Exceptions | |
| IndexException | if the stack is empty |
Returns the top of the stack