Class to read parameters given from the command line and from a parameter file.
More...
#include <configuration_helper.hh>
Class to read parameters given from the command line and from a parameter file.
◆ ConfigurationHelper() [1/3]
DiFfRG::ConfigurationHelper::ConfigurationHelper |
( |
int | argc, |
|
|
char * | argv[], |
|
|
const std::string | parameter_file = "parameter.json" ) |
Construct a new Configuration Helper object To get an overview of the available arguments, just pass –help as an argument.
- Parameters
-
argc | Forwarded argc from main() function |
argv | Forwarded argv from main() function |
parameter_file | The name of the parameter file to be read |
◆ ConfigurationHelper() [2/3]
Copy a Configuration Helper.
◆ ConfigurationHelper() [3/3]
DiFfRG::ConfigurationHelper::ConfigurationHelper |
( |
const JSONValue & | json | ) |
|
Construct a new Configuration Helper object from a JSONValue object.
◆ append()
void DiFfRG::ConfigurationHelper::append |
( |
std::string | arg | ) |
|
Add a CLI-like argument to the list of arguments.
◆ generate_parameter_file()
void DiFfRG::ConfigurationHelper::generate_parameter_file |
( |
| ) |
|
|
private |
◆ get_json() [1/2]
JSONValue & DiFfRG::ConfigurationHelper::get_json |
( |
| ) |
|
Obtain the JSON object containing all the parameters.
◆ get_json() [2/2]
const JSONValue & DiFfRG::ConfigurationHelper::get_json |
( |
| ) |
const |
Obtain the JSON object containing all the parameters.
◆ get_log_file()
std::string DiFfRG::ConfigurationHelper::get_log_file |
( |
| ) |
const |
◆ get_output_folder()
std::string DiFfRG::ConfigurationHelper::get_output_folder |
( |
| ) |
const |
◆ get_output_name()
std::string DiFfRG::ConfigurationHelper::get_output_name |
( |
| ) |
const |
◆ get_parameter_file()
std::string DiFfRG::ConfigurationHelper::get_parameter_file |
( |
| ) |
const |
◆ get_top_folder()
std::string DiFfRG::ConfigurationHelper::get_top_folder |
( |
| ) |
const |
◆ parse()
void DiFfRG::ConfigurationHelper::parse |
( |
| ) |
|
|
private |
◆ parse_cli()
void DiFfRG::ConfigurationHelper::parse_cli |
( |
| ) |
|
|
private |
◆ print_usage_message()
void DiFfRG::ConfigurationHelper::print_usage_message |
( |
| ) |
|
|
private |
◆ setup_logging()
void DiFfRG::ConfigurationHelper::setup_logging |
( |
| ) |
|
|
private |
◆ args
std::list<std::string> DiFfRG::ConfigurationHelper::args |
|
private |
◆ cli_parameters
std::list<std::pair<std::string, std::string> > DiFfRG::ConfigurationHelper::cli_parameters |
|
private |
◆ depth_console
uint DiFfRG::ConfigurationHelper::depth_console = 0 |
|
private |
◆ depth_file
uint DiFfRG::ConfigurationHelper::depth_file = 3 |
|
private |
◆ json
◆ logger_initialized
bool DiFfRG::ConfigurationHelper::logger_initialized |
|
staticprivate |
◆ parameter_file
std::string DiFfRG::ConfigurationHelper::parameter_file |
|
private |
◆ parsed
bool DiFfRG::ConfigurationHelper::parsed |
|
private |
The documentation for this class was generated from the following file: