25 #ifndef INCLUDED_PathTree_h_GUID_8C6C691A_AAB1_4586_64DD_BD3F870C9071
26 #define INCLUDED_PathTree_h_GUID_8C6C691A_AAB1_4586_64DD_BD3F870C9071
34 #include <boost/noncopyable.hpp>
51 template <
typename F>
void visitTree(F &functor) { functor(*m_root); }
56 functor(const_cast<PathNode const &>(*m_root));
83 OSVR_COMMON_EXPORT
void reset();
85 PathNode &getRoot() {
return *m_root; }
87 PathNode const &getRoot()
const {
return *m_root; }
100 OSVR_COMMON_EXPORT
bool
102 AliasPriority priority = ALIASPRIORITY_MANUAL);
113 OSVR_COMMON_EXPORT
bool
114 addAliasFromRoute(
PathNode &node, std::string
const &route,
115 AliasPriority priority = ALIASPRIORITY_MANUAL);
118 PathNode &node, std::string
const &source, std::string
const &dest,
119 AliasPriority priority = ALIASPRIORITY_MANUAL);
121 bool isPathAbsolute(std::string
const &source);
126 OSVR_COMMON_EXPORT
void clonePathTree(PathTree
const &src, PathTree &dest);
131 #endif // INCLUDED_PathTree_h_GUID_8C6C691A_AAB1_4586_64DD_BD3F870C9071
A tree representation, with path/url syntax, of the known OSVR system.
::osvr::util::TreeNode< PathElement > PathNode
The specific tree node type that contains a path element.
PathNode & getNodeByPath(std::string const &path)
Returns the node indicated by the path, which must be absolute (begin with a /). Any non-existent nod...
void reset()
Reset the path tree to a new, empty root node.
void visitConstTree(F &functor) const
Visit the tree, with const nodes, starting at the root, with the given functor.
bool addAlias(PathNode &node, std::string const &source, AliasPriority priority)
Automatically-generated export header - do not edit!
::osvr::util::TreeNodePointer< PathElement >::type PathNodePtr
The ownership pointer of the specific tree node.
void visitTree(F &functor)
Visitation.
boost::variant< NullElement, AliasElement, SensorElement, InterfaceElement, DeviceElement, PluginElement, StringElement > PathElement
The variant type containing a particular kind of path element.
bool addAliasFromSourceAndRelativeDest(PathNode &node, std::string const &source, std::string const &dest, AliasPriority priority=ALIASPRIORITY_MANUAL)