OSVR-Core
Classes | Functions
osvr::util::tree Namespace Reference

Contains a generic tree. More...

Classes

struct  NoSuchChild
 
class  TreeNode
 A node in a generic tree, which can contain an object by value. More...
 
struct  TreeNodePointer
 Dummy struct containing the ownership pointer type for a TreeNode. More...
 
class  TreeTraversalWrapper
 A wrapper for pre-order traversal of a TreeNode-based tree with something like a lambda. More...
 

Functions

template<typename T >
void buildPathRecursively (util::TreeNode< T > const &node, const char pathSeparator[], std::ostream &os)
 
template<typename T >
std::string getTreeNodeFullPath (util::TreeNode< T > const &node, const char pathSeparator[])
 Given a tree node and a path separator, get the full path identifying that tree node. More...
 
template<typename T , typename F >
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.
 

Detailed Description

Contains a generic tree.

This namespace exists to assist in argument-dependent lookup with tree-related nonmembers, the class template TreeNode is imported into the parent namespace.

Function Documentation

§ getTreeNodeFullPath()

template<typename T >
std::string osvr::util::tree::getTreeNodeFullPath ( util::TreeNode< T > const &  node,
const char  pathSeparator[] 
)
inline

Given a tree node and a path separator, get the full path identifying that tree node.

Special case the root