Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vul_arg.cxx File Reference


Detailed Description

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.

#include "vul_arg.h"
#include <vcl_cassert.h>
#include <vcl_algorithm.h>
#include <vcl_iostream.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 command-line 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)
 unsigned.
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)


Define Documentation

#define REGEXP_INTEGER   "\\-?[0123456789]+"
 

#define VDS   VCL_DEFINE_SPECIALIZATION
 

Definition at line 492 of file vul_arg.cxx.


Function Documentation

VDS int parse vul_arg< vcl_vector< double > > *  argmt,
char **  argv
 

Definition at line 752 of file vul_arg.cxx.

VDS int parse vul_arg< vcl_vector< unsigned > > *  argmt,
char **  argv
 

Definition at line 730 of file vul_arg.cxx.

VDS int parse vul_arg< vcl_vector< int > > *  argmt,
char **  argv
 

Definition at line 708 of file vul_arg.cxx.

VDS int parse vul_arg< vcl_list< int > > *  argmt,
char **  argv
 

Definition at line 692 of file vul_arg.cxx.

VDS int parse vul_arg< vcl_string > *  argmt,
char **  argv
 

Definition at line 663 of file vul_arg.cxx.

VDS int parse vul_arg< char const * > *  argmt,
char **  argv
 

Definition at line 643 of file vul_arg.cxx.

VDS int parse vul_arg< char * > *  argmt,
char **  argv
 

Definition at line 629 of file vul_arg.cxx.

VDS int parse vul_arg< double > *  argmt,
char **  argv
 

Definition at line 604 of file vul_arg.cxx.

VDS int parse vul_arg< float > *  argmt,
char **  argv
 

Definition at line 579 of file vul_arg.cxx.

VDS int parse vul_arg< unsigned > *  argmt,
char **  argv
 

Definition at line 548 of file vul_arg.cxx.

VDS int parse vul_arg< int > *  argmt,
char **  argv
 

Definition at line 517 of file vul_arg.cxx.

VDS int parse vul_arg< bool > *  argmt,
char ** 
 

Definition at line 503 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< vcl_vector< double > > const &  argmt
 

Definition at line 746 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< vcl_vector< unsigned > > const &  argmt
 

Definition at line 724 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< vcl_vector< int > > const &  argmt
 

Definition at line 702 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< vcl_list< int > > const &  argmt
 

Definition at line 686 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< vcl_string > const &  argmt
 

Definition at line 660 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< char const * > const &  argmt
 

Definition at line 640 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< char * > const &  argmt
 

Definition at line 626 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< double > const &  argmt
 

Definition at line 601 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< float > const &  argmt
 

Definition at line 576 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< unsigned > const &  argmt
 

Definition at line 545 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< int > const &  argmt
 

Definition at line 514 of file vul_arg.cxx.

VDS void print_value vcl_ostream &  s,
vul_arg< bool > const &  argmt
 

Definition at line 500 of file vul_arg.cxx.

VDS void settype vul_arg< vcl_vector< double > > &  argmt  ) 
 

vcl_vector<double>.

Definition at line 744 of file vul_arg.cxx.

VDS void settype vul_arg< vcl_vector< unsigned > > &  argmt  ) 
 

vcl_vector<unsigned>.

Definition at line 722 of file vul_arg.cxx.

VDS void settype vul_arg< vcl_vector< int > > &  argmt  ) 
 

vcl_vector<int>.

Definition at line 700 of file vul_arg.cxx.

VDS void settype vul_arg< vcl_list< int > > &  argmt  ) 
 

vcl_list<int>.

Definition at line 684 of file vul_arg.cxx.

VDS void settype vul_arg< vcl_string > &  argmt  ) 
 

vcl_string.

Definition at line 658 of file vul_arg.cxx.

VDS void settype vul_arg< char const * > &  argmt  ) 
 

char const *.

Definition at line 638 of file vul_arg.cxx.

VDS void settype vul_arg< char * > &  argmt  ) 
 

char *.

Definition at line 624 of file vul_arg.cxx.

VDS void settype vul_arg< double > &  argmt  ) 
 

double.

Definition at line 599 of file vul_arg.cxx.

VDS void settype vul_arg< float > &  argmt  ) 
 

float.

Definition at line 574 of file vul_arg.cxx.

VDS void settype vul_arg< unsigned > &  argmt  ) 
 

unsigned.

Definition at line 543 of file vul_arg.cxx.

VDS void settype vul_arg< int > &  argmt  ) 
 

int.

Definition at line 512 of file vul_arg.cxx.

VDS void settype vul_arg< bool > &  argmt  ) 
 

bool.

Definition at line 498 of file vul_arg.cxx.

void vul_arg_display_usage_and_exit char const *  msg  ) 
 

Print all args, and usage messages.

Definition at line 59 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 53 of file vul_arg.cxx.

void vul_arg_parse int &  argc,
char **&  argv,
bool  warn_about_unrecognized_arguments
 

parse command-line arguments.

...

Definition at line 45 of file vul_arg.cxx.


Generated on Thu Jan 10 14:41:00 2008 for core/vul by  doxygen 1.4.4