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

A short-lived class for setting up options then processing alias directives to apply to a path tree. More...

#include <osvr/Common/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.

AliasProcessorenableRelativePath ()
 
AliasProcessorenableRelativeSource ()
 Turn on permitRelativeSource in a chained method.
 
AliasProcessorenableWildcard ()
 Turn on permitWildcard in a chained method.
 
AliasProcessorsetDefaultPriority (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.

Parameters
nodeThe parent node for relative path resolution, often the root.
valThe parsed Json::Value containing aliases.
Returns
true if changes were made
bool process (PathNode &node, Json::Value const &val)
 

Detailed Description

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.

Definition at line 82 of file AliasProcessor.h.


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