OSVR-Core
|
Holds on to lists of interfaces organized into the tree structure, as well as their associated handlers. More...
#include <InterfaceTree.h>
Public Types | |
typedef InterfaceTreeValue | value_type |
typedef util::TreeNode< value_type > | node_type |
Public Member Functions | |
OSVR_CLIENT_EXPORT | InterfaceTree () |
Constructor. | |
OSVR_CLIENT_EXPORT bool | addInterface (common::ClientInterfacePtr const &iface) |
Add an interface to the tree. More... | |
OSVR_CLIENT_EXPORT bool | removeInterface (common::ClientInterfacePtr const &iface) |
Remove an interface from the tree. More... | |
OSVR_CLIENT_EXPORT common::InterfaceList & | getInterfacesForPath (std::string const &path) |
Returns a reference to the list of interfaces registered for a given path. More... | |
OSVR_CLIENT_EXPORT RemoteHandlerPtr | getHandlerForPath (std::string const &path) |
Returns the handler for a given path. | |
OSVR_CLIENT_EXPORT RemoteHandlerPtr | eraseHandlerForPath (std::string const &path) |
Clears and returns the handler for a given path. | |
OSVR_CLIENT_EXPORT RemoteHandlerPtr | replaceHandlerForPath (std::string const &path, RemoteHandlerPtr const &handler) |
Sets the handler for a given path, returning the old handler if any. More... | |
OSVR_CLIENT_EXPORT void | updateHandlers () |
Call the update method on all handlers. | |
OSVR_CLIENT_EXPORT 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.
bool osvr::client::InterfaceTree::addInterface | ( | common::ClientInterfacePtr const & | iface | ) |
Add an interface to the tree.
common::InterfaceList & osvr::client::InterfaceTree::getInterfacesForPath | ( | std::string const & | path | ) |
Returns a reference to the list of interfaces registered for a given path.
bool osvr::client::InterfaceTree::removeInterface | ( | common::ClientInterfacePtr const & | iface | ) |
Remove an interface from the tree.
RemoteHandlerPtr osvr::client::InterfaceTree::replaceHandlerForPath | ( | std::string const & | path, |
RemoteHandlerPtr const & | handler | ||
) |
Sets the handler for a given path, returning the old handler if any.