Take care of configuring the FESA process from either configuration files or command line arguments.
More...
#include <ProcessConfigurer.h>
Inherits noncopyable.
|
| ProcessConfigurer () |
| Constructor.
|
|
virtual | ~ProcessConfigurer () |
| Destructor.
|
|
void | init (int argc, char *argv[]) |
| Create process configuration. More...
|
|
bool | isHelpNeeded () const |
| Check if user spcified a help argument. More...
|
|
void | printHelp () const |
| Print out information on arguments that can be given to a Fesa binary.
|
|
virtual void | load (const ConfigDirs &configDirs) |
| Decode the command line arguments and load the configuration files. All configuration parameters frome these files are stored in this class. More...
|
|
const std::string & | getLogConfigFile () const |
| Get the name and location of the logging configuration file. More...
|
|
const std::string & | getCMWConfigFile () const |
| Get the name and location of the CMW configuration file. More...
|
|
const std::string & | getMsgConfigFile () const |
| Get the name and location of the file with exception messages. More...
|
|
const std::string & | getLabMsgConfigFile () const |
| Get the name and location of the lab specific file with exception messages. More...
|
|
const std::string & | getCMWServerName () const |
| Get the name of the CMW server. More...
|
|
void | setCMWServerName (const std::string &name) |
| Set the name of the CMW server. More...
|
|
bool | isInTimingSimulationMode () const |
| Check if timing simulation is enabled. More...
|
|
LoggingMode::LoggingMode | getLoggingMode () const |
| Get the logging mode - normal, verbose, or very verbose. More...
|
|
const std::string & | getUsrCmdArgs () const |
| Get the user command line arguments. More...
|
|
bool | isDefined (const std::string &tag) const |
| Check if a property is defined. More...
|
|
std::string | getStringValue (const std::string &tag) const |
| Get a string property's value. More...
|
|
int | getIntValue (const std::string &tag) const |
| Get a numerical property's value. More...
|
|
int | getIntValue (const std::string &tag, int defaultValue) const |
| Get a numerical property's value. If it is not found or in a bad format, returns a default value. More...
|
|
bool | getBoolValue (const std::string &tag) const |
| Get a boolean property's value. More...
|
|
Take care of configuring the FESA process from either configuration files or command line arguments.
- Exceptions
-
fesa::ProcessConfigurer::ProcessConfigurer |
( |
cmw::util::CmdOptions::CmdArgList |
argList | ) |
|
|
protected |
Constructor.
- Parameters
-
argList | list of the command line arguments |
bool fesa::ProcessConfigurer::getBoolValue |
( |
const std::string & |
tag | ) |
const |
Get a boolean property's value.
- Parameters
-
tag | The name of the property |
- Returns
- The value of the property
- Exceptions
-
FesaException | If the property with the given name was not found or the property is not boolean |
const std::string & fesa::ProcessConfigurer::getCMWConfigFile |
( |
| ) |
const |
Get the name and location of the CMW configuration file.
- Returns
- The name and location of the CMW configuration file
const std::string & fesa::ProcessConfigurer::getCMWServerName |
( |
| ) |
const |
Get the name of the CMW server.
- Returns
- The name of the CMW server
int fesa::ProcessConfigurer::getIntValue |
( |
const std::string & |
tag | ) |
const |
Get a numerical property's value.
- Parameters
-
tag | The name of the property |
- Returns
- The value of the property
- Exceptions
-
FesaException | If the property with the given name was not found or the property is not numerical |
int fesa::ProcessConfigurer::getIntValue |
( |
const std::string & |
tag, |
|
|
int |
defaultValue |
|
) |
| const |
Get a numerical property's value. If it is not found or in a bad format, returns a default value.
- Parameters
-
tag | The name of the property |
defaultValue | the value to return in case of an error |
- Returns
- The value of the property
- Exceptions
-
FesaException | If the property with the given name was not found or the property is not numerical |
const std::string & fesa::ProcessConfigurer::getLabMsgConfigFile |
( |
| ) |
const |
Get the name and location of the lab specific file with exception messages.
- Returns
- The name and location of the CMW configuration file
const std::string & fesa::ProcessConfigurer::getLogConfigFile |
( |
| ) |
const |
Get the name and location of the logging configuration file.
- Returns
- The name and location of the logging configuration file
LoggingMode::LoggingMode fesa::ProcessConfigurer::getLoggingMode |
( |
| ) |
const |
Get the logging mode - normal, verbose, or very verbose.
- Returns
- The logging mode
const std::string & fesa::ProcessConfigurer::getMsgConfigFile |
( |
| ) |
const |
Get the name and location of the file with exception messages.
- Returns
- The name and location of the CMW configuration file
std::string fesa::ProcessConfigurer::getStringValue |
( |
const std::string & |
tag | ) |
const |
Get a string property's value.
- Parameters
-
tag | The name of the property |
- Returns
- The value of the property
- Exceptions
-
const std::string & fesa::ProcessConfigurer::getUsrCmdArgs |
( |
| ) |
const |
Get the user command line arguments.
- Returns
- The user command line arguments
void fesa::ProcessConfigurer::init |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Create process configuration.
- Parameters
-
argc | argc given to main |
argv | argv given to main |
bool fesa::ProcessConfigurer::isDefined |
( |
const std::string & |
tag | ) |
const |
Check if a property is defined.
- Parameters
-
tag | The name of the property |
- Returns
- true if the property is defined, false otherwise
bool fesa::ProcessConfigurer::isHelpNeeded |
( |
| ) |
const |
Check if user spcified a help argument.
- Returns
- true if a help argument was specified, false otherwise
bool fesa::ProcessConfigurer::isInTimingSimulationMode |
( |
| ) |
const |
Check if timing simulation is enabled.
- Returns
- true if timing simulation is enabled, false otherwise
void fesa::ProcessConfigurer::load |
( |
const ConfigDirs & |
configDirs | ) |
|
|
virtual |
Decode the command line arguments and load the configuration files. All configuration parameters frome these files are stored in this class.
- Parameters
-
configDirs | Directories where the configuration files are |
void fesa::ProcessConfigurer::setBoolValue |
( |
const std::string & |
tag, |
|
|
bool |
value |
|
) |
| |
|
protected |
Set a boolean property's value.
- Parameters
-
tag | The name of the property |
value | The value of the property |
void fesa::ProcessConfigurer::setCMWServerName |
( |
const std::string & |
name | ) |
|
Set the name of the CMW server.
- Parameters
-
name | The name of the CMW server |
void fesa::ProcessConfigurer::setIntValue |
( |
const std::string & |
tag, |
|
|
int |
value |
|
) |
| |
|
protected |
Set a numerical property's value.
- Parameters
-
tag | The name of the property |
value | The value of the property |
The documentation for this class was generated from the following files:
- ProcessConfigurer.h
- ProcessConfigurer.cpp