![]() |
VR-Link API Documentation for HLA Evolved
|
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. | |
| virtual | ~DtBaseConfigVariable () |
| DTOR. | |
| DtVariableScope | scope () const |
| Get the scope of this variable. | |
| const DtString & | description () const |
| bool | inConfigFile () const |
| Is this var used in the config line. | |
| bool | inCommandLine () const |
| Is this var used in the command line. | |
| bool | isSet () const |
| Check to see if the value has been set. | |
| virtual const DtString & | name () const =0 |
| Get the Var's name. | |
| virtual bool | isRequired () const =0 |
| Check to see if the value is required. | |
| virtual void | getCommandLineArg (DtCmdLine::CmdLine &cmdLine)=0 |
| Get an arg. | |
| virtual void | updateFromCommandLineArg ()=0 |
| Update the value by its argument. | |
| virtual void | getEnvironmentSchemaType (DtEnvironment env, TypeSet &usedTypes) const =0 |
| Get an environment value which represents the XML scheme type. | |
| virtual DtEnvValueSP | getEnvironmentValue (DtEnvironment env)=0 |
| Get an environment value which represent the value of the var. | |
| virtual void | updateFromEnvironment (DtEnvironment env)=0 |
| Synchronize the var with an environment. | |
| virtual DtString | type () const =0 |
| Get the Var's type. | |
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. | |
| static DtEnvValueSP | createComplexSchemaType (DtEnvironment env, const DtString &typeName, bool ordered, const std::list< DtBaseConfigVariable * > &members) |
| Create a complex schema type. | |
Protected Attributes | |
| DtVariableScope | myScope |
| My scope. | |
| bool | mySetFlag |
| Stores a flag to determine if this var has been set yet. | |
| DtCmdLine::Arg * | myArg |
| Stores the argument relating with this var. | |
| DtString | myDescription |
| Stores a description of the variable. | |
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 DtBaseConfigVariable::~DtBaseConfigVariable | ( | ) | [virtual] |
DTOR.
| static DtEnvValueSP DtBaseConfigVariable::createComplexSchemaType | ( | DtEnvironment | env, |
| const DtString & | typeName, | ||
| bool | ordered, | ||
| const std::list< DtBaseConfigVariable * > & | members | ||
| ) | [static] |
Create a complex schema type.
| static DtEnvValueSP DtBaseConfigVariable::createSchemaDeclaration | ( | DtEnvironment | env, |
| const DtString & | name, | ||
| const DtString & | type | ||
| ) | [static] |
| static DtEnvValueSP DtBaseConfigVariable::createSimpleSchemaType | ( | DtEnvironment | env, |
| const DtString & | typeName, | ||
| const DtString & | xsType | ||
| ) | [static] |
Help function for simple types.
| const DtString& DtBaseConfigVariable::description | ( | ) | const [inline] |
| virtual void DtBaseConfigVariable::getCommandLineArg | ( | DtCmdLine::CmdLine & | cmdLine | ) | [pure virtual] |
Get an arg.
This this var doesn't support Arguments return a NULL pointer.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtVariableGroup, DtMultiConfigVariable< T >, and DtMultiConfigVariable< DtString >.
| virtual void DtBaseConfigVariable::getEnvironmentSchemaType | ( | DtEnvironment | env, |
| TypeSet & | usedTypes | ||
| ) | const [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< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtMultiConfigVariable< T >, DtVariableGroup, and DtMultiConfigVariable< DtString >.
| virtual DtEnvValueSP DtBaseConfigVariable::getEnvironmentValue | ( | DtEnvironment | env | ) | [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< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtVariableGroup, DtMultiConfigVariable< T >, and DtMultiConfigVariable< DtString >.
| bool DtBaseConfigVariable::inCommandLine | ( | ) | const [inline] |
Is this var used in the command line.
| bool DtBaseConfigVariable::inConfigFile | ( | ) | const [inline] |
Is this var used in the config line.
| virtual bool DtBaseConfigVariable::isRequired | ( | ) | const [pure virtual] |
Check to see if the value is required.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
| bool DtBaseConfigVariable::isSet | ( | ) | const [inline] |
Check to see if the value has been set.
| virtual const DtString& DtBaseConfigVariable::name | ( | ) | const [pure virtual] |
Get the Var's name.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
| DtVariableScope DtBaseConfigVariable::scope | ( | ) | const [inline] |
Get the scope of this variable.
| virtual DtString DtBaseConfigVariable::type | ( | ) | const [pure virtual] |
Get the Var's type.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.
| virtual void DtBaseConfigVariable::updateFromCommandLineArg | ( | ) | [pure virtual] |
Update the value by its argument.
This function will not be called if getArg returns NULL.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtMultiConfigVariable< T >, DtVariableGroup, and DtMultiConfigVariable< DtString >.
| virtual void DtBaseConfigVariable::updateFromEnvironment | ( | DtEnvironment | env | ) | [pure virtual] |
Synchronize the var with an environment.
This function will not be called if getEnvironmentValue() returns NULL.
Implemented in DtConfigVariable< T >, DtConfigVariable< DtVector >, DtConfigVariable< double >, DtConfigVariable< DtString >, DtConfigVariable< int >, DtConfigVariable< bool >, DtVariableGroup, DtMultiConfigVariable< T >, and DtMultiConfigVariable< DtString >.
DtCmdLine::Arg* DtBaseConfigVariable::myArg [protected] |
Stores the argument relating with this var.
DtString DtBaseConfigVariable::myDescription [protected] |
Stores a description of the variable.
DtVariableScope DtBaseConfigVariable::myScope [protected] |
My scope.
bool DtBaseConfigVariable::mySetFlag [protected] |
Stores a flag to determine if this var has been set yet.