9#ifndef IMPKERNEL_FLAGS_H
10#define IMPKERNEL_FLAGS_H
12#include <IMP/kernel_config.h>
13#include <boost/cstdint.hpp>
17IMPKERNEL_BEGIN_NAMESPACE
41 std::string description);
53 std::string description);
70 std::string positional_description,
int num_positional);
81 std::string description);
97 std::string positional_description,
int num_positional);
105struct IMPKERNELEXPORT AddStringFlag {
106 AddStringFlag(std::string name, std::string description,
107 std::string *storage);
113 std::string description);
123struct IMPKERNELEXPORT AddIntFlag {
124 AddIntFlag(std::string name, std::string description,
125 boost::int64_t *storage);
130IMPKERNELEXPORT
void add_int_flag(std::string name,
size_t default_value,
131 std::string description);
141struct IMPKERNELEXPORT AddBoolFlag {
142 AddBoolFlag(std::string name, std::string description,
bool *storage);
147IMPKERNELEXPORT
void add_bool_flag(std::string name, std::string description);
157struct IMPKERNELEXPORT AddFloatFlag {
158 AddFloatFlag(std::string name, std::string description,
double *storage);
164 std::string description);
171IMPKERNELEXPORT
void write_help(std::ostream &out = std::cerr);
173#if !defined(SWIG) && !defined(IMP_DOXYGEN)
185IMPKERNEL_END_NAMESPACE
Use this to add an advanced flag to the program.
bool get_bool_flag(std::string name)
void add_int_flag(std::string name, size_t default_value, std::string description)
size_t get_int_flag(std::string name)
Strings setup_from_argv_allowing_unknown(int argc, char **argv, std::string description)
void write_help(std::ostream &out=std::cerr)
void add_bool_flag(std::string name, std::string description)
std::string get_executable_name()
Return the name of the current executable.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
void add_float_flag(std::string name, double default_value, std::string description)
std::string get_string_flag(std::string name)
IMP::Vector< String > Strings
Standard way to pass a bunch of String values.
double get_float_flag(std::string name)
void add_string_flag(std::string name, std::string default_value, std::string description)