25 #ifndef INCLUDED_TreeTraversalVisitor_h_GUID_A75E39C9_AB5B_4494_0BF6_E8C3BA1BCB34
26 #define INCLUDED_TreeTraversalVisitor_h_GUID_A75E39C9_AB5B_4494_0BF6_E8C3BA1BCB34
45 : m_functor(std::move(functor)) {}
51 template <
typename T>
void operator()(
TreeNode<T> &node) {
55 template <
typename T>
void operator()(
TreeNode<T> const &node) {
66 template <
typename T,
typename F>
75 #endif // INCLUDED_TreeTraversalVisitor_h_GUID_A75E39C9_AB5B_4494_0BF6_E8C3BA1BCB34
void visitConstChildren(F &visitor) const
Generic constant visitation method that calls a functor on each of the children (as const) in an unde...
A node in a generic tree, which can contain an object by value.
The main namespace for all C++ elements of the framework, internal and external.
void traverseWith(T &node, F &&functor)
A method to handle visiting every node in a tree with a lambda or other by-value function object...
void visitChildren(F &visitor)
Generic visitation method that calls a functor on each of the children in an undefined order...
A wrapper for pre-order traversal of a TreeNode-based tree with something like a lambda.