#include <vul_arg.h>
Inheritance diagram for vul_arg< T >:

Definition at line 121 of file vul_arg.h.
Public Member Functions | |
| vul_arg (char const *option_string=0, char const *helpstring=0, T default_value=T()) | |
| Construct an vul_arg<T> with command-line switch and default value. | |
| vul_arg (vul_arg_info_list &l, char const *option_string=0, char const *helpstring=0, T default_value=T()) | |
As above, but add the arg to the list l, on which parse() can be called later. | |
| T & | operator() () |
| return the arg's current value, whether the default or the one from the command line. | |
| T const & | operator() () const |
| int | parse (char **argv) |
| returns number of args chomped, or -1 on failure. | |
| vcl_ostream & | print_value (vcl_ostream &s) |
| print. | |
| char const * | option () |
| char const * | help () |
| bool | set () const |
| Returns true if arg was set on the command line. | |
Static Public Member Functions | |
| static void | parse_deprecated (int &argc, char **&argv, bool warn_about_unrecognized_arguments=true) |
| The main static method. | |
| static void | include_deprecated (vul_arg_info_list &l) |
| Add another vul_arg_info_list to the current one. | |
| static void | add_to_current (vul_arg_base *a) |
| static void | set_help_option (char const *str) |
| static void | set_help_description (char const *str) |
| static void | set_help_precis (char const *str) |
| static void | display_usage (char const *msg=0) |
| static void | display_usage_and_exit (char const *msg=0) |
Public Attributes | |
| T | value_ |
| char const * | type_ |
| Static text describing type of option (e.g. bool or double). | |
Protected Attributes | |
| bool | set_ |
| After parsing, true iff value was set on command line. | |
| vcl_string | option_ |
| Option flag including "-" or "--". | |
| vcl_string | help_ |
| Description of argument. | |
Private Member Functions | |
| void | settype () |
Friends | |
| class | vul_arg_info_list |
|
||||||||||||||||||||
|
Construct an vul_arg<T> with command-line switch and default value. Command line switch option_string, and default value default_value. Add this argument to the global list of arguments that vul_arg_base::parse() uses when it eventually gets the command line. If option_string is null, then the argument is assigned to the first plain word in the command line (warning: this causes problems for T=char *, but that just means that you have to have a help string if you want a default... good) |
|
||||||||||||||||||||||||
|
As above, but add the arg to the list l, on which
|
|
|
Definition at line 84 of file vul_arg.cxx. |
|
|
Definition at line 110 of file vul_arg.cxx. |
|
|
Definition at line 116 of file vul_arg.cxx. |
|
|
Definition at line 41 of file vul_arg.cxx. |
|
|
Add another vul_arg_info_list to the current one. This allows for the inclusion of different sets of arguments into the main program, from different libraries. Definition at line 78 of file vul_arg.cxx. |
|
|||||||||
|
|
|
|||||||||
|
return the arg's current value, whether the default or the one from the command line.
|
|
|
Definition at line 38 of file vul_arg.cxx. |
|
||||||||||
|
returns number of args chomped, or -1 on failure.
Implements vul_arg_base. |
|
||||||||||||||||
|
The main static method.
Definition at line 90 of file vul_arg.cxx. |
|
||||||||||
|
print.
Implements vul_arg_base. |
|
|
Returns true if arg was set on the command line.
Definition at line 66 of file vul_arg.cxx. |
|
|
Definition at line 105 of file vul_arg.cxx. |
|
|
Definition at line 95 of file vul_arg.cxx. |
|
|
Definition at line 100 of file vul_arg.cxx. |
|
|||||||||
|
|
|
|
|
|
|
Description of argument.
|
|
|
Option flag including "-" or "--".
|
|
|
After parsing, true iff value was set on command line.
|
|
|
Static text describing type of option (e.g. bool or double).
|
|
|||||
|
|
1.4.4