#include <Composite.h>
Inheritance diagram for VisitorCore< N >:

Public Types | |
| typedef CompositeBase< N > | Node |
| Base class type for nodes in the graph. | |
| enum | TraversalMode { TRAVERSE_NONE, TRAVERSE_CHILDREN, TRAVERSE_PARENTS } |
| Composite traversal modes. More... | |
Public Methods | |
| TraversalMode | getTraversalMode () const |
| Get the mode for traversing the composite graph. | |
| virtual void | apply (Node &node) |
| Visit a node and propagate. | |
| VisitorCore (TraversalMode mode=TRAVERSE_CHILDREN) | |
| Constructor. | |
Protected Methods | |
| void | traverse (Node &node) |
| Propagate from a given node based on the current traversal mode. | |
| void | setTraversalMode (TraversalMode mode) |
| Change the traversal mode. | |
N is a context specific visitable node type.
|
|||||
|
Base class type for nodes in the graph.
|
|
|||||
|
Composite traversal modes.
|
|
||||||||||
|
Constructor.
|
|
||||||||||
|
Visit a node and propagate. This method is overloaded in the actual visitor classes to apply distinct operations to each type of node. Apply methods should generally conclude with a call to traverse(node) to continue progagation of the visitor through the graph. |
|
|||||||||
|
Get the mode for traversing the composite graph.
|
|
||||||||||
|
Change the traversal mode. The initial traversal mode can be set as a contructor parameter. This method allows the traversal mode to be changed on the fly, for example to abort traversal of a graph once a condition is met (such as finding a matching node during a search). |
|
||||||||||
|
Propagate from a given node based on the current traversal mode. TRAVERSE_CHILDREN will visit the subgraph of the node (depth first), while TRAVERSE_PARENTS will visit all parents until the root of the graph is reached. |
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:42 2003, using Doxygen 1.2.18. |