9 #ifndef IMPBASE_FLAGS_H
10 #define IMPBASE_FLAGS_H
12 #include <IMP/base/base_config.h>
13 #include <boost/cstdint.hpp>
17 IMPBASE_BEGIN_NAMESPACE
40 std::string description);
51 std::string description);
67 std::string positional_description,
int num_positional);
77 std::string description);
92 std::string positional_description,
int num_positional);
102 std::string *storage);
107 IMPBASEEXPORT
void add_string_flag(std::string name, std::string default_value,
108 std::string description);
119 AddIntFlag(std::string name, std::string description,
120 boost::int64_t *storage);
125 IMPBASEEXPORT
void add_int_flag(std::string name,
size_t default_value,
126 std::string description);
137 AddBoolFlag(std::string name, std::string description,
bool *storage);
142 IMPBASEEXPORT
void add_bool_flag(std::string name, std::string description);
153 AddFloatFlag(std::string name, std::string description,
double *storage);
158 IMPBASEEXPORT
void add_float_flag(std::string name,
double default_value,
159 std::string description);
166 IMPBASEEXPORT
void write_help(std::ostream &out = std::cerr);
168 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
180 IMPBASE_END_NAMESPACE
size_t get_int_flag(std::string name)
double get_float_flag(std::string name)
void add_float_flag(std::string name, double default_value, std::string description)
bool get_bool_flag(std::string name)
IMP::base::Vector< String > Strings
Standard way to pass a bunch of String values.
std::string get_string_flag(std::string name)
void add_bool_flag(std::string name, std::string description)
void add_string_flag(std::string name, std::string default_value, std::string description)
Use this to add an advanced flag to the program.
void write_help(std::ostream &out=std::cerr)
void add_int_flag(std::string name, size_t default_value, std::string description)
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Strings setup_from_argv_allowing_unknown(int argc, char **argv, std::string description)
std::string get_executable_name()
Return the name of the current executable.