30 return iterator_stack;
37 std::vector<const INode*> children = node->
getChildren();
38 if (children.size() > 0) {
42 iterator_stack.
next();
45 if (!iterator_stack.
empty())
46 iterator_stack.
next();
52 return iterator_stack.
empty();
66 std::vector<const INode*> children = p_root->
getChildren();
67 while (children.size() > 0) {
71 return iterator_stack;
76 iterator_stack.
next();
82 while (children.size() > 0) {
90 return iterator_stack.
empty();
Defines the macro ASSERT.
#define ASSERT(condition)
Defines class IterationStrategy and children.
Defines classes IteratorState, IteratorMemento and NodeIterator.
Base class for tree-like structures containing parameterized objects.
virtual std::vector< const INode * > getChildren() const
Returns a vector of children (const).
Holds all iterator states encountered for SampleTreeIterator.
IteratorState & get_state()
const INode * getCurrent()
void push_state(const IteratorState &state)
Holds state of iterator at single level for SampleTreeIterator.
Traverse tree; visit children before their parents.
virtual PostorderStrategy * clone() const
virtual void next(IteratorMemento &iterator_stack) const
virtual IteratorMemento first(const INode *p_root)
virtual bool isDone(IteratorMemento &iterator_stack) const
Traverse tree; visit parents before their children.
virtual IteratorMemento first(const INode *p_root)
virtual void next(IteratorMemento &iterator_stack) const
virtual bool isDone(IteratorMemento &iterator_stack) const
virtual PreorderStrategy * clone() const