The configuration object parses the command line and loads a configuration file to provide the user configurable data to the application.
More...
|
| | Configuration () |
| | Constructor for default version. More...
|
| |
| | Configuration (const std::string &fileName) |
| | Constructor from a config file. More...
|
| |
| virtual | ~Configuration () |
| | Destructor. More...
|
| |
| virtual Configuration * | clone () const |
| | Clone a copy of the configuration. More...
|
| |
| template<typename DATA_TYPE > |
| void | registerParameter (const std::string &string) |
| | Register a parameter to be searched for in the config files or command line. More...
|
| |
| virtual int | processArguments (int argc, char **argv) |
| | Process command line arguments as parameter name-value pairs. More...
|
| |
| virtual bool | processParameters (const std::map< std::string, std::string > ¶meterValuePairs) |
| | Process parameter name-value pairs. More...
|
| |
| virtual bool | hasParameter (const std::string ¶meterName) const |
| | Return whether a parameter with the given name has been registered in this Configuration, but may be not set. More...
|
| |
| virtual bool | isParameterSet (const std::string ¶meterName) const |
| | Return whether a parameter with the given name has been registered and has a value in this Configuration. More...
|
| |
| virtual bool | loadParameters (const std::string &fileName) |
| | Load parameters from a file Return whether the parameters were loaded successfully. More...
|
| |
| virtual bool | saveParameters (const std::string &filename) const |
| | Save parameters to a file Return whether the parameters were saved successfully. More...
|
| |
| template<typename DATA_TYPE > |
| void | setParameter (const std::string ¶meterName, DATA_TYPE parameterValue) |
| | Set the parameter value of the specified type for the given parameter name. More...
|
| |
| template<typename DATA_TYPE > |
| DATA_TYPE | parameter (const std::string ¶meterName) const |
| | Get the parameter value with the given name as the expected type. More...
|
| |
| template<typename DATA_TYPE > |
| DATA_TYPE | parameterOr (const std::string ¶meterName, DATA_TYPE defaultValue) const |
| | Get the parameter value with the given name as the expected type Supplied default value is used if parameter is not found. More...
|
| |
| virtual void | setUnitMultiplier (const std::string ¶meterName, float multiplier) |
| | Set a unit multiplier that is applied to numeric values of the given parameter name Only applies to numeric parameters. More...
|
| |
| virtual float | unitMultiplier (const std::string ¶meterName) const |
| | Get the unit multiplier for the given parameter name. More...
|
| |
| virtual std::string | helpString () const |
| |
| ConfigHandle | handle () const |
| |
The configuration object parses the command line and loads a configuration file to provide the user configurable data to the application.
template<typename DATA_TYPE >
| void Legion::Configuration::registerParameter |
( |
const std::string & |
string | ) |
|
Register a parameter to be searched for in the config files or command line.
This does not set a default value and the parameter is considered not set until found on the command line, in a config file, or set manually though the API