Holds on to lists of interfaces organized into the tree structure, as well as their associated handlers. More...
#include <osvr/Client/InterfaceTree.h>
Public Types | |
typedef InterfaceTreeValue | value_type |
typedef util::TreeNode < value_type > | node_type |
Public Member Functions | |
InterfaceTree () | |
Constructor. | |
bool | addInterface (common::ClientInterfacePtr const &iface) |
Add an interface to the tree. More... | |
bool | removeInterface (common::ClientInterfacePtr const &iface) |
Remove an interface from the tree. More... | |
common::InterfaceList & | getInterfacesForPath (std::string const &path) |
Returns a reference to the list of interfaces registered for a given path. | |
RemoteHandlerPtr | getHandlerForPath (std::string const &path) |
Returns the handler for a given path. | |
RemoteHandlerPtr | eraseHandlerForPath (std::string const &path) |
Clears and returns the handler for a given path. | |
RemoteHandlerPtr | replaceHandlerForPath (std::string const &path, RemoteHandlerPtr const &handler) |
Sets the handler for a given path, returning the old handler if any. | |
void | updateHandlers () |
Call the update method on all handlers. | |
void | clearHandlers () |
Removes all handlers. | |
template<typename F > | |
void | visitPathsWithoutHandlers (F &&func) |
Visit all paths with interfaces in their list but no handler. | |
Friends | |
class | HandlerClearVisitor |
Holds on to lists of interfaces organized into the tree structure, as well as their associated handlers.
Definition at line 53 of file InterfaceTree.h.
bool osvr::client::InterfaceTree::addInterface | ( | common::ClientInterfacePtr const & | iface | ) |
Add an interface to the tree.
Definition at line 52 of file InterfaceTree.cpp.
bool osvr::client::InterfaceTree::removeInterface | ( | common::ClientInterfacePtr const & | iface | ) |
Remove an interface from the tree.
Definition at line 66 of file InterfaceTree.cpp.