#include <Stack.h>
Inheritance diagram for PointeredStack:
The chaining makes enqueueing and dequeueing fast.
Definition at line 203 of file Stack.h.
Public Member Functions | |
bool | Delete () |
Deletes the top item from the stack. | |
void | DeleteAll () |
Deletes all items from the stack. | |
long | GetCount () const |
Returns the number of items in the stack. | |
bool | IsEmpty () const |
Returns, if there are no items in the stack. | |
PointeredStackItem * | Peek () const |
Returns the top item of the stack. | |
PointeredStack () | |
Creates a new PointeredStack. | |
PointeredStackItem * | Pop () |
Removes the top item of the stack. | |
void | PopAll () |
Removes all items from the stack without freeing them or returning them. | |
void | Push (PointeredStackItem *NewItem) |
Puts an item on the top of the stack. | |
virtual | ~PointeredStack () |
Destroys the PointeredStack. |
|
Creates a new PointeredStack.
|
|
Destroys the PointeredStack. When deleting the stack, all contained items are also freed. Since the data is only pointered to and not held in the items, this has no effect to the data in the items. |
|
Deletes the top item from the stack. The item is removed from the stack and freed.
|
|
Deletes all items from the stack. All items are removed from the stack and freed. |
|
Returns the number of items in the stack.
|
|
Returns, if there are no items in the stack.
|
|
Returns the top item of the stack.
|
|
Removes the top item of the stack. The item is not freed, but returned.
|
|
Removes all items from the stack without freeing them or returning them.
|
|
Puts an item on the top of the stack.
|