25 #ifndef INCLUDED_AliasProcessor_h_GUID_9C10FB5E_F8B9_44BB_BCF4_9E50FFBFA1C9
26 #define INCLUDED_AliasProcessor_h_GUID_9C10FB5E_F8B9_44BB_BCF4_9E50FFBFA1C9
34 #include <json/value.h>
44 bool permitRelativePath =
false;
45 bool permitRelativeSource =
false;
46 bool permitWildcard =
false;
47 AliasPriority defaultPriority = ALIASPRIORITY_AUTOMATIC;
62 OSVR_COMMON_EXPORT Json::Value
63 createJSONAlias(std::string
const &path, Json::Value
const &destination);
68 OSVR_COMMON_EXPORT Json::Value
90 m_opts.permitRelativePath =
true;
96 m_opts.permitRelativeSource =
true;
102 m_opts.permitWildcard =
true;
108 m_opts.defaultPriority = prio;
123 OSVR_COMMON_EXPORT
bool process(
PathNode &node, Json::Value
const &val);
130 #endif // INCLUDED_AliasProcessor_h_GUID_9C10FB5E_F8B9_44BB_BCF4_9E50FFBFA1C9
A short-lived class for setting up options then processing alias directives to apply to a path tree...
::osvr::util::TreeNode< PathElement > PathNode
The specific tree node type that contains a path element.
Options struct for internal usage by AliasProcessor.
Json::Value convertRouteToAlias(Json::Value const &val)
Given a single JSON object, if it's an old-fashioned "routing directive", convert it to a normal "ali...
Json::Value applyPriorityToAlias(Json::Value const &alias, AliasPriority priority)
Given a JSON object describing one or more aliases, set the priority of the alias(es).
AliasProcessor & enableWildcard()
Turn on permitWildcard in a chained method.
AliasProcessor & enableRelativeSource()
Turn on permitRelativeSource in a chained method.
AliasProcessor & setDefaultPriority(AliasPriority prio)
Set defaultPriority in a chained method.
Automatically-generated export header - do not edit!
Header forward-declaring the types in PathElementTypes.h and including the PathElement typedef...
Json::Value createJSONAlias(std::string const &path, Json::Value const &destination)
Given a path and a destination, combine them into a JSON alias description.