utilities
0.0
|
#include <Options.h>
Public Member Functions | |
Options (std::string program, std::string input="") | |
Construct Options object. More... | |
Options (std::string program, int argc, char *argv[]) | |
std::vector< int > | parameter (const std::string &key, const std::vector< int > &def) const |
Obtain an integer parameter. More... | |
int | parameter (const std::string &key, int def=0) const |
std::vector< double > | parameter (const std::string &key, const std::vector< double > &def) const |
Obtain a real parameter. More... | |
double | parameter (const std::string &key, double def) const |
std::vector< std::string > | parameter (const std::string &key, const std::vector< std::string > &def, bool molpro_parameter=false) const |
Obtain a string parameter. More... | |
std::string | parameter (const std::string &key, const std::string &def) const |
void | addParameter (const std::string &key, const std::vector< std::string > &values, bool echo=false) |
Add a parameter with array values. More... | |
void | addParameter (const std::string &key, const std::vector< int > &values, bool echo=false) |
Add a parameter with array values. More... | |
void | addParameter (const std::string &key, const std::vector< double > &values, bool echo=false) |
Add a parameter with array values. More... | |
void | addParameter (const std::string &key, const std::string &value, bool echo=false) |
Add a parameter with a scalar value. More... | |
void | addParameter (const std::string &key, const int &value, bool echo=false) |
Add a parameter with a scalar value. More... | |
void | addParameter (const std::string &key, const double &value, bool echo=false) |
Add a parameter with a scalar value. More... | |
std::string | data () const |
|
explicit |
Construct Options object.
input | Namelist format option specifier |
program | Name of code module owning this set of options. In the Molpro context, this is the registry set. |
|
explicit |
void molpro::Options::addParameter | ( | const std::string & | key, |
const double & | value, | ||
bool | echo = false |
||
) |
Add a parameter with a scalar value.
key | key |
value | value |
echo | whether to print the parameter and value |
void molpro::Options::addParameter | ( | const std::string & | key, |
const int & | value, | ||
bool | echo = false |
||
) |
Add a parameter with a scalar value.
key | key |
value | value |
echo | whether to print the parameter and value |
void molpro::Options::addParameter | ( | const std::string & | key, |
const std::string & | value, | ||
bool | echo = false |
||
) |
Add a parameter with a scalar value.
key | key |
value | value |
echo | whether to print the parameter and value |
void molpro::Options::addParameter | ( | const std::string & | key, |
const std::vector< double > & | values, | ||
bool | echo = false |
||
) |
Add a parameter with array values.
key | key |
values | values |
echo | whether to print the parameter and value |
void molpro::Options::addParameter | ( | const std::string & | key, |
const std::vector< int > & | values, | ||
bool | echo = false |
||
) |
Add a parameter with array values.
key | key |
values | values |
echo | whether to print the parameter and value |
void molpro::Options::addParameter | ( | const std::string & | key, |
const std::vector< std::string > & | values, | ||
bool | echo = false |
||
) |
Add a parameter with array values.
key | key |
values | values |
echo | whether to print the parameter and value |
|
inline |
std::string molpro::Options::parameter | ( | const std::string & | key, |
const std::string & | def | ||
) | const |
std::vector< double > molpro::Options::parameter | ( | const std::string & | key, |
const std::vector< double > & | def | ||
) | const |
Obtain a real parameter.
key | The name of the parameter |
def | Default value if the parameter is not found. |
std::vector< int > molpro::Options::parameter | ( | const std::string & | key, |
const std::vector< int > & | def | ||
) | const |
Obtain an integer parameter.
key | The name of the parameter |
def | Default value if the parameter is not found. |
std::vector< std::string > molpro::Options::parameter | ( | const std::string & | key, |
const std::vector< std::string > & | def, | ||
bool | molpro_parameter = false |
||
) | const |
Obtain a string parameter.
key | The name of the parameter |
def | Default value if the parameter is not found. |
double molpro::Options::parameter | ( | const std::string & | key, |
double | def | ||
) | const |
int molpro::Options::parameter | ( | const std::string & | key, |
int | def = 0 |
||
) | const |