Inferno  0.2
walk.hpp File Reference
#include "node/node.hpp"
#include "transformation.hpp"
Include dependency graph for walk.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FlattenNode_iterator
 Iterator for FlattenNode. More...
class  Walk_iterator
 Iterator for Walk. More...
struct  Walk_iterator::StateEntry
struct  UniqueFilter
 Filter that only matches each Node one time, then not again until Reset() is called. More...
class  ParentWalk_iterator
 Iterator for ParentWalk. More...
class  UniqueWalk_iterator
 Iterator for UniqueWalk. More...

Typedefs

typedef ContainerFromIterator
< FlattenNode_iterator,
TreePtr< Node > > 
FlattenNode
typedef ContainerFromIterator
< Walk_iterator, TreePtr< Node >
, Filter *, Filter * > 
Walk
typedef ContainerFromIterator
< ParentWalk_iterator, TreePtr
< Node > > 
ParentWalk
typedef ContainerFromIterator
< UniqueWalk_iterator, TreePtr
< Node > > 
UniqueWalk

Typedef Documentation

Stated out traversal across a node's children. UniqueWalks the members and elements of containers but does not follow any TreePtr. Basically an itemise that expands containers.

Definition at line 52 of file walk.hpp.

Version of Walk that only sees a node once for each parent i.e. with a->c, b->c, c->d we get c twice but d only once (Walk would get d twice too)

Definition at line 138 of file walk.hpp.

UniqueWalk presents each element exactly once, and skips NULL pointers

Definition at line 156 of file walk.hpp.

Inferno's tree-walking class. This is a stated out depth-first tree walker. A walk object is constructed on a node (possibly with other params) and it acts like an OOStd container whose iterator walks the subtree with sucessive invocations of operator++. A walking loop may be created using FOREACH as with containers.

Definition at line 108 of file walk.hpp.