Am array based stack container. More...
#include <eC_TArrayStack.h>
Public Member Functions | |
eC_TArrayStack () | |
eC_TArrayStack (const eC_TArrayStack< T > &rkSource) | |
~eC_TArrayStack () | |
eC_UInt | GetQuantity () const |
eC_Bool | IsEmpty () const |
eC_TArrayStack< T > & | operator= (const eC_TArrayStack< T > &rkSource) |
T & | Pop () |
void | Push (const T &e) |
T & | Top () const |
Am array based stack container.
This simple stack implementation provides an array based stack container.
Performance: Push: O(n) - Pop: O(1) - Top: O(1)
Memory consumption: O(n)
NOTE: Do not assign objects to this stack that counts their references or depends on copy-constructors/assign operators for creating copies of itself.
|
inline |
Default constructor creates an empty stack.
|
inline |
Copy constructor. Copies every element from given stack to this one.
rkSource | Stack to copy from. |
|
inline |
Destructor forces all elements of the stack to be removed.
|
inline |
Get number of elements this stack currently contains.
|
inline |
Test whether the container is empty.
|
inline |
Assign operator. Copies every element from given stack to this one.
rkSource | Stack to copy from. |
|
inline |
Removes element from top of the stack and return this element.
CGUIStackUnderflowException | In case of stack does not contain elements. |
|
inline |
Add element on top of the stack.
e | Element to add. |
|
inline |
Get stack top element.
CGUIStackUnderflowException | In case of stack does not contain elements. |