all PIPS-IPM++ options
More...
#include <PIPSIPMppOptions.h>
|
| template<typename T> |
| static void | add_parameter (Category category, const std::string &identifier, const std::string &description, const T &defaultval, const std::vector< std::pair< T, std::string > > &possiblevals=std::vector< std::pair< T, std::string > >()) |
| | add parameter, possibly with list of possible values
|
| template<typename T> |
| static void | add_parameter (Category category, const std::string &identifier, const std::string &description, const T &defaultval, const T &minval, const T &maxval=std::numeric_limits< T >::has_infinity ? std::numeric_limits< T >::infinity() :std::numeric_limits< T >::max()) |
| | add parameter, possibly with bounds on possible values; not available for string and bool
|
| template<typename T> |
| static void | set_parameter_default (const std::string &identifier, const T &newdefaultval) |
| | overwrite default value of parameter, resets current value to default
|
|
|
static std::unordered_map< std::string, Option< double > > | double_options |
| | double-valued options
|
|
static std::unordered_map< std::string, Option< int > > | int_options |
| | integer-valued options
|
|
static std::unordered_map< std::string, Option< bool > > | bool_options |
| | boolean-valued options
|
|
static std::unordered_map< std::string, Option< std::string > > | string_options |
| | string-valued options
|
◆ add_parameter() [1/2]
template<typename T>
| void pipsipmpp::options::PIPSIPMppOptions::add_parameter |
( |
Category | category, |
|
|
const std::string & | identifier, |
|
|
const std::string & | description, |
|
|
const T & | defaultval, |
|
|
const std::vector< std::pair< T, std::string > > & | possiblevals = std::vector< std::pair< T, std::string > >() ) |
|
staticprotected |
add parameter, possibly with list of possible values
- Parameters
-
| category | category where to add option |
| identifier | name of option |
| description | description of option |
| defaultval | default value of option |
| possiblevals | a list of possible values, each with a description; or empty if any value is possible |
◆ add_parameter() [2/2]
template<typename T>
| void pipsipmpp::options::PIPSIPMppOptions::add_parameter |
( |
Category | category, |
|
|
const std::string & | identifier, |
|
|
const std::string & | description, |
|
|
const T & | defaultval, |
|
|
const T & | minval, |
|
|
const T & | maxval = std::numeric_limits< T >::has_infinity ? std::numeric_limits< T >::infinity() :std::numeric_limits< T >::max() ) |
|
staticprotected |
add parameter, possibly with bounds on possible values; not available for string and bool
- Parameters
-
| category | category where to add option |
| identifier | name of option |
| description | description of option |
| defaultval | default value of option |
| minval | minimal value the option can be set to |
| maxval | maximal value the option can be set to |
◆ set_parameter_default()
template<typename T>
| void pipsipmpp::options::PIPSIPMppOptions::set_parameter_default |
( |
const std::string & | identifier, |
|
|
const T & | newdefaultval ) |
|
staticprotected |
overwrite default value of parameter, resets current value to default
- Parameters
-
| identifier | name of option |
| newdefaultval | new default value of option |
◆ adjust_options
updates some options settings according to other settings that may have been set should be called after options file has been read
◆ get_option
template<typename T>
| const Option< T > & get_option |
( |
const std::string & | identifier | ) |
|
|
friend |
get option object for option name
- Parameters
-
| identifier | name of option to get |
- Returns
- Option which name is identifier
◆ print_modified_options
| void print_modified_options |
( |
std::ostream & | out | ) |
|
|
friend |
write out all options not set to default
- Parameters
-
◆ print_options_docu
| void print_options_docu |
( |
std::ostream & | out | ) |
|
|
friend |
write out all options that have been set
- Parameters
-
◆ set_option
| void set_option |
( |
const std::string & | opt_setting | ) |
|
|
friend |
process a single option setting line (OPT=val)
- Parameters
-
| opt_setting | option setting to apply |
◆ set_options
| void set_options |
( |
const std::string & | opt_file | ) |
|
|
friend |
read options from an options file
- Parameters
-
| opt_file | name of options file |
◆ set_parameter
template<typename T>
| void set_parameter |
( |
const std::string & | identifier, |
|
|
const T & | value ) |
|
friend |
set string-valued option
- Parameters
-
| identifier | name of option to set |
| value | value the option should be set to |