VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected 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:

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.
DtBaseConfigVariableoperator= (const DtBaseConfigVariable &other)
 Assignment operator.
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 Member Functions

 DtBaseConfigVariable (const DtBaseConfigVariable &other)
 Copy CTOR (not implemented).

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.

virtual DtBaseConfigVariable::~DtBaseConfigVariable ( )
virtual

DTOR.

DtBaseConfigVariable::DtBaseConfigVariable ( const DtBaseConfigVariable other)
protected

Copy CTOR (not implemented).

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 >, DtMultiConfigVariable< DtString >, and DtVariableGroup.

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 >, DtMultiConfigVariable< T >, DtMultiConfigVariable< DtString >, and DtVariableGroup.

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

DtVariableScope DtBaseConfigVariable::scope ( ) const
inline

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

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.


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

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)