Note that even though this file defines instances of a templated class, it is a .cxx file and not a .txx file because it does not supply a class definition for use by clients. More...
#include "vul_arg.h"
#include <vcl_cassert.h>
#include <vcl_algorithm.h>
#include <vcl_iostream.h>
#include <vcl_sstream.h>
#include <vcl_cstring.h>
#include <vcl_cstdlib.h>
#include <vcl_cmath.h>
#include <vcl_vector.h>
#include <vcl_list.h>
#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.
Defines | |
#define | REGEXP_INTEGER "\\-?[0123456789]+" |
#define | VDS VCL_DEFINE_SPECIALIZATION |
Functions | |
void | vul_arg_parse (int &argc, char **&argv, bool warn_about_unrecognized_arguments) |
Parse the list of arguments.... | |
void | vul_arg_include (vul_arg_info_list &l) |
Add an externally supplied list of args to the global list. | |
void | vul_arg_display_usage_and_exit (char const *msg) |
Print all args, and usage messages. | |
VDS void | settype (vul_arg< bool > &argmt) |
bool. | |
VDS void | print_value (vcl_ostream &s, vul_arg< bool > const &argmt) |
VDS int | parse (vul_arg< bool > *argmt, char **) |
VDS void | settype (vul_arg< int > &argmt) |
int. | |
VDS void | print_value (vcl_ostream &s, vul_arg< int > const &argmt) |
VDS int | parse (vul_arg< int > *argmt, char **argv) |
VDS void | settype (vul_arg< unsigned > &argmt) |
int64. | |
VDS void | print_value (vcl_ostream &s, vul_arg< unsigned > const &argmt) |
VDS int | parse (vul_arg< unsigned > *argmt, char **argv) |
VDS void | settype (vul_arg< float > &argmt) |
float. | |
VDS void | print_value (vcl_ostream &s, vul_arg< float > const &argmt) |
VDS int | parse (vul_arg< float > *argmt, char **argv) |
VDS void | settype (vul_arg< double > &argmt) |
double. | |
VDS void | print_value (vcl_ostream &s, vul_arg< double > const &argmt) |
VDS int | parse (vul_arg< double > *argmt, char **argv) |
VDS void | settype (vul_arg< char * > &argmt) |
char *. | |
VDS void | print_value (vcl_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 *. | |
VDS void | print_value (vcl_ostream &s, vul_arg< char const * > const &argmt) |
VDS int | parse (vul_arg< char const * > *argmt, char **argv) |
VDS void | settype (vul_arg< vcl_string > &argmt) |
vcl_string. | |
VDS void | print_value (vcl_ostream &s, vul_arg< vcl_string > const &argmt) |
VDS int | parse (vul_arg< vcl_string > *argmt, char **argv) |
VDS void | settype (vul_arg< vcl_list< int > > &argmt) |
vcl_list<int>. | |
VDS void | print_value (vcl_ostream &s, vul_arg< vcl_list< int > > const &argmt) |
VDS int | parse (vul_arg< vcl_list< int > > *argmt, char **argv) |
VDS void | settype (vul_arg< vcl_vector< int > > &argmt) |
vcl_vector<int>. | |
VDS void | print_value (vcl_ostream &s, vul_arg< vcl_vector< int > > const &argmt) |
VDS int | parse (vul_arg< vcl_vector< int > > *argmt, char **argv) |
VDS void | settype (vul_arg< vcl_vector< unsigned > > &argmt) |
vcl_vector<unsigned>. | |
VDS void | print_value (vcl_ostream &s, vul_arg< vcl_vector< unsigned > > const &argmt) |
VDS int | parse (vul_arg< vcl_vector< unsigned > > *argmt, char **argv) |
VDS void | settype (vul_arg< vcl_vector< double > > &argmt) |
vcl_vector<double>. | |
VDS void | print_value (vcl_ostream &s, vul_arg< vcl_vector< double > > const &argmt) |
VDS int | parse (vul_arg< vcl_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 .txx 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
void settype(vul_arg<T> &); void print_value(vul_arg<T> const &, vcl_ostream &); int parse(vul_arg<T>*, char**);
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 VCL_DEFINE_SPECIALIZATION |
Definition at line 532 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< bool > * | argmt, |
char ** | |||
) |
Definition at line 543 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< int > * | argmt, |
char ** | argv | ||
) |
Definition at line 557 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< unsigned > * | argmt, |
char ** | argv | ||
) |
Definition at line 628 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< float > * | argmt, |
char ** | argv | ||
) |
Definition at line 659 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< double > * | argmt, |
char ** | argv | ||
) |
Definition at line 684 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< char * > * | argmt, |
char ** | argv | ||
) |
Definition at line 709 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< char const * > * | argmt, |
char ** | argv | ||
) |
Definition at line 723 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< vcl_string > * | argmt, |
char ** | argv | ||
) |
Definition at line 743 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< vcl_list< int > > * | argmt, |
char ** | argv | ||
) |
Definition at line 772 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< vcl_vector< int > > * | argmt, |
char ** | argv | ||
) |
Definition at line 788 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< vcl_vector< unsigned > > * | argmt, |
char ** | argv | ||
) |
Definition at line 810 of file vul_arg.cxx.
VDS int parse | ( | vul_arg< vcl_vector< double > > * | argmt, |
char ** | argv | ||
) |
Definition at line 832 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< bool > const & | argmt | ||
) |
Definition at line 540 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< int > const & | argmt | ||
) |
Definition at line 554 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< unsigned > const & | argmt | ||
) |
Definition at line 625 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< float > const & | argmt | ||
) |
Definition at line 656 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< double > const & | argmt | ||
) |
Definition at line 681 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< char * > const & | argmt | ||
) |
Definition at line 706 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< char const * > const & | argmt | ||
) |
Definition at line 720 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< vcl_string > const & | argmt | ||
) |
Definition at line 740 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< vcl_list< int > > const & | argmt | ||
) |
Definition at line 766 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< vcl_vector< int > > const & | argmt | ||
) |
Definition at line 782 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< vcl_vector< unsigned > > const & | argmt | ||
) |
Definition at line 804 of file vul_arg.cxx.
VDS void print_value | ( | vcl_ostream & | s, |
vul_arg< vcl_vector< double > > const & | argmt | ||
) |
Definition at line 826 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< bool > & | argmt | ) |
bool.
Definition at line 538 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< int > & | argmt | ) |
int.
Definition at line 552 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< unsigned > & | argmt | ) |
VDS void settype | ( | vul_arg< float > & | argmt | ) |
float.
Definition at line 654 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< double > & | argmt | ) |
double.
Definition at line 679 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< char * > & | argmt | ) |
char *.
Definition at line 704 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< char const * > & | argmt | ) |
char const *.
Definition at line 718 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< vcl_string > & | argmt | ) |
vcl_string.
Definition at line 738 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< vcl_list< int > > & | argmt | ) |
vcl_list<int>.
Definition at line 764 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< vcl_vector< int > > & | argmt | ) |
vcl_vector<int>.
Definition at line 780 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< vcl_vector< unsigned > > & | argmt | ) |
vcl_vector<unsigned>.
Definition at line 802 of file vul_arg.cxx.
VDS void settype | ( | vul_arg< vcl_vector< double > > & | argmt | ) |
vcl_vector<double>.
Definition at line 824 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.