![]() |
PUMA Library Reference Manual
|
#include <Puma/Stack.h>
Inheritance diagram for Puma::Stack< Item >:Stack implementation based on a variable length array.
| Item | The stack item type. |
Public Member Functions | |
| Stack (long is=8192, long incr=8192) | |
| Construct a new stack. | |
| void | push (Item item) |
| Add a new item on top of the stack. | |
| Item & | top () const |
| Get the top item from the stack. | |
| void | pop () |
| Remove the top item from the stack. | |
| long | length () const |
| Get the number of items on the stack. | |
| void | reset () |
| Reset the stack. | |
|
inline |
Construct a new stack.
| is | The default size of the stack. |
| incr | The default increment value for the stack size. |
|
inline |
Get the number of items on the stack.
|
inline |
Remove the top item from the stack.
|
inline |
Add a new item on top of the stack.
| item | The item to add. |
|
inline |
Reset the stack.
|
inline |
Get the top item from the stack.