50 template <
class TYPE_EDGES = u
int8_t>
66 TNodeID child_id_,
bool direction_child_to_parent =
false,
67 const TYPE_EDGES& edge_data = TYPE_EDGES())
68 :
id(child_id_),
reverse(direction_child_to_parent),
data(edge_data)
113 const size_t depth_level) = 0;
120 const TNodeID vroot, Visitor& user_visitor,
121 const size_t root_depth_level = 0)
const
123 const size_t next_depth_level = root_depth_level + 1;
126 const TListEdges& children = itChildren->second;
127 for (
auto itEdge = children.begin(); itEdge != children.end(); ++itEdge)
129 user_visitor.OnVisitNode(vroot, *itEdge, next_depth_level);
131 itEdge->id, user_visitor,
140 const TNodeID vroot, Visitor& user_visitor,
141 const size_t root_depth_level = 0)
const
143 const size_t next_depth_level = root_depth_level + 1;
146 const TListEdges& children = itChildren->second;
147 for (
auto itEdge = children.begin(); itEdge != children.end(); ++itEdge)
148 user_visitor.OnVisitNode(vroot, *itEdge, next_depth_level);
149 for (
auto itEdge = children.begin(); itEdge != children.end(); ++itEdge)
151 itEdge->id, user_visitor,
172 std::stringstream& m_s;
173 CMyVisitor(std::stringstream& s) : m_s(s) {}
177 TYPE_EDGES>::Visitor::tree_t::TEdgeInfo& edge_to_child,
178 const size_t depth_level)
override
180 m_s << std::string(depth_level * 5,
' ')
181 << (edge_to_child.reverse ?
"<-" :
"->")
182 << edge_to_child.id << std::endl;
185 CMyVisitor myVisitor(s);
186 s <<
root << std::endl;