Skip to main content

vrtree_cpp

Namespace containing a collection of helper functions for simplifying reading of C++ objects out of the C API (e.g. strings, etc)

Classes

TypeName
structvrtree_cpp::Handle
Helper struct to take any handle and close it appropriately.
structvrtree_cpp::HRefCount
Helper structure that provides a reference count that persists between refcounted handle copies.
structvrtree_cpp::HTypeR
Reference counted wrapper around a handle. Automatically closes the handle when there are no references left.
classvrtree_cpp::NodeManager
Utility class providing an interface for responding to changes to specified metanodes; with an additional update function, which will be called every time a frame is drawn.
structvrtree_cpp::ObserverWrapper
Wraps a class implementing static observer functions accepting refcounted handles.

Types

TypeName
typedef HTypeR< HFFIVar >HFFIVarR
Reference counted FFI handle.
typedef HTypeR< HMeta >HMetaR
Reference counted metanode handle.
typedef HTypeR< HMigration >HMigrationR
Reference counted migration handle.
typedef HTypeR< HNode >HNodeR
Reference counted node handle.

Functions

TypeName
std::stringgetNodeName(HNode node)
Utility function for getting the name of a node.
std::stringgetNodePath(HNode node)
Utility function for getting the path of a node.
std::stringreadStringProp(HNode node, const char * propName)
Utility function for reading a string property.
std::stringreadStringProp(HNode node, uint32_t prop)
Utility function for reading a string property.
template <typename T>
void
RegisterObserver(const char * metaName)
Registers a class implementing static observer functions as an observer of the specified metanode.
template <typename T>
void
UnRegisterObserver(const char * metaName)
Unregisters a class implementing static observer functions as an observer of the specified metanode.

Types Documentation

typedef HFFIVarR

typedef HTypeR<HFFIVar> vrtree_cpp::HFFIVarR;

Reference counted FFI handle.

typedef HMetaR

typedef HTypeR<HMeta> vrtree_cpp::HMetaR;

Reference counted metanode handle.

typedef HMigrationR

typedef HTypeR<HMigration> vrtree_cpp::HMigrationR;

Reference counted migration handle.

typedef HNodeR

typedef HTypeR<HNode> vrtree_cpp::HNodeR;

Reference counted node handle.

Functions Documentation

getNodeName

static std::string getNodeName(
HNode node
)

Utility function for getting the name of a node.

Uses an internal buffer to provide to the C API, and copies it into the returned std::string object.

getNodePath

static std::string getNodePath(
HNode node
)

Utility function for getting the path of a node.

Uses an internal buffer to provide to the C API, and copies it into the returned std::string object.

readStringProp

static std::string readStringProp(
HNode node,
const char * propName
)

Utility function for reading a string property.

Uses an internal buffer to provide to the C API, and copies it into the returned std::string object.

readStringProp

static std::string readStringProp(
HNode node,
uint32_t prop
)

Utility function for reading a string property.

Uses an internal buffer to provide to the C API, and copies it into the returned std::string object.

RegisterObserver

template <typename T>
void RegisterObserver(
const char * metaName
)

Registers a class implementing static observer functions as an observer of the specified metanode.

UnRegisterObserver

template <typename T>
void UnRegisterObserver(
const char * metaName
)

Unregisters a class implementing static observer functions as an observer of the specified metanode.