VR-Link API Documentation for HLA Evolved
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
DtBaseConfigVariable Class Reference

Bar Var class, used to access variables in a type neutral manner. More...

+ Inheritance diagram for DtBaseConfigVariable:
+ Collaboration diagram for DtBaseConfigVariable:

List of all members.

Public Types

enum  DtVariableScope { DtScopeInternal, DtScopeConfigFile, DtScopeCommandLine, DtScopeBoth }
typedef std::set< DtStringTypeSet

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 DtStringdescription () 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 DtStringname () 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::ArgmyArg
 Stores the argument relating with this var.
DtString myDescription
 Stores a description of the variable.

Detailed Description

Bar Var class, used to access variables in a type neutral manner.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
DtScopeInternal 
DtScopeConfigFile 
DtScopeCommandLine 
DtScopeBoth 

Constructor & Destructor Documentation

DtBaseConfigVariable::DtBaseConfigVariable ( DtVariableGroup settings,
DtVariableScope  aScope,
const DtString aDescription 
)

CTOR.

DTOR.


Member Function Documentation

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]
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 >.

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]
bool DtBaseConfigVariable::isSet ( ) const [inline]

Check to see if the value has been set.

virtual const DtString& DtBaseConfigVariable::name ( ) const [pure virtual]

Get the scope of this variable.

virtual DtString DtBaseConfigVariable::type ( ) const [pure virtual]
virtual void DtBaseConfigVariable::updateFromCommandLineArg ( ) [pure virtual]
virtual void DtBaseConfigVariable::updateFromEnvironment ( DtEnvironment  env) [pure virtual]

Member Data Documentation

Stores the argument relating with this var.

Stores a description of the variable.

My scope.

Stores a flag to determine if this var has been set yet.


The documentation for this class was generated from the following file:

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)