#include <cxxtools/arg.h>
Public Member Functions | |
| Arg (const std::string &def=std::string()) | |
| Arg (int &argc, char *argv[], char ch, const std::string &def=std::string()) | |
| Arg (int &argc, char *argv[], const char *str, const std::string &def=std::string()) | |
| Arg (int &argc, char *argv[]) | |
| bool | set (int &argc, char *argv[], char ch) |
| bool | set (int &argc, char *argv[], const char *str) |
| bool | set (int &argc, char *argv[]) |
| bool | setNoOpt (int &argc, char *argv[]) |
| const std::string & | getValue () const |
| operator const std::string & () const | |
| bool | isSet () const |
input-operator for std::string reads just the first word. This is not, what we normally expect, so this is speialized here.
| Arg | ( | int & | argc, | |
| char * | argv[], | |||
| char | ch, | |||
| const std::string & | def = std::string() | |||
| ) |
Constructor for the short form.
| Arg | ( | int & | argc, | |
| char * | argv[], | |||
| const char * | str, | |||
| const std::string & | def = std::string() | |||
| ) |
Constructor for the long form.
| Arg | ( | int & | argc, | |
| char * | argv[] | |||
| ) |
Extracts the next parameter.
| bool set | ( | int & | argc, | |
| char * | argv[], | |||
| char | ch | |||
| ) |
setter for the short form.
| bool set | ( | int & | argc, | |
| char * | argv[], | |||
| const char * | str | |||
| ) |
setter for the long form.
| bool set | ( | int & | argc, | |
| char * | argv[] | |||
| ) |
Extracts the next parameter.
| bool setNoOpt | ( | int & | argc, | |
| char * | argv[] | |||
| ) |
Extracts the next non-option-parameter.
| const std::string& getValue | ( | ) | const |
returns the extracted value.
| operator const std::string & | ( | ) | const |
argument is convertible to "const std::string&"
| bool isSet | ( | ) | const |
returns true, when the option is not set and the default is used.