Laxkit
0.0.7.1
|
Used internally by LaxOptions. More...
Public Member Functions | |
LaxOption (const char *l_option, int s_option, int nflags, const char *nhelp_text, int nid, const char *opt_example, int ex_is_full=0) | |
int | unknown () |
int | missing_param () |
int | has_arg () |
int | chr () |
const char * | str () |
int | id () |
int | present () |
const char * | helptext () |
const char * | arg () |
Public Attributes | |
char * | help_text |
char * | long_option |
int | short_option |
int | flags |
int | option_id |
int | groupnumber |
char * | short_example |
char * | option_example |
int | parsed_present |
char * | parsed_arg |
Used internally by LaxOptions.
Laxkit::LaxOption::LaxOption | ( | const char * | l_option, |
int | s_option, | ||
int | nflags, | ||
const char * | helptext, | ||
int | nid, | ||
const char * | opt_example, | ||
int | ex_is_full = 0 |
||
) |
If ex_is_full, then use all of opt_example as the option example, instead of building text from the long and short options. Otherwise opt_example is just the name of the argument, to be used when building that text.
References appendstr(), and newstr().
const char * Laxkit::LaxOption::arg | ( | ) |
Return parsed_arg.
if (flags&LAXOPT_Remaining), return this->long_option, which is basically the parsed arg, but there was no actual long option. This is a coding hack.