MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
MAKLogger::DtLoggerAppConfigLoader Class Reference

The logger application configuration file loader. More...

+ Collaboration diagram for MAKLogger::DtLoggerAppConfigLoader:

Public Member Functions

 DtLoggerAppConfigLoader (const DtRuntimeCommandFactory *factory, const DtString &filename)
 Open a configuration. More...
 
virtual ~DtLoggerAppConfigLoader ()
 
virtual bool isValid () const
 Is the configuration valid. More...
 
virtual void saveChanges ()
 Save changes to file. More...
 
virtual void getInitCommands (DtCollector< DtCommand > commandCollector) const
 Get the logger commands. More...
 
virtual void getStartupCommands (DtCollector< DtCommand > commandCollector) const
 
virtual const DtEnvValueSP getDefaultVariable (const DtString &name) const
 Get a variable by its name. More...
 
virtual DtString getDefaultVariableValue (const DtString &name) const
 Get a variable's value by its name. More...
 
virtual DtString getDefaultVariableType (const DtString &name) const
 Get a variable's type by its name. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, const DtString &value, const DtString &type)
 Set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP setTemporaryDefaultVariable (const DtString &name, const DtString &value, const DtString &type)
 Set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP setDefaultVariableList (const DtString &name, const std::vector< DtString > &valList, const DtString &type)
 Set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP setTemporaryDefaultVariableList (const DtString &name, const std::vector< DtString > &valList, const DtString &type)
 Set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP addDefaultVariableToList (const DtString &name, const DtString &value, const DtString &type)
 Add an entry to the list of the give name and type. More...
 
virtual DtEnvValueSP addDefaultVariablesToList (const DtString &name, const std::set< DtString > &valList, const DtString &type)
 Add a set of entries to the list of the give name and type. More...
 
virtual void removeDefaultVariable (const DtString &name)
 Remove the default variable with the given name. More...
 
virtual DtEnvValueSP removeDefaultVariableFromList (const DtString &name, const DtString &value, const DtString &type)
 Remove an entry from the list of the give name and type. More...
 
virtual DtEnvValueSP removeDefaultVariablesFromList (const DtString &name, const std::set< DtString > &valList, const DtString &type)
 Remove a set of entries from the list of the give name and type. More...
 
virtual void removeCommandsUsingDefaultVariable (const DtString &name)
 Remove the default variable with the given name. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, const DtString &value)
 Set the Default variable given a name and a string value. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, bool value)
 Set the Default variable given a name and a bool value. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, int value)
 Set the Default variable given a name and a int value. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, double value)
 Set the Default variable given a name and a double value. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, std::vector< DtString > &value)
 Set the default variable give a name and a string list. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, std::vector< int > &value)
 Set the default variable give a name and a int list. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, std::vector< bool > &value)
 Set the default variable give a name and a bool list. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, std::vector< double > &value)
 Set the default variable give a name and a double list. More...
 
const DtEnvironment & environment () const
 Get a constant reference to the environment used. More...
 

Protected Member Functions

virtual void getCommands (const DtString &stageName, DtCollector< DtCommand > commandCollector) const
 Get all the command from a given commands list. More...
 
virtual DtCommand generateCommand (DtEnvironment &commandObj) const
 Generate a command from the root object. More...
 
virtual DtAnyValuegenerateParameter (DtEnvironment &paramObj) const
 Generate a parameter from the root object. More...
 
bool commandHasVariable (DtEnvironment &commandEnv, const DtString &variableName) const
 Return true if the given command uses the given variable name. More...
 
virtual bool parseFile (const DtString &filename)
 Parse the file. More...
 
virtual DtEnvValueSP addVariableToEnvironment (const DtString &name, const DtString &varType, DtEnvironment &destinationEnvironment)
 Add the environment variable of name and type to the given environment. More...
 
virtual DtEnvValueSP addVariableValueToEnvironment (const DtString &name, const DtString &varType, const DtString &value, DtEnvironment &destinationEnvironment)
 Add the environment variable of name and type to the given environment. More...
 
virtual DtEnvValueSP setDefaultVariable (const DtString &name, const DtString &value, const DtString &type, DtEnvironment &destinationEnvironment)
 Using the given environment, set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP setDefaultVariableList (const DtString &name, const std::vector< DtString > &valList, const DtString &type, DtEnvironment &destinationEnvironment)
 Using the given environment, set a default object variable using a name, value and type. More...
 
virtual DtEnvValueSP addDefaultVariableToList (const DtString &name, const DtString &value, const DtString &type, DtEnvironment &destinationEnvironment)
 Add an entry to the list of the give name and type to the given environment. More...
 
virtual DtEnvValueSP addDefaultVariablesToList (const DtString &name, const std::set< DtString > &valList, const DtString &type, DtEnvironment &destinationEnvironment)
 Add a set of entries to the list of the give name and type to the given environment. More...
 
virtual const DtEnvValueSP getDefaultVariable (const DtString &name, const DtEnvironment &sourceEnvironment) const
 Get a variable by its name from the given environment. More...
 
