|
|
| ArgumentParserBase () |
| | default constructor
|
| | ArgumentParserBase (const int, const char *const *const) |
| | constructor
|
|
| ArgumentParserBase (const ArgumentParserBase &)=delete |
|
| ArgumentParserBase (ArgumentParserBase &&)=delete |
|
ArgumentParserBase & | operator= (const ArgumentParserBase &)=delete |
|
ArgumentParserBase & | operator= (ArgumentParserBase &&)=delete |
| void | registerNewCallBack (const std::string &, const MemberFuncPtr &, const std::string &="", const bool=false) |
| | register a new callback
|
| void | registerNewCallBack (const std::string &, const std::string &, const MemberFuncPtr &, const std::string &="", const bool=false) |
| | register a new callback
|
|
| ~ArgumentParserBase () override |
| | destructor
|
|
| ArgumentParser () |
| | default constructor
|
| | ArgumentParser (const int, const char *const *const) |
| | constructor
|
|
| ArgumentParser (const ArgumentParser &)=delete |
| | copy constructor
|
|
| ArgumentParser (ArgumentParser &&)=delete |
| | move constructor
|
|
ArgumentParser & | operator= (const ArgumentParser &)=delete |
| | standard assignement
|
|
ArgumentParser & | operator= (ArgumentParser &&)=delete |
| | move assignement
|
| virtual void | setArguments (const int, const char *const *const) |
| | set the arguments to be parsed
|
| virtual void | registerCallBack (const std::string &, const CallBack &) |
| | register a new callback
|
| virtual void | registerCallBack (const std::string &, const std::string &, const CallBack &) |
| | register a new callback
|
|
virtual void | parseArguments () |
| | parse arguments using registred methods.
|
| const CallBacksContainer & | getRegistredCallBacks () const |
|
virtual | ~ArgumentParser () |
| | destructor
|
|
|
using | AliasContainer = std::map<std::string, std::string> |
| | a simple alias
|
|
using | ArgsContainer = std::vector<Argument> |
| | a simple alias
|
| virtual void | treatUnknownArgument () |
| | method called while parsing unregistred command line arguments.
|
| virtual void | treatHelp () |
| | method associated with the '–help' command line argument.
|
|
virtual void | treatVersion () |
| | method associated with the '–version' command line argument
|
| virtual std::string | getVersionDescription () const =0 |
| virtual std::string | getUsageDescription () const =0 |
|
CallBacksContainer | callBacksContainer |
| | container of all the call-backs
|
|
AliasContainer | alias |
| | container of all the alias
|
|
ArgsContainer | args |
| | container of all the command line arguments
|
|
ArgsContainer::iterator | currentArgument |
| | an iterator to the argument being treated
|
|
std::string | programName |
| | program name
|
template<typename Child>
struct tfel::utilities::ArgumentParserBase< Child >
an helper class used for command line argument parsing.
The CRTP pattern is used to enable ArgumentParserBase to used the method of its derivate class. Such a design was extremly usefull before std::function was introduced.
The class maps the command line arguments to method of the derivate class.
- Parameters
-