fesa-core
7.0.0
|
Take care of configuring the FESA process from either configuration files or command line arguments. More...
#include <ProcessConfigurer.h>
Inherits noncopyable.
Public Member Functions | |
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... | |
bool | ignorePersistenceErrors () const |
Returns true if persistence errors at startup should be ignored. | |
const std::string & | getUsrCmdArgs () const |
Get the user command line arguments. More... | |
const std::string & | getRDAClientDirectoryServer () const |
Returns the directory server to be used for RDA client service, or an empty string if not specific directory server is used. | |
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... | |
Protected Member Functions | |
ProcessConfigurer (cmw::util::CmdOptions::CmdArgList argList) | |
Constructor. More... | |
void | setIntValue (const std::string &tag, int value) |
Set a numerical property's value. More... | |
void | setBoolValue (const std::string &tag, bool value) |
Set a boolean property's value. More... | |
Take care of configuring the FESA process from either configuration files or command line arguments.
FesaException | If an invalid command line argument was specified |
|
protected |
Constructor.
argList | list of the command line arguments |
bool fesa::ProcessConfigurer::getBoolValue | ( | const std::string & | tag | ) | const |
Get a boolean property's value.
tag | The name of the property |
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.
const std::string & fesa::ProcessConfigurer::getCMWServerName | ( | ) | const |
Get the name of the CMW server.
int fesa::ProcessConfigurer::getIntValue | ( | const std::string & | tag | ) | const |
Get a numerical property's value.
tag | The name of the property |
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.
tag | The name of the property |
defaultValue | the value to return in case of an error |
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.
const std::string & fesa::ProcessConfigurer::getLogConfigFile | ( | ) | const |
Get the name and location of the logging configuration file.
LoggingMode::LoggingMode fesa::ProcessConfigurer::getLoggingMode | ( | ) | const |
Get the logging mode - normal, verbose, or very verbose.
const std::string & fesa::ProcessConfigurer::getMsgConfigFile | ( | ) | const |
Get the name and location of the file with exception messages.
std::string fesa::ProcessConfigurer::getStringValue | ( | const std::string & | tag | ) | const |
Get a string property's value.
tag | The name of the property |
FesaException | If the property with the given name was not found |
const std::string & fesa::ProcessConfigurer::getUsrCmdArgs | ( | ) | const |
Get the user command line arguments.
void fesa::ProcessConfigurer::init | ( | int | argc, |
char * | argv[] | ||
) |
Create process configuration.
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.
tag | The name of the property |
bool fesa::ProcessConfigurer::isHelpNeeded | ( | ) | const |
Check if user spcified a help argument.
bool fesa::ProcessConfigurer::isInTimingSimulationMode | ( | ) | const |
Check if timing simulation is enabled.
|
virtual |
Decode the command line arguments and load the configuration files. All configuration parameters frome these files are stored in this class.
configDirs | Directories where the configuration files are |
|
protected |
Set a boolean property's value.
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.
name | The name of the CMW server |
|
protected |
Set a numerical property's value.
tag | The name of the property |
value | The value of the property |