Note that even though this file defines instances of a templated class, it is a .cxx file and not a .hxx file because it does not supply a class definition for use by clients. More...
#include <algorithm>#include <iostream>#include <sstream>#include <cstring>#include <cstdlib>#include <cmath>#include <vector>#include <list>#include "vul_arg.h"#include <cassert>#include <vul/vul_sprintf.h>#include <vul/vul_string.h>#include <vul/vul_reg_exp.h>#include <vul/vul_printf.h>Go to the source code of this file.
Macros | |
| #define | REGEXP_INTEGER "\\-?[0123456789]+" |
| #define | VDS template <> |
Functions | |
| void | vul_arg_parse (int &argc, char **&argv, bool warn_about_unrecognized_arguments) |
| Parse the list of arguments.... More... | |
| void | vul_arg_include (vul_arg_info_list &l) |
| Add an externally supplied list of args to the global list. More... | |
| void | vul_arg_display_usage_and_exit (char const *msg) |
| Print all args, and usage messages. More... | |
| VDS void | settype (vul_arg< bool > &argmt) |
| bool. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< bool > const &argmt) |
| VDS int | parse (vul_arg< bool > *argmt, char **) |
| VDS void | settype (vul_arg< int > &argmt) |
| int. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< int > const &argmt) |
| VDS int | parse (vul_arg< int > *argmt, char **argv) |
| VDS void | settype (vul_arg< unsigned > &argmt) |
| int64. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< unsigned > const &argmt) |
| VDS int | parse (vul_arg< unsigned > *argmt, char **argv) |
| VDS void | settype (vul_arg< float > &argmt) |
| float. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< float > const &argmt) |
| VDS int | parse (vul_arg< float > *argmt, char **argv) |
| VDS void | settype (vul_arg< double > &argmt) |
| double. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< double > const &argmt) |
| VDS int | parse (vul_arg< double > *argmt, char **argv) |
| VDS void | settype (vul_arg< char * > &argmt) |
| char *. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< char * > const &argmt) |
| VDS int | parse (vul_arg< char * > *argmt, char **argv) |
| VDS void | settype (vul_arg< char const * > &argmt) |
| char const *. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< char const * > const &argmt) |
| VDS int | parse (vul_arg< char const * > *argmt, char **argv) |
| VDS void | settype (vul_arg< std::string > &argmt) |
| std::string. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< std::string > const &argmt) |
| VDS int | parse (vul_arg< std::string > *argmt, char **argv) |
| VDS void | settype (vul_arg< std::list< int > > &argmt) |
| std::list<int>. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< std::list< int > > const &argmt) |
| VDS int | parse (vul_arg< std::list< int > > *argmt, char **argv) |
| VDS void | settype (vul_arg< std::vector< int > > &argmt) |
| std::vector<int>. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< std::vector< int > > const &argmt) |
| VDS int | parse (vul_arg< std::vector< int > > *argmt, char **argv) |
| VDS void | settype (vul_arg< std::vector< unsigned > > &argmt) |
| std::vector<unsigned>. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< std::vector< unsigned > > const &argmt) |
| VDS int | parse (vul_arg< std::vector< unsigned > > *argmt, char **argv) |
| VDS void | settype (vul_arg< std::vector< double > > &argmt) |
| std::vector<double>. More... | |
| VDS void | print_value (std::ostream &s, vul_arg< std::vector< double > > const &argmt) |
| VDS int | parse (vul_arg< std::vector< double > > *argmt, char **argv) |
Note that even though this file defines instances of a templated class, it is a .cxx file and not a .hxx file because it does not supply a class definition for use by clients.
If you need to define your own vul_arg<T>, you should #include vul_arg.h ONLY, in your source file (myarg.cxx, say), define these three global functions (which can by static if you like) in myarg.cxx
and then instantiate the class vul_arg<T> as usual (in myarg.cxx).
Definition in file vul_arg.cxx.
| #define REGEXP_INTEGER "\\-?[0123456789]+" |
| #define VDS template <> |
Definition at line 532 of file vul_arg.cxx.
Definition at line 543 of file vul_arg.cxx.
Definition at line 557 of file vul_arg.cxx.
Definition at line 628 of file vul_arg.cxx.
Definition at line 659 of file vul_arg.cxx.
Definition at line 684 of file vul_arg.cxx.
Definition at line 709 of file vul_arg.cxx.
Definition at line 730 of file vul_arg.cxx.
Definition at line 750 of file vul_arg.cxx.
Definition at line 779 of file vul_arg.cxx.
Definition at line 795 of file vul_arg.cxx.
Definition at line 817 of file vul_arg.cxx.
Definition at line 839 of file vul_arg.cxx.
Definition at line 540 of file vul_arg.cxx.
Definition at line 554 of file vul_arg.cxx.
Definition at line 625 of file vul_arg.cxx.
Definition at line 656 of file vul_arg.cxx.
Definition at line 681 of file vul_arg.cxx.
Definition at line 706 of file vul_arg.cxx.
Definition at line 727 of file vul_arg.cxx.
Definition at line 747 of file vul_arg.cxx.
Definition at line 773 of file vul_arg.cxx.
Definition at line 789 of file vul_arg.cxx.
Definition at line 811 of file vul_arg.cxx.
Definition at line 833 of file vul_arg.cxx.
bool.
Definition at line 538 of file vul_arg.cxx.
int.
Definition at line 552 of file vul_arg.cxx.
float.
Definition at line 654 of file vul_arg.cxx.
double.
Definition at line 679 of file vul_arg.cxx.
char *.
Definition at line 704 of file vul_arg.cxx.
char const *.
Definition at line 725 of file vul_arg.cxx.
std::string.
Definition at line 745 of file vul_arg.cxx.
std::list<int>.
Definition at line 771 of file vul_arg.cxx.
std::vector<int>.
Definition at line 787 of file vul_arg.cxx.
std::vector<unsigned>.
Definition at line 809 of file vul_arg.cxx.
std::vector<double>.
Definition at line 831 of file vul_arg.cxx.
| void vul_arg_display_usage_and_exit | ( | char const * | msg | ) |
Print all args, and usage messages.
Definition at line 65 of file vul_arg.cxx.
| void vul_arg_include | ( | vul_arg_info_list & | l | ) |
Add an externally supplied list of args to the global list.
Definition at line 59 of file vul_arg.cxx.
| void vul_arg_parse | ( | int & | argc, |
| char **& | argv, | ||
| bool | warn_about_unrecognized_arguments | ||
| ) |
Parse the list of arguments....
parse command-line arguments.
Definition at line 51 of file vul_arg.cxx.
1.8.15