BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Handles command line and config file program options.
Definition at line 31 of file AppOptions.h.
Public Member Functions | |
ApplicationOptions (int argc=0, char **argv=0) | |
bool | disableHighDPISupport () const |
bool | find (std::string name) const |
Returns true if option with given name has been set. 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... | |
Private Member Functions | |
bpo::options_description & | getOptions () |
Returns reference to the options description. More... | |
bpo::variables_map & | getVariables () |
Returns reference to the variables container. More... | |
void | parseCommandLine (int argc, char **argv) |
Parses command line arguments. More... | |
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 |
ApplicationOptions::ApplicationOptions | ( | int | argc = 0 , |
char ** | argv = 0 |
||
) |
Definition at line 60 of file AppOptions.cpp.
References m_options, parseCommandLine(), and processOptions().
bool ApplicationOptions::disableHighDPISupport | ( | ) | const |
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 81 of file AppOptions.cpp.
References m_variables_map, and GUI::RealSpace::Particles::name().
Referenced by disableHighDPISupport(), and main().
|
private |
Returns reference to the options description.
Definition at line 120 of file AppOptions.cpp.
References m_options.
|
private |
Returns reference to the variables container.
Definition at line 115 of file AppOptions.cpp.
References m_variables_map.
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 76 of file AppOptions.cpp.
References m_variables_map.
|
private |
Parses command line arguments.
parse command line arguments
Definition at line 88 of file AppOptions.cpp.
References m_options, m_positional_options, and m_variables_map.
Referenced by ApplicationOptions().
|
private |
Definition at line 125 of file AppOptions.cpp.
References GUI::Util::Path::getBornAgainVersionString(), m_options, m_variables_map, and mainWindowSize().
Referenced by ApplicationOptions().
|
private |
options description, to be filled with add() from different program modules
Definition at line 60 of file AppOptions.h.
Referenced by ApplicationOptions(), getOptions(), parseCommandLine(), and processOptions().
|
private |
true if options are consistent (no conflicts, no –help request)
Definition at line 58 of file AppOptions.h.
|
private |
positional options description, to be filled with addPositional() from main module
Definition at line 62 of file AppOptions.h.
Referenced by parseCommandLine().
|
private |
Definition at line 63 of file AppOptions.h.
Referenced by find(), getVariables(), mainWindowSize(), operator[](), parseCommandLine(), and processOptions().