|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Handles command line and config file program options. More...
Public Member Functions | |
| ApplicationOptions (int argc=0, char **argv=0) | |
| bool | disableHighDPISupport () |
| bool | find (std::string name) const |
| Returns true if option with given name has been set. More... | |
| bpo::options_description & | getOptions () |
| Returns reference to the options description. More... | |
| bpo::variables_map & | getVariables () |
| Returns reference to the variables container. More... | |
| bool | isConsistent () const |
| Returns true if options are consistent (no conflicts, no –help request) More... | |
| QSize | mainWindowSize () const |
| const bpo::variable_value & | operator[] (const std::string &s) const |
| access to variable with given name defined in variables container More... | |
| void | parseCommandLine (int argc, char **argv) |
| Parses command line arguments. More... | |
| void | printHelpMessage () const |
| void | processOptions () |
Private Attributes | |
| bpo::options_description | m_options |
| options description, to be filled with add() from different program modules More... | |
| bool | m_options_is_consistent |
| true if options are consistent (no conflicts, no –help request) More... | |
| bpo::positional_options_description | m_positional_options |
| positional options description, to be filled with addPositional() from main module More... | |
| bpo::variables_map | m_variables_map |
Handles command line and config file program options.
Definition at line 32 of file appoptions.h.
| ApplicationOptions::ApplicationOptions | ( | int | argc = 0, |
| char ** | argv = 0 |
||
| ) |
Definition at line 49 of file appoptions.cpp.
References m_options, parseCommandLine(), and processOptions().
| bool ApplicationOptions::disableHighDPISupport | ( | ) |
Definition at line 151 of file appoptions.cpp.
References find().
Referenced by main().
| bool ApplicationOptions::find | ( | std::string | name | ) | const |
Returns true if option with given name has been set.
Definition at line 70 of file appoptions.cpp.
References m_variables_map, and RealSpace::Particles::name().
Referenced by disableHighDPISupport(), and main().
| boost::program_options::options_description & ApplicationOptions::getOptions | ( | ) |
Returns reference to the options description.
Definition at line 113 of file appoptions.cpp.
References m_options.
| boost::program_options::variables_map & ApplicationOptions::getVariables | ( | ) |
Returns reference to the variables container.
Definition at line 108 of file appoptions.cpp.
References m_variables_map.
| bool ApplicationOptions::isConsistent | ( | ) | const |
Returns true if options are consistent (no conflicts, no –help request)
Definition at line 75 of file appoptions.cpp.
References m_options_is_consistent.
Referenced by main().
| QSize ApplicationOptions::mainWindowSize | ( | ) | const |
Definition at line 145 of file appoptions.cpp.
References m_variables_map.
Referenced by main(), and processOptions().
| const bpo::variable_value & ApplicationOptions::operator[] | ( | const std::string & | s | ) | const |
access to variable with given name defined in variables container
access variables
Definition at line 65 of file appoptions.cpp.
References m_variables_map.
| void ApplicationOptions::parseCommandLine | ( | int | argc, |
| char ** | argv | ||
| ) |
Parses command line arguments.
parse command line arguments
Definition at line 82 of file appoptions.cpp.
References m_options, m_options_is_consistent, m_positional_options, and m_variables_map.
Referenced by ApplicationOptions().
| void ApplicationOptions::printHelpMessage | ( | ) | const |
Definition at line 139 of file appoptions.cpp.
References m_options.
Referenced by processOptions().
| void ApplicationOptions::processOptions | ( | ) |
Definition at line 118 of file appoptions.cpp.
References GUIHelpers::getBornAgainVersionString(), m_options_is_consistent, m_variables_map, mainWindowSize(), and printHelpMessage().
Referenced by ApplicationOptions().
|
private |
options description, to be filled with add() from different program modules
Definition at line 66 of file appoptions.h.
Referenced by ApplicationOptions(), getOptions(), parseCommandLine(), and printHelpMessage().
|
private |
true if options are consistent (no conflicts, no –help request)
Definition at line 64 of file appoptions.h.
Referenced by isConsistent(), parseCommandLine(), and processOptions().
|
private |
positional options description, to be filled with addPositional() from main module
Definition at line 68 of file appoptions.h.
Referenced by parseCommandLine().
|
private |
Definition at line 69 of file appoptions.h.
Referenced by find(), getVariables(), mainWindowSize(), operator[](), parseCommandLine(), and processOptions().