10 #include "wvstringlist.h" 96 bool process(
int argc,
char **argv,
293 ArgCallback cb,
void *ud = NULL);
348 void set_flag(
const flags_t flag,
const bool value);
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
void set_email(WvStringParm email)
Set the e-mail address for bug reports.
void remove_option(char short_option)
Remove an option by specifying its short form.
flags_t
These flags control the behaviour of WvArgs.
void print_help(int argc, char **argv)
Output the long usage message based on the provided options.
wv::function< bool(void *)> NoArgCallback
The callback type used for switches that do not take a parameter.
bool process(int argc, char **argv, WvStringList *remaining_args=NULL)
Process the command line arguments passed to main() using the options provided through calls to add_o...
WvArgs - Sane command-line argument processing for WvStreams.
void zap()
An alias for remove_all_options()
void add_optional_arg(WvStringParm desc, bool multiple=false)
Add an optional argument to the list of parameters.
void set_help_header(WvStringParm header)
Set the introductory help message, printed at the beginning of –help.
void add_required_arg(WvStringParm desc, bool multiple=false)
Add a required argument to the list of parameters.
void add_flip_bool_option(char short_option, WvStringParm long_option, WvStringParm desc, bool &val)
Add a boolean option, which, when spefied, changes the value of the boolean variable from false to tr...
void print_usage(int argc, char **argv)
Output the short usage message based on the provided options.
void add_option(char short_option, WvStringParm long_option, WvStringParm desc, WvStringParm arg_desc, int &val)
Add a switch that takes an integer argument.
This is a WvList of WvStrings, and is a really handy way to parse strings.
void add_set_bool_option(char short_option, WvStringParm long_option, WvStringParm desc, bool &val)
Add a boolean option, which, when specified, sets the specified boolean variable to true...
void remove_all_options()
Remove all options.
bool get_flag(const flags_t flag) const
Get and set flags.
wv::function< bool(WvStringParm, void *)> ArgCallback
The callback type used for switches that take a parameter It returns true if the switch was parsed co...
void set_version(WvStringParm version)
Set the –version string.
WvString is an implementation of a simple and efficient printable-string class.
void set_help_footer(WvStringParm footer)
Set the descriptive help message, printed at the end of –help.
void add_reset_bool_option(char short_option, WvStringParm long_option, WvStringParm desc, bool &val)
Add a boolean option, which, when spefied, sets the specified boolean variable to false...