virtual DtString getDefaultVariableValue (const DtString &name, const DtEnvironment &sourceEnvironment) const
 Get a variable's value by its name from the given environment. More...
 
virtual DtString getDefaultVariableType (const DtString &name, const DtEnvironment &sourceEnvironment) const
 Get a variable's type by its name from the given environment. More...
 
virtual void removeDefaultVariable (const DtString &name, DtEnvironment &sourceEnvironment)
 Remove the default variable with the given name from the given environment. More...
 
virtual DtEnvValueSP removeDefaultVariableFromList (const DtString &name, const DtString &value, const DtString &type, DtEnvironment &sourceEnvironment)
 Remove an entry from the list of the give name and type from the given environment. More...
 
virtual DtEnvValueSP removeDefaultVariablesFromList (const DtString &name, const std::set< DtString > &valList, const DtString &type, DtEnvironment &sourceEnvironment)
 Remove a set of entries from the list of the give name and type from the given environment.. More...
 
virtual void removeCommandsUsingDefaultVariable (const DtString &name, DtEnvNamedList &commandList)
 Remove the default variable with the given name. More...
 

Protected Attributes

bool myValidConfiguration
 
const DtRuntimeCommandFactorymyRuntimeFactory
 
DtEnvironment myEnvironment
 The configuration environment. More...
 
DtEnvironment myEnvironmentToSave
 The configuration environment without any temporary changes. More...
 
DtString myFileName
 

Detailed Description

The logger application configuration file loader.

Constructor & Destructor Documentation

MAKLogger::DtLoggerAppConfigLoader::DtLoggerAppConfigLoader ( const DtRuntimeCommandFactory factory,
const DtString &  filename 
)

Open a configuration.

virtual MAKLogger::DtLoggerAppConfigLoader::~DtLoggerAppConfigLoader ( )
virtual

Member Function Documentation

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addDefaultVariablesToList ( const DtString &  name,
const std::set< DtString > &  valList,
const DtString &  type 
)
virtual

Add a set of entries to the list of the give name and type.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addDefaultVariablesToList ( const DtString &  name,
const std::set< DtString > &  valList,
const DtString &  type,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Add a set of entries to the list of the give name and type to the given environment.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addDefaultVariableToList ( const DtString &  name,
const DtString &  value,
const DtString &  type 
)
virtual

Add an entry to the list of the give name and type.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addDefaultVariableToList ( const DtString &  name,
const DtString &  value,
const DtString &  type,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Add an entry to the list of the give name and type to the given environment.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addVariableToEnvironment ( const DtString &  name,
const DtString &  varType,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Add the environment variable of name and type to the given environment.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::addVariableValueToEnvironment ( const DtString &  name,
const DtString &  varType,
const DtString &  value,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Add the environment variable of name and type to the given environment.

bool MAKLogger::DtLoggerAppConfigLoader::commandHasVariable ( DtEnvironment &  commandEnv,
const DtString &  variableName 
) const
protected

Return true if the given command uses the given variable name.

const DtEnvironment& MAKLogger::DtLoggerAppConfigLoader::environment ( ) const

Get a constant reference to the environment used.

virtual DtCommand MAKLogger::DtLoggerAppConfigLoader::generateCommand ( DtEnvironment &  commandObj) const
protectedvirtual

Generate a command from the root object.

virtual DtAnyValue* MAKLogger::DtLoggerAppConfigLoader::generateParameter ( DtEnvironment &  paramObj) const
protectedvirtual

Generate a parameter from the root object.

virtual void MAKLogger::DtLoggerAppConfigLoader::getCommands ( const DtString &  stageName,
DtCollector< DtCommand commandCollector 
) const
protectedvirtual

Get all the command from a given commands list.

virtual const DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::getDefaultVariable ( const DtString &  name) const
virtual

Get a variable by its name.

If no variable is found the pointer returned will be null.

virtual const DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::getDefaultVariable ( const DtString &  name,
const DtEnvironment &  sourceEnvironment 
) const
protectedvirtual

Get a variable by its name from the given environment.

If no variable is found the pointer returned will be null.

virtual DtString MAKLogger::DtLoggerAppConfigLoader::getDefaultVariableType ( const DtString &  name) const
virtual

Get a variable's type by its name.

Return values
""the variable may not have been set.
virtual DtString MAKLogger::DtLoggerAppConfigLoader::getDefaultVariableType ( const DtString &  name,
const DtEnvironment &  sourceEnvironment 
) const
protectedvirtual

Get a variable's type by its name from the given environment.

Return values
""the variable may not have been set.
virtual DtString MAKLogger::DtLoggerAppConfigLoader::getDefaultVariableValue ( const DtString &  name) const
virtual

Get a variable's value by its name.

Return values
""the variable may not have been set.
virtual DtString MAKLogger::DtLoggerAppConfigLoader::getDefaultVariableValue ( const DtString &  name,
const DtEnvironment &  sourceEnvironment 
) const
protectedvirtual

Get a variable's value by its name from the given environment.

Return values
""the variable may not have been set.
virtual void MAKLogger::DtLoggerAppConfigLoader::getInitCommands ( DtCollector< DtCommand commandCollector) const
virtual

Get the logger commands.

virtual void MAKLogger::DtLoggerAppConfigLoader::getStartupCommands ( DtCollector< DtCommand commandCollector) const
virtual
virtual bool MAKLogger::DtLoggerAppConfigLoader::isValid ( ) const
virtual

Is the configuration valid.

virtual bool MAKLogger::DtLoggerAppConfigLoader::parseFile ( const DtString &  filename)
protectedvirtual

Parse the file.

Returns
Whether parsing the file was successful or not.
virtual void MAKLogger::DtLoggerAppConfigLoader::removeCommandsUsingDefaultVariable ( const DtString &  name)
virtual

Remove the default variable with the given name.

virtual void MAKLogger::DtLoggerAppConfigLoader::removeCommandsUsingDefaultVariable ( const DtString &  name,
DtEnvNamedList &  commandList 
)
protectedvirtual

Remove the default variable with the given name.

virtual void MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariable ( const DtString &  name)
virtual

Remove the default variable with the given name.

virtual void MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariable ( const DtString &  name,
DtEnvironment &  sourceEnvironment 
)
protectedvirtual

Remove the default variable with the given name from the given environment.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariableFromList ( const DtString &  name,
const DtString &  value,
const DtString &  type 
)
virtual

Remove an entry from the list of the give name and type.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariableFromList ( const DtString &  name,
const DtString &  value,
const DtString &  type,
DtEnvironment &  sourceEnvironment 
)
protectedvirtual

Remove an entry from the list of the give name and type from the given environment.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariablesFromList ( const DtString &  name,
const std::set< DtString > &  valList,
const DtString &  type 
)
virtual

Remove a set of entries from the list of the give name and type.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::removeDefaultVariablesFromList ( const DtString &  name,
const std::set< DtString > &  valList,
const DtString &  type,
DtEnvironment &  sourceEnvironment 
)
protectedvirtual

Remove a set of entries from the list of the give name and type from the given environment..

virtual void MAKLogger::DtLoggerAppConfigLoader::saveChanges ( )
virtual

Save changes to file.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
const DtString &  value,
const DtString &  type 
)
virtual

Set a default object variable using a name, value and type.

Assuming the type is a runtime variable type which contains serialize and deserialize functions.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
const DtString &  value 
)
virtual

Set the Default variable given a name and a string value.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
bool  value 
)
virtual

Set the Default variable given a name and a bool value.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
int  value 
)
virtual

