![]() |
VR-Link API Documentation for DIS
|
Bar Var class, used to access variables in a type neutral manner. More...
Inheritance diagram for DtBaseConfigVariable:
Collaboration diagram for DtBaseConfigVariable:Public Types | |
| enum | DtVariableScope { DtScopeInternal, DtScopeConfigFile, DtScopeCommandLine, DtScopeBoth } |
| typedef std::set< DtString > | TypeSet |
Public Member Functions | |
| DtBaseConfigVariable (DtVariableGroup *settings, DtVariableScope aScope, const DtString &aDescription) | |
| CTOR. More... | |
| virtual | ~DtBaseConfigVariable () |
| DTOR. More... | |
| DtBaseConfigVariable & | operator= (const DtBaseConfigVariable &other) |
| Assignment operator. More... | |
| DtVariableScope | scope () const |
| Get the scope of this variable. More... | |
| const DtString & | description () const |
| bool | inConfigFile () const |
| Is this var used in the config line. More... | |
| bool | inCommandLine () const |
| Is this var used in the command line. More... | |
| bool | isSet () const |
| Check to see if the value has been set. More... | |
| virtual const DtString & | name () const =0 |
| Get the Var's name. More... | |
| virtual bool | isRequired () const =0 |
| Check to see if the value is required. More... | |
| virtual void | getCommandLineArg (DtCmdLine::CmdLine &cmdLine)=0 |
| Get an arg. More... | |
| virtual void | updateFromCommandLineArg ()=0 |
| Update the value by its argument. More... | |
| virtual void | getEnvironmentSchemaType (DtEnvironment env, TypeSet &usedTypes) const =0 |
| Get an environment value which represents the XML scheme type. More... | |
| virtual DtEnvValueSP | getEnvironmentValue (DtEnvironment env)=0 |
| Get an environment value which represent the value of the var. More... | |
| virtual void | updateFromEnvironment (DtEnvironment env)=0 |
| Synchronize the var with an environment. More... | |
| virtual DtString | type () const =0 |
| Get the Var's type. More... | |
Static Public Member Functions | |
| static DtEnvValueSP | createSchemaDeclaration (DtEnvironment env, const DtString &name, const DtString &type) |
| static DtEnvValueSP | createSimpleSchemaType (DtEnvironment env, const DtString &typeName, const DtString &xsType) |
| Help function for simple types. More... | |
| static DtEnvValueSP | createComplexSchemaType (DtEnvironment env, const DtString &typeName, bool ordered, const std::list< DtBaseConfigVariable * > &members) |
| Create a complex schema type. More... | |
Protected Member Functions | |
| DtBaseConfigVariable (const DtBaseConfigVariable &other) | |
| Copy CTOR (not implemented). More... | |
Protected Attributes | |
| DtVariableScope | myScope |
| My scope. More... | |
| bool | mySetFlag |
| Stores a flag to determine if this var has been set yet. More... | |
| DtCmdLine::Arg * | myArg |
| Stores the argument relating with this var. More... | |
| DtString | myDescription |
| Stores a description of the variable. More... | |
Bar Var class, used to access variables in a type neutral manner.
| typedef std::set<DtString> DtBaseConfigVariable::TypeSet |
| DtBaseConfigVariable::DtBaseConfigVariable | ( | DtVariableGroup * | settings, |
| DtVariableScope | aScope, | ||
| const DtString & | aDescription | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
protected |
Copy CTOR (not implemented).
|
static |
Create a complex schema type.
|
static |
|
static |
Help function for simple types.
|
inline |
|
pure virtual |
Get an arg.
This this var doesn't support Arguments return a NULL pointer.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
pure virtual |
Get an environment value which represents the XML scheme type.
The var should check the type set before created type to eliminate duplicates.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
pure virtual |
Get an environment value which represent the value of the var.
If the var type does not support environment representation a NULL smart pointer should be returned.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
inline |
Is this var used in the command line.
|
inline |
Is this var used in the config line.
|
pure virtual |
Check to see if the value is required.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
inline |
Check to see if the value has been set.
|
pure virtual |
| DtBaseConfigVariable& DtBaseConfigVariable::operator= | ( | const DtBaseConfigVariable & | other | ) |
Assignment operator.
Assigns all defining attributes of the variable. The variable's group that it belongs to remains unchanged.
|
inline |
Get the scope of this variable.
|
pure virtual |
|
pure virtual |
Update the value by its argument.
This function will not be called if getArg returns NULL.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
pure virtual |
Synchronize the var with an environment.
This function will not be called if getEnvironmentValue() returns NULL.
Implemented in DtConfigVariable< T >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtConfigVariable< DtVector64 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
|
protected |
Stores the argument relating with this var.
|
protected |
Stores a description of the variable.
|
protected |
My scope.
|
protected |
Stores a flag to determine if this var has been set yet.