OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::client::InterfaceTree Class Reference

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
 

Detailed Description

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.

Member Function Documentation

bool osvr::client::InterfaceTree::addInterface ( common::ClientInterfacePtr const &  iface)

Add an interface to the tree.

Returns
true if this is the first interface for that path.

Definition at line 52 of file InterfaceTree.cpp.

bool osvr::client::InterfaceTree::removeInterface ( common::ClientInterfacePtr const &  iface)

Remove an interface from the tree.

Returns
true if that path no longer has any interfaces.

Definition at line 66 of file InterfaceTree.cpp.


The documentation for this class was generated from the following files: