OSVR-Core
|
A short-lived class for setting up options then processing alias directives to apply to a path tree. More...
#include <AliasProcessor.h>
Public Member Functions | |||||
Option methods | |||||
All these return a reference to the current object, so can be chained together. Turn on permitRelativePath in a chained method. | |||||
AliasProcessor & | enableRelativePath () | ||||
AliasProcessor & | enableRelativeSource () | ||||
Turn on permitRelativeSource in a chained method. | |||||
AliasProcessor & | enableWildcard () | ||||
Turn on permitWildcard in a chained method. | |||||
AliasProcessor & | setDefaultPriority (AliasPriority prio) | ||||
Set defaultPriority in a chained method. | |||||
Action methods | |||||
These methods are to be the end of a chain since they perform an action with the previously-set options. Adds the given alias(es) to the tree.
| |||||
OSVR_COMMON_EXPORT bool | process (PathNode &node, Json::Value const &val) | ||||
A short-lived class for setting up options then processing alias directives to apply to a path tree.
Can be used with the "chained methods" idiom (recommended): Create an instance (no need for a name) and immediately call option methods, if desired, then call one of the action methods.
Can handle wildcards (*) in the destination, relative sources and paths, and internally-specified alias priorities. Some of these capabilities are off by default and should be enabled before calling this method.