A class for keeping track of meta data for variables of scripted tasks. The information is currently stored in an XML format.
- Related Examples
-
| DtScriptedTaskVariable::DtScriptedTaskVariable |
( |
| ) |
|
| virtual DtScriptedTaskVariable::~DtScriptedTaskVariable |
( |
| ) |
|
|
virtual |
| virtual bool DtScriptedTaskVariable::load |
( |
const std::string & |
| ) |
|
|
virtual |
Loads the object from the given xml string buffer.
| virtual bool DtScriptedTaskVariable::save |
( |
std::string & |
| ) |
const |
|
virtual |
Saves the value to the given string buffer.
| virtual void DtScriptedTaskVariable::setVariableName |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable name. This is the name that will be bound in the script. The label field should be used for the user presented name.
| virtual const std::string& DtScriptedTaskVariable::variableName |
( |
| ) |
const |
|
virtual |
Accessor for the variable name. This is the name that will be bound in the script. The label field should be used for the user presented name.
| virtual void DtScriptedTaskVariable::setScriptedTaskVariableName |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the name of the variable as to be used in the scripted task. This can be different from the variable name in the case of a shared widget control such as radio buttons. Radio buttons can be part of a button group, and, this group defines the scripted task variable name whereas the variable name can be used to identify an indivual control. If the member is blank then variableName() is returned.
| virtual const std::string& DtScriptedTaskVariable::scriptedTaskVariableName |
( |
| ) |
const |
|
virtual |
Accessor for the name of the variable as to be used in the scripted task. This can be different from the variable name in the case of a shared widget control such as radio buttons. Radio buttons can be part of a button group, and, this group defines the scripted task variable name whereas the variable name can be used to identify an indivual control. If the member is blank then variableName() is returned.
| virtual std::string DtScriptedTaskVariable::buttonGroup |
( |
| ) |
const |
|
virtual |
If there is a variable item data for a button group, return that name here.
| virtual void DtScriptedTaskVariable::setType |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable type. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual const std::string& DtScriptedTaskVariable::type |
( |
| ) |
const |
|
virtual |
Accessor for the variable type. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual void DtScriptedTaskVariable::setLabel |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable label. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual const std::string& DtScriptedTaskVariable::label |
( |
| ) |
const |
|
virtual |
Accessor for the variable label. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual void DtScriptedTaskVariable::setToolTip |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable tool tip. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual const std::string& DtScriptedTaskVariable::toolTip |
( |
| ) |
const |
|
virtual |
Accessor for the variable tool tip. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual void DtScriptedTaskVariable::setDefaultValue |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable default value. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual const std::string& DtScriptedTaskVariable::defaultValue |
( |
| ) |
const |
|
virtual |
Accessor for the variable default value. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual int DtScriptedTaskVariable::indexOfDefaultInVariableData |
( |
| ) |
const |
|
virtual |
Returns the index of the default value in the variable data. Used in combo box. Presumes variable data is ; separated.
| virtual void DtScriptedTaskVariable::setIndent |
( |
int |
| ) |
|
|
virtual |
Accessor for indent of widget. This indent will be a level of indent to space the widget from the left of the dialog.
| virtual int DtScriptedTaskVariable::indent |
( |
| ) |
const |
|
virtual |
Accessor for indent of widget. This indent will be a level of indent to space the widget from the left of the dialog.
| virtual void DtScriptedTaskVariable::setVariableRange |
( |
double |
bottom, |
|
|
double |
top |
|
) |
| |
|
virtual |
Accessor for the variables range. Only meaningful for those elements that care to represent the variable in some type of GUI and the value entered is some kind of ranged value.
| virtual void DtScriptedTaskVariable::setVariableRangeTop |
( |
double |
r | ) |
|
|
virtual |
Accessor for the variables range. Only meaningful for those elements that care to represent the variable in some type of GUI and the value entered is some kind of ranged value.
| virtual void DtScriptedTaskVariable::setVariableRangeBottom |
( |
double |
r | ) |
|
|
virtual |
Accessor for the variables range. Only meaningful for those elements that care to represent the variable in some type of GUI and the value entered is some kind of ranged value.
| virtual void DtScriptedTaskVariable::variableRange |
( |
double & |
bottom, |
|
|
double & |
top |
|
) |
| const |
|
virtual |
Accessor for the variables range. Only meaningful for those elements that care to represent the variable in some type of GUI and the value entered is some kind of ranged value.
| virtual void DtScriptedTaskVariable::setInternal |
( |
bool |
| ) |
|
|
virtual |
Internal variables are not visible to the user for changing or removal on the scripted task dialog, but are still sent through as part of the task.
| virtual bool DtScriptedTaskVariable::isInternal |
( |
| ) |
const |
|
virtual |
Internal variables are not visible to the user for changing or removal on the scripted task dialog, but are still sent through as part of the task.
| virtual void DtScriptedTaskVariable::setVariableData |
( |
const std::string & |
| ) |
|
|
virtual |
Accessor for the variable data of the variable. This data will be specific for the variable type. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual const std::string& DtScriptedTaskVariable::variableData |
( |
| ) |
const |
|
virtual |
Accessor for the variable data of the variable. This data will be specific for the variable type. Only meaningful for those elements that care to represent the variable in some type of GUI.
| virtual void DtScriptedTaskVariable::setVisible |
( |
bool |
| ) |
|
|
virtual |
Whether or not variable is visible or simply contains a value that the user cannot modify. Default is visible.
| virtual bool DtScriptedTaskVariable::visible |
( |
| ) |
const |
|
virtual |
Whether or not variable is visible or simply contains a value that the user cannot modify. Default is visible.
Creates a new reader writer object based on the variable itself though it will lose much of the class data in the conversion process. The conversion is based on the types listed in vrfutil/vrfScriptedTasksConstants.h and generally maps to a base reader writer type (such as DtRwInt). The intended use is to get a Reader writer with the correct name and a default value for the object based on the default in this object. Returns null if there is no default value (empty string) or if the type has no conversion (from the type() function).
| virtual void DtScriptedTaskVariable::fromRwPtr |
( |
const DtReaderWriter * |
| ) |
|
|
virtual |
Sets the default value of the variable from the value suppled in the reader/writer pointer.
Routines that can be used to add a class that will be called to convert objects to/from reader/writer variables. Each class will implement two methods:
Returns value to be used as default value of scripted variable std::string fromRwPtr(const DtReaderWriter* rw) const
Returns reader/writer variable that represents contents of scripted task variable. The variableName() of the scripted task variable should be used as the name of the reader/writer DtReaderWriter* toRwPtr(const DtScriptedTaskVariable&) const These methods will be called from the scripted task variable version of these methods.
Once added this class takes control of the converter memory
Routines that can be used to add a class that will be called to convert objects to/from reader/writer variables. Each class will implement two methods:
Returns value to be used as default value of scripted variable std::string fromRwPtr(const DtReaderWriter* rw) const
Returns reader/writer variable that represents contents of scripted task variable. The variableName() of the scripted task variable should be used as the name of the reader/writer DtReaderWriter* toRwPtr(const DtScriptedTaskVariable&) const These methods will be called from the scripted task variable version of these methods.
Once added this class takes control of the converter memory
Routines that can be used to add a class that will be called to convert objects to/from reader/writer variables. Each class will implement two methods:
Returns value to be used as default value of scripted variable std::string fromRwPtr(const DtReaderWriter* rw) const
Returns reader/writer variable that represents contents of scripted task variable. The variableName() of the scripted task variable should be used as the name of the reader/writer DtReaderWriter* toRwPtr(const DtScriptedTaskVariable&) const These methods will be called from the scripted task variable version of these methods.
Once added this class takes control of the converter memory
| static void DtScriptedTaskVariable::cleanupConverterFactory |
( |
| ) |
|
|
static |
Routines that can be used to add a class that will be called to convert objects to/from reader/writer variables. Each class will implement two methods:
Returns value to be used as default value of scripted variable std::string fromRwPtr(const DtReaderWriter* rw) const
Returns reader/writer variable that represents contents of scripted task variable. The variableName() of the scripted task variable should be used as the name of the reader/writer DtReaderWriter* toRwPtr(const DtScriptedTaskVariable&) const These methods will be called from the scripted task variable version of these methods.
Once added this class takes control of the converter memory
Returns the string representatino of the variable and the given reader/writer. Uses converter to get string rep.
template<class Archive >
| void DtScriptedTaskVariable::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
inlineprotected |
When the class Archive corresponds to an output archive, the & operator is defined similar to <<. Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.
References DtScriptedTaskSeparatorItem, and DtUUID::uuidString().
| friend class boost::serialization::access |
|
friend |
Serialization/Deserialization //!
| std::string DtScriptedTaskVariable::myVariableName |
|
protected |
| std::string DtScriptedTaskVariable::myType |
|
protected |
| std::string DtScriptedTaskVariable::myLabel |
|
protected |
| std::string DtScriptedTaskVariable::myToolTip |
|
protected |
| std::string DtScriptedTaskVariable::myDefaultValue |
|
protected |
| double DtScriptedTaskVariable::myRangeBottom |
|
protected |
| double DtScriptedTaskVariable::myRangeTop |
|
protected |
| std::string DtScriptedTaskVariable::myVariableData |
|
protected |
| std::string DtScriptedTaskVariable::myScriptedTaskVariableName |
|
protected |
| bool DtScriptedTaskVariable::myVisible |
|
protected |
| bool DtScriptedTaskVariable::myInternal |
|
protected |
| int DtScriptedTaskVariable::myIndent |
|
protected |
The documentation for this class was generated from the following file: