19 #ifndef PISM_OPTIONS_H
20 #define PISM_OPTIONS_H
27 #include "pism/util/options.hh"
38 void show_usage(
const Logger &log,
const std::string &execname,
const std::string &usage);
43 const std::string &execname,
44 const std::vector<std::string> &required_options,
45 const std::string &usage);
57 String(
const std::string& option,
58 const std::string& description);
60 String(
const std::string& option,
61 const std::string& description,
62 const std::string& default_value,
65 int process(
const std::string& option,
66 const std::string& description,
67 const std::string& default_value,
73 Keyword(
const std::string& option,
74 const std::string& description,
75 const std::string& choices,
76 const std::string& default_value);
81 Integer(
const std::string& option,
82 const std::string& description,
89 const std::string& description,
90 const std::vector<int> &defaults);
96 Real(std::shared_ptr<units::System> system,
97 const std::string& option,
98 const std::string& description,
99 const std::string& units,
100 double default_value);
106 const std::string& description,
107 const std::vector<double> &default_value);
111 bool Bool(
const std::string& option,
112 const std::string& description);
114 void deprecated(
const std::string &old_name,
const std::string &new_name);
IntegerList(const std::string &option, const std::string &description, const std::vector< int > &defaults)
const int & operator[](size_t index) const
Integer(const std::string &option, const std::string &description, int default_value)
Keyword(const std::string &option, const std::string &description, const std::string &choices, const std::string &default_value)
Template base class used by PISM's option-processing classes.
RealList(const std::string &option, const std::string &description, const std::vector< double > &default_value)
const double & operator[](size_t index) const
Real(std::shared_ptr< units::System > system, const std::string &option, const std::string &description, const std::string &units, double default_value)
String(const std::string &option, const std::string &description)
int process(const std::string &option, const std::string &description, const std::string &default_value, ArgumentFlag flag)
void deprecated(const std::string &old_name, const std::string &new_name)
Stop if an option old_name is set, printing a message that new_name should be used instead.
bool Bool(const std::string &option, const std::string &description)
void ignored(const Logger &log, const std::string &name)
Print a warning telling the user that an option was ignored.
void forbidden(const std::string &name)
Stop if an option name is set.
void show_usage(const Logger &log, const std::string &execname, const std::string &usage)
Print a usage message.
bool show_usage_check_req_opts(const Logger &log, const std::string &execname, const std::vector< std::string > &required_options, const std::string &usage)
In a single call a driver program can provide a usage string to the user and check if required option...