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 Definition: RunLoopManager.h:42
A node in a generic tree, which can contain an object by value.
Definition: TreeNode.h:72
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
void visitConstChildren(F &visitor) const
Generic constant visitation method that calls a functor on each of the children (as const) in an unde...
Definition: TreeNode.h:152
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...
Definition: TreeTraversalVisitor.h:67
void visitChildren(F &visitor)
Generic visitation method that calls a functor on each of the children in an undefined order...
Definition: TreeNode.h:141
A wrapper for pre-order traversal of a TreeNode-based tree with something like a lambda.
Definition: TreeTraversalVisitor.h:42