tlx
|
specialization of argument for string options or parameters More...
Public Member Functions | |
ArgumentString (char key, const std::string &longkey, const std::string &keytype, const std::string &desc, bool required, std::string &dest) | |
contructor filling most attributes | |
const char * | type_name () const final |
return formatted type name to user | |
bool | process (int &argc, const char *const *&argv) final |
"process" string argument just by storing it. | |
void | print_value (std::ostream &os) const final |
format value to ostream | |
![]() | |
Argument (char key, const std::string &longkey, const std::string &keytype, const std::string &desc, bool required) | |
contructor filling most attributes | |
virtual | ~Argument ()=default |
empty virtual destructor | |
std::string | param_text () const |
return 'longkey [keytype]' | |
std::string | option_text () const |
return '-s, –longkey [keytype]' | |
Protected Attributes | |
std::string & | dest_ |
Additional Inherited Members | |
![]() | |
char | key_ |
single letter short option, or 0 is none | |
std::string | longkey_ |
long option key or name for parameters | |
std::string | keytype_ |
option type description, e.g. "<#>" to indicate numbers | |
std::string | desc_ |
longer description, which will be wrapped | |
bool | required_ |
required, process() fails if the option/parameter is not found. | |
bool | found_ |
found during processing of command line | |
bool | repeated_ |
repeated argument, i.e. std::vector<std::string> | |
specialization of argument for string options or parameters
Definition at line 369 of file cmdline_parser.cpp.
|
inline |
contructor filling most attributes
Definition at line 377 of file cmdline_parser.cpp.
|
inlinefinalvirtual |
format value to ostream
Implements CmdlineParser::Argument.
Definition at line 393 of file cmdline_parser.cpp.
|
inlinefinalvirtual |
"process" string argument just by storing it.
Implements CmdlineParser::Argument.
Definition at line 385 of file cmdline_parser.cpp.
|
inlinefinalvirtual |
return formatted type name to user
Implements CmdlineParser::Argument.
Definition at line 382 of file cmdline_parser.cpp.
|
protected |
Definition at line 373 of file cmdline_parser.cpp.