#include <cxxtools/arg.h>
Public Member Functions | |
| Arg (const char *def=0) | |
| Arg (int &argc, char *argv[], char ch, const char *def=0) | |
| Arg (int &argc, char *argv[], const char *str, const char *def=0) | |
| Arg (int &argc, char *argv[]) | |
| bool | set (int &argc, char *argv[], char ch) |
| bool | set (int &argc, char *argv[], const char *str, const char *def=0) |
| bool | set (int &argc, char *argv[]) |
| const char * | getValue () const |
| operator const char * () const | |
| bool | isSet () const |
"const char*" is not extracted with a stream. This is more flexible and easier to process. Also parameters can contain spaces.
| bool set | ( | int & | argc, | |
| char * | argv[], | |||
| char | ch | |||
| ) |
Constructor for the short form.
| bool set | ( | int & | argc, | |
| char * | argv[], | |||
| const char * | str, | |||
| const char * | def = 0 | |||
| ) |
setter for the long form.
| bool set | ( | int & | argc, | |
| char * | argv[] | |||
| ) |
Extracts the next parameter.
| const char* getValue | ( | ) | const |
returns the extracted value.
| operator const char * | ( | ) | const |
argument is convertible to "const char*"
| bool isSet | ( | ) | const |
returns true, when the option is not set and the default is used.