Inherits ReferenceCountedObject.
◆ StackImpl() [1/2]
template<class TYPE >
Stack< TYPE >::StackImpl::StackImpl |
( |
| ) |
|
|
inlinenoexcept |
Initialize an empty stack.
◆ StackImpl() [2/2]
Initialize stack from other stack.
◆ ~StackImpl()
template<class TYPE >
Stack< TYPE >::StackImpl::~StackImpl |
( |
| ) |
|
|
inlinenoexcept |
◆ getSize()
template<class TYPE >
MemorySize Stack< TYPE >::StackImpl::getSize |
( |
| ) |
const |
|
inlinenoexcept |
Returns the number of elements on the stack.
◆ getTop() [1/2]
Returns the top node of the stack.
◆ getTop() [2/2]
Returns the top node of the stack.
◆ isEmpty()
template<class TYPE >
bool Stack< TYPE >::StackImpl::isEmpty |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the stack is empty.
◆ peek()
template<class TYPE >
const TYPE& Stack< TYPE >::StackImpl::peek |
( |
MemorySize |
index = 0 | ) |
const |
|
inline |
Returns the element at the specified index from the top. Raises OutOfRange if index is invalid.
- Parameters
-
index | Index of the element. Default is 0 corresponding to the top. |
◆ pop()
template<class TYPE >
void Stack< TYPE >::StackImpl::pop |
( |
MemorySize |
count | ) |
|
|
inline |
Pops the specified number of elements from the stack. Raises OutOfRange if the stack does not contain the specified number of elements.
- Parameters
-
count | The number of elements to pop of the stack. |
◆ push()
template<class TYPE >
void Stack< TYPE >::StackImpl::push |
( |
const TYPE & |
value | ) |
|
|
inline |
Pushes an element onto the stack.
- Parameters
-
value | The value to be pushed. |
◆ removeAll()
template<class TYPE >
void Stack< TYPE >::StackImpl::removeAll |
( |
| ) |
|
|
inlinenoexcept |
Removes all the elements from the stack.
◆ bottom
The node at the bottom of the stack.
◆ size
template<class TYPE >
MemorySize Stack< TYPE >::StackImpl::size = 0 |
|
protected |
The number of elements on the stack.
◆ top
The node on the top of the stack.