Option handling for the file-based parallel overlap probability tool.
More...
#include "parprobopts.hh"
|
virtual bool | check_variables () |
|
virtual std::ostream & | version_info (std::ostream &out) const |
|
| Polite (const std::string &descr="Options") |
|
template<typename Opttype > |
void | add_option (const std::string &name, Opttype *optvarp, const Opttype &defval, const std::string &descr, const char nm= '\0') |
|
void | add_bool_switch (const std::string &name, bool *varp, const std::string &descr, const char nm= '\0') |
|
template<typename Opttype > |
void | add_mandatory_option (const std::string &name, const std::string &descr, const char nm= '\0') |
|
bool | perform_parsing (int argc, char *argv[]) |
|
bool | option_seen (const std::string &optnm) const |
|
template<typename Opttype > |
Opttype | fetch_value (const std::string &optnm) const |
|
void | add_error (const std::string &msg) |
|
void | error_reset () |
| Reset the error status to "no error".
|
|
|
typedef std::vector< std::string > | filenames_t |
|
Option handling for the file-based parallel overlap probability tool.
virtual bool multovl::prob::ParProbOpts::check_variables |
( |
| ) |
|
|
protectedvirtual |
Derived classes must override this method so that first an appropriate base class version is invoked to process the base class' commandline variables and then additional processing must be done on the derived class' variables if /true/ was returned, like this:-
bool DerivedOpts::check_variables()
{
bool ok = BaseOpts::check_variables(); // don't invoke Polite::check_variables() !
if (ok) {
// e.g. check some variables here
if (option_seen("opt") > 0)
{
int opt = fetch_value<int>("opt");
if (opt < 1) opt = 1;
// ...
ok = true;
}
else
{
add_error("opt must be present");
ok = false;
}
}
return ok;
}
Reimplemented from multovl::prob::ProbOpts.
virtual std::ostream& multovl::prob::ParProbOpts::print_help |
( |
std::ostream & |
out | ) |
const |
|
virtual |
Prints help, using the facilities provided by boost::program_options
- Parameters
-
out | this is the stream the help text is printed to. |
- Returns
- /out/ is returned here
Reimplemented from multovl::prob::ProbOpts.
unsigned int multovl::prob::ParProbOpts::threads |
( |
| ) |
const |
|
inline |
- Returns
- the number of threads requested
The documentation for this class was generated from the following file: