#include <container.hh>
Classes | |
| class | Node |
| class | StackIterator |
Public Member Functions | |
| Stack (bool ownerOfObjects) | |
| ~Stack () | |
| void | push (object::Object *object) |
| void | pushUnder (object::Object *object) |
| object::Object * | getTop () |
| void | pop () |
| int | size () |
Protected Member Functions | |
| AbstractIterator * | createIterator () |
Private Attributes | |
| Node * | bottom |
| Node * | top |
| bool | ownerOfObjects |
| int | numElements |
Friends | |
| class | StackIterator |
Note that the iterator returns all elements in the reversed order they have been put on the stack.
| lout::container::untyped::Stack::Stack | ( | bool | ownerOfObjects | ) |
References bottom, numElements, and top.
| Collection0::AbstractIterator * lout::container::untyped::Stack::createIterator | ( | ) | [protected, virtual] |
| object::Object* lout::container::untyped::Stack::getTop | ( | ) | [inline] |
References lout::container::untyped::Stack::Node::object, and top.
| void lout::container::untyped::Stack::pop | ( | ) |
References bottom, numElements, lout::container::untyped::Stack::Node::object, ownerOfObjects, lout::container::untyped::Stack::Node::prev, and top.
Referenced by ~Stack().
| void lout::container::untyped::Stack::push | ( | object::Object * | object | ) |
| void lout::container::untyped::Stack::pushUnder | ( | object::Object * | object | ) |
| int lout::container::untyped::Stack::size | ( | ) | [inline] |
References numElements.
friend class StackIterator [friend] |
Referenced by createIterator().
Node* lout::container::untyped::Stack::bottom [private] |
Referenced by pop(), push(), pushUnder(), and Stack().
int lout::container::untyped::Stack::numElements [private] |
Referenced by pop(), push(), pushUnder(), size(), and Stack().
bool lout::container::untyped::Stack::ownerOfObjects [private] |
Referenced by pop().
Node * lout::container::untyped::Stack::top [private] |
Referenced by createIterator(), getTop(), pop(), push(), pushUnder(), Stack(), and ~Stack().
1.5.9