|
Geophysical Inversion and Modelling Library v1.5.4
|
Simplified command line parser. More...
#include <optionmap.h>
Collaboration diagram for GIMLI::OptionMap:Public Types | |
| typedef std::map< char, OptionBase * > | CharOptionMap |
| typedef std::map< std::string, OptionBase * > | LongOptionMap |
Public Member Functions | |
| OptionMap (const std::string &description="") | |
| template<class T> | |
| void | addLastArg (T &var, const std::string &lastArgString) |
| template<class T> | |
| void | add (T &var, const std::string &key, const std::string &longOpt, const std::string &help) |
| template<class T> | |
| void | add (T &var, const std::string &key, const std::string &longOpt, const std::string &help, const T &defaultVar) |
| void | parse (int argc, char *argv[]) |
| void | buildLongOptions () |
| void | setDescription (const std::string &description) |
| void | printHelp (const std::string &main) |
| OptionBase * | findOption (const char &key) const |
Protected Attributes | |
| struct option * | opts_ |
| std::string | allKeys_ |
| std::string | lastArgString_ |
| std::string | descriptionString_ |
| OptionBase * | lastOption_ |
| std::list< OptionBase * > | options_ |
| LongOptionMap | lMap_ |
| CharOptionMap | cMap_ |
| bool | showVersion_ |
| bool | debug_ |
Simplified command line parser.
Simplified command line parser. The default option are -h [–help]. –version