struct mrpt::graphs::CDirectedTree::Visitor
Virtual base class for user-defined visitors.
Obsolete: Prefer C++11 visitor_t
#include <mrpt/graphs/CDirectedTree.h> struct Visitor { // typedefs typedef CDirectedTree<TYPE_EDGES> tree_t; // methods virtual void OnVisitNode(TNodeID const parent, const typename tree_t::TEdgeInfo& edge_to_child, size_t depth_level) = 0; };
Methods
virtual void OnVisitNode( TNodeID const parent, const typename tree_t::TEdgeInfo& edge_to_child, size_t depth_level ) = 0
Virtual method to be implemented by the user and which will be called during the visit to a graph with visitDepthFirst or visitBreadthFirst Specifically, the method will be called once for each edge in the tree.
Parameters:
parent |
[IN] The ID of the parent node. |
edge_to_child |
[IN] The edge information from the parent to “edge_to_child.id” |
depth_level |
[IN] The “depth level” of the child node “edge_to_child.id” (root node is at 0, its children are at 1, etc.). |