Set the Default variable given a name and a int value.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
double  value 
)
virtual

Set the Default variable given a name and a double value.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
std::vector< DtString > &  value 
)
virtual

Set the default variable give a name and a string list.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
std::vector< int > &  value 
)
virtual

Set the default variable give a name and a int list.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
std::vector< bool > &  value 
)
virtual

Set the default variable give a name and a bool list.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
std::vector< double > &  value 
)
virtual

Set the default variable give a name and a double list.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariable ( const DtString &  name,
const DtString &  value,
const DtString &  type,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Using the given environment, set a default object variable using a name, value and type.

Assuming the type is a runtime variable type which contains serialize and deserialize functions.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariableList ( const DtString &  name,
const std::vector< DtString > &  valList,
const DtString &  type 
)
virtual

Set a default object variable using a name, value and type.

Assuming the type is a list and the list member type contains serialize and deserialize functions.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setDefaultVariableList ( const DtString &  name,
const std::vector< DtString > &  valList,
const DtString &  type,
DtEnvironment &  destinationEnvironment 
)
protectedvirtual

Using the given environment, set a default object variable using a name, value and type.

Assuming the type is a list and the list member type contains serialize and deserialize functions.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setTemporaryDefaultVariable ( const DtString &  name,
const DtString &  value,
const DtString &  type 
)
virtual

Set a default object variable using a name, value and type.

Assuming the type is a runtime variable type which contains serialize and deserialize functions.

virtual DtEnvValueSP MAKLogger::DtLoggerAppConfigLoader::setTemporaryDefaultVariableList ( const DtString &  name,
const std::vector< DtString > &  valList,
const DtString &  type 
)
virtual

Set a default object variable using a name, value and type.

Assuming the type is a list and the list member type contains serialize and deserialize functions.

Member Data Documentation

DtEnvironment MAKLogger::DtLoggerAppConfigLoader::myEnvironment
protected

The configuration environment.

DtEnvironment MAKLogger::DtLoggerAppConfigLoader::myEnvironmentToSave
protected

The configuration environment without any temporary changes.

DtString MAKLogger::DtLoggerAppConfigLoader::myFileName
protected
const DtRuntimeCommandFactory* MAKLogger::DtLoggerAppConfigLoader::myRuntimeFactory
protected
bool MAKLogger::DtLoggerAppConfigLoader::myValidConfiguration
protected

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)