cgv
cgv::base::traverser Class Reference

class used to traverse a tree structure More...

#include <traverser.h>

Public Member Functions

 traverser (action &_a, const std::string &_visit_order="pnc", TraverseStrategy _strategy=TS_DEPTH_FIRST, bool _stop_if_not_implemented=false)
 construct from reference on action and traversal order string
 
traverserset_visit_order (const std::string &_visit_order)
 set a different visiting order of node, children and parent
 
traverserset_strategy (TraverseStrategy _strategy)
 set a different traverse strategy
 
bool traverse (base_ptr start, traverse_callback_handler *tch=0)
 traverse a tree starting at given node according to set strategy, order and dest and previously coming from src and return whether traversal yielded success
 

Protected Member Functions

template<typename TCH >
bool traverse_tmp_1 (base_ptr dest, base_ptr src, bool &force_termination, TCH &tch)
 traverse a single object, template over a static traverse callback handler interface
 
template<typename TCH >
bool traverse_tmp_2 (base_ptr p, base_ptr dest, base_ptr src, traverse_policy *tp, bool &force_termination, TCH &tch)
 helper method encapsulating common functionality
 

Detailed Description

class used to traverse a tree structure


The documentation for this class was generated from the following files: