a helper for vul_arg::parse. More...
#include <vul_arg.h>
Public Types | |
enum | autonomy { subset, all } |
Public Member Functions | |
vul_arg_info_list (autonomy autonomy__=subset) | |
Construct an empty vul_arg_info_list. | |
~vul_arg_info_list () | |
void | add (vul_arg_base *arg) |
Add an argument to the list. | |
void | parse (int &argc, char **&argv, bool warn_about_unrecognized_arguments) |
Parse the command line, using the current list of args. | |
void | include (vul_arg_info_list &l) |
Append another list. The other list is not copied, just pointed to. | |
void | verbose (bool on) |
void | set_help_option (char const *str) |
Change the help operator (defaults to -?). | |
void | set_help_precis (char const *str) |
Set the (short) text used to describe the command. | |
void | set_help_description (char const *str) |
Set the (possibly long) text used to document the command. | |
void | display_help (char const *progname=0) |
Display help about each option in the arg list. | |
Public Attributes | |
vcl_vector< vul_arg_base * > | args_ |
vcl_string | help_ |
vcl_string | description_ |
vcl_string | command_precis_ |
bool | verbose_ |
autonomy | autonomy_ |
Private Member Functions | |
vul_arg_info_list (vul_arg_info_list const &) | |
vul_arg_info_list & | operator= (vul_arg_info_list const &) |
a helper for vul_arg::parse.
Users might need it if they wish to parse several command lines.
vul_arg_info_list::vul_arg_info_list | ( | autonomy | autonomy__ = subset | ) | [inline] |
Construct an empty vul_arg_info_list.
vul_arg_info_list::vul_arg_info_list | ( | vul_arg_info_list const & | ) | [inline, private] |
void vul_arg_info_list::add | ( | vul_arg_base * | arg | ) |
Add an argument to the list.
Definition at line 167 of file vul_arg.cxx.
void vul_arg_info_list::display_help | ( | char const * | progname = 0 | ) |
Display help about each option in the arg list.
Note that this function does not exit at the end.
Definition at line 187 of file vul_arg.cxx.
void vul_arg_info_list::include | ( | vul_arg_info_list & | l | ) |
Append another list. The other list is not copied, just pointed to.
Definition at line 177 of file vul_arg.cxx.
vul_arg_info_list& vul_arg_info_list::operator= | ( | vul_arg_info_list const & | ) | [inline, private] |
void vul_arg_info_list::parse | ( | int & | argc, |
char **& | argv, | ||
bool | warn_about_unrecognized_arguments | ||
) |
Parse the command line, using the current list of args.
Remove all recognised arguments from the command line by modifying argc and argv.
Definition at line 263 of file vul_arg.cxx.
void vul_arg_info_list::set_help_description | ( | char const * | str | ) | [inline] |
void vul_arg_info_list::set_help_option | ( | char const * | str | ) |
Change the help operator (defaults to -?).
Definition at line 152 of file vul_arg.cxx.
void vul_arg_info_list::set_help_precis | ( | char const * | str | ) | [inline] |
vcl_vector<vul_arg_base*> vul_arg_info_list::args_ |
vcl_string vul_arg_info_list::command_precis_ |
vcl_string vul_arg_info_list::description_ |
vcl_string vul_arg_info_list::help_ |