|
| Stats () |
| Creates a Stats object with counts set to 1 (for the sentinel element).
|
|
| Stats (bool gnu, const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| Creates a new Stats object and immediately updates it for the given usage and argument vector. You may pass 0 for argc and/or argv , if you just want to update options_max. More...
|
|
| Stats (bool gnu, const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| Stats(...) with non-const argv.
|
|
| Stats (const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| POSIX Stats(...) (gnu==false).
|
|
| Stats (const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| POSIX Stats(...) (gnu==false) with non-const argv.
|
|
void | add (bool gnu, const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| Updates this Stats object for the given usage and argument vector. You may pass 0 for argc and/or argv , if you just want to update options_max. More...
|
|
void | add (bool gnu, const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| add() with non-const argv.
|
|
void | add (const Descriptor usage[], int argc, const char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| POSIX add() (gnu==false).
|
|
void | add (const Descriptor usage[], int argc, char **argv, int min_abbr_len=0, bool single_minus_longopt=false) |
| POSIX add() (gnu==false) with non-const argv.
|
|
Determines the minimum lengths of the buffer and options arrays used for Parser.
Because Parser doesn't use dynamic memory its output arrays have to be pre-allocated. If you don't want to use fixed size arrays (which may turn out too small, causing command line arguments to be dropped), you can use Stats to determine the correct sizes. Stats work cumulative. You can first pass in your default options and then the real options and afterwards the counts will reflect the union.