Class for a set of arguments that can be read from the command line.
More...
#include <command_line.h>
|
| ArgumentSet (std::string n) |
|
template<typename ArgType > |
void | register_argument (std::string name, std::string desc, ArgType &loc) |
| Register a new command line argument to be parsed. More...
|
|
void | print () const |
|
void | add_parser (Parser *p) |
|
bool | parse (std::string argument) const |
|
|
std::string | name |
|
std::map< std::string, uint8_t > | indices |
|
|
std::vector< Parser * > | parsers |
|
Class for a set of arguments that can be read from the command line.
◆ ArgumentSet()
ArgumentSet::ArgumentSet |
( |
std::string |
n | ) |
|
|
inline |
- Parameters
-
n | name of the arguments set (shown when using –help) |
◆ register_argument()
template<typename ArgType >
void ArgumentSet::register_argument |
( |
std::string |
name, |
|
|
std::string |
desc, |
|
|
ArgType & |
loc |
|
) |
| |
|
inline |
Register a new command line argument to be parsed.
- Parameters
-
name | name of the argument that will be used on the command line |
desc | description of the argument shown when using –help |
loc | the address where the parsed value should be stored |
The documentation for this class was generated from the following file: