Run a cursor over a tree, processing nodes in pre-order. More...
#include <nodevisitor.hh>
Public Member Functions | |
PreorderNodeVisitor (const Cursor &c) | |
Constructor. | |
bool | next (void) |
Move cursor to the next node, return true if succeeded. | |
void | run (void) |
Execute visitor. | |
Protected Member Functions | |
bool | backtrack (void) |
Move cursor to next node from a leaf. |
Run a cursor over a tree, processing nodes in pre-order.
Gecode::Gist::PreorderNodeVisitor::PreorderNodeVisitor | ( | const Cursor & | c | ) |
Constructor.
Definition at line 102 of file nodevisitor.hpp.
bool Gecode::Gist::PreorderNodeVisitor::backtrack | ( | void | ) | [inline, protected] |
Move cursor to next node from a leaf.
Definition at line 89 of file nodevisitor.hpp.
bool Gecode::Gist::PreorderNodeVisitor::next | ( | void | ) | [inline] |
Move cursor to the next node, return true if succeeded.
Definition at line 107 of file nodevisitor.hpp.
void Gecode::Gist::PreorderNodeVisitor::run | ( | void | ) | [inline] |
Execute visitor.
Definition at line 121 of file nodevisitor.hpp.