#include <nodetraversal.h>
Inheritance diagram for NodeTraversal:
Public Methods | |
virtual | ~NodeTraversal () |
_Container & | operator() (_Node *) |
start function | |
Protected Methods | |
virtual void | walk (_Node *)=0 |
Protected Attributes | |
_Container | m_traversal |
_Node: | nodes type that are traversed |
_Container: | container type that is used to collect the nodes. Default is vector<_Node*>. The container class must support the function push_back(node) and must be assignable. |
vector<Node<string> > traversal = PreNodeTraversal()(pointer_to_tree);
PreNodeTraversal pretraversal; vector<Node<string> > nodevector = pretraversal(pointer_to_tree);
Definition at line 52 of file nodetraversal.h.
|
Definition at line 55 of file nodetraversal.h. |
|
start function
Definition at line 133 of file nodetraversal.h. References NodeTraversal::m_traversal, and NodeTraversal::walk(). |
|
Implemented in IterNodeTraversal, PreOrderNodeTraversal, and PostOrderNodeTraversal. Referenced by NodeTraversal::operator()(). |
|
Definition at line 63 of file nodetraversal.h. Referenced by NodeTraversal::operator()(), PreOrderNodeTraversal::walk(), PostOrderNodeTraversal::walk(), and IterNodeTraversal::walk(). |