OSVR-Core
|
Object responsible for owning a path tree (specifically a "downstream"/client path tree), replacing its contents from JSON-serialized data, and notifying a collection of observers of such events. More...
#include <PathTreeOwner.h>
Public Member Functions | |
PathTreeOwner (PathTreeOwner const &)=delete | |
non-copyable | |
PathTreeOwner & | operator= (PathTreeOwner const &)=delete |
non-copy-assignable | |
operator bool () const | |
reports whether the path tree has been populated (by a call to replaceTree() ) | |
OSVR_COMMON_EXPORT PathTreeObserverPtr | makeObserver () |
Make an observer object that can hold callbacks for tree updates. More... | |
OSVR_COMMON_EXPORT void | replaceTree (Json::Value const &nodes) |
Replace the entirety of the path tree from the given serialized array of nodes. More... | |
PathTree & | get () |
Access the path tree object itself. | |
PathTree const & | get () const |
Access the path tree object itself - constant reference. | |
Object responsible for owning a path tree (specifically a "downstream"/client path tree), replacing its contents from JSON-serialized data, and notifying a collection of observers of such events.
PathTreeObserverPtr osvr::common::PathTreeOwner::makeObserver | ( | ) |
Make an observer object that can hold callbacks for tree updates.
Callbacks are called in the order their observers were created.
void osvr::common::PathTreeOwner::replaceTree | ( | Json::Value const & | nodes | ) |
Replace the entirety of the path tree from the given serialized array of nodes.