Dom.FullVariableSet Class Reference

Detailed Description

This set represents a set of variables in text, denoted by Implemented at e.g. UI.Variables/Speech.Variables. The event OnFind can be used to resolve a variable not found in either custom variables or the language (for localization) set. Nested variables (variables in a variables text) are evaluated at the point of replacement, not load.

Public Member Functions

 FullVariableSet ()
 Creates a new complete variable set. More...
 
void Divert (string groupName, GroupResolveEvent handler)
 Diverts the named group and processes it with the given handler. More...
 
void GetValue (string variableName, Document document, LanguageTextEvent onResolved)
 Resolves a variable value, calling the given function when it's done. More...
 
void SetValue (string code, string value)
 Sets a custom variable with the given name and value. This will take top priority. More...
 

Public Attributes

VariableSet Custom
 The custom set of variables added and edited at runtime. More...
 
Dictionary< string,
GroupResolveEvent
Diverts
 All group diversions. More...
 

Properties

string this[string code] [get, set]
 Gets or sets custom variables. More...
 

Events

GroupResolveEvent OnFind
 The final fallback. Called when a variable hasn't been found anywhere else. More...
 
LanguageTextEvent OnChange
 A callback called when a custom variable in this set is changed. More...
 

Constructor & Destructor Documentation

Dom.FullVariableSet.FullVariableSet ( )
inline

Creates a new complete variable set.

Member Function Documentation

void Dom.FullVariableSet.Divert ( string  groupName,
GroupResolveEvent  handler 
)
inline

Diverts the named group and processes it with the given handler.

void Dom.FullVariableSet.GetValue ( string  variableName,
Document  document,
LanguageTextEvent  onResolved 
)
inline

Resolves a variable value, calling the given function when it's done.

void Dom.FullVariableSet.SetValue ( string  code,
string  value 
)
inline

Sets a custom variable with the given name and value. This will take top priority.

Parameters
codeThe name of the variable to set.
valueThe value to set it to.

Member Data Documentation

VariableSet Dom.FullVariableSet.Custom

The custom set of variables added and edited at runtime.

Dictionary<string,GroupResolveEvent> Dom.FullVariableSet.Diverts

All group diversions.

Property Documentation

string Dom.FullVariableSet.this[string code]
getset

Gets or sets custom variables.

Parameters
codeThe name of the variable to get/set.

Event Documentation

LanguageTextEvent Dom.FullVariableSet.OnChange

A callback called when a custom variable in this set is changed.

GroupResolveEvent Dom.FullVariableSet.OnFind

The final fallback. Called when a variable hasn't been found anywhere else.