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

vul_arg_info_list Class Reference

#include <vul_arg.h>

List of all members.


Detailed Description

a helper for vul_arg::parse.

Users might need it if they wish to parse several command lines.

Definition at line 171 of file 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 &)
void operator= (vul_arg_info_list const &)


Member Enumeration Documentation

enum vul_arg_info_list::autonomy
 

Enumerator:
subset 
all 

Definition at line 174 of file vul_arg.h.


Constructor & Destructor Documentation

vul_arg_info_list::vul_arg_info_list autonomy  autonomy__ = subset  )  [inline]
 

Construct an empty vul_arg_info_list.

Definition at line 179 of file vul_arg.h.

vul_arg_info_list::~vul_arg_info_list  )  [inline]
 

Definition at line 183 of file vul_arg.h.

vul_arg_info_list::vul_arg_info_list vul_arg_info_list const &   )  [inline, private]
 

Definition at line 210 of file vul_arg.h.


Member Function Documentation

void vul_arg_info_list::add vul_arg_base arg  ) 
 

Add an argument to the list.

Definition at line 157 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 177 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 167 of file vul_arg.cxx.

void vul_arg_info_list::operator= vul_arg_info_list const &   )  [inline, private]
 

Definition at line 211 of file vul_arg.h.

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 242 of file vul_arg.cxx.

void vul_arg_info_list::set_help_description char const *  str  )  [inline]
 

Set the (possibly long) text used to document the command.

It is displayed at the end of the help page.

Definition at line 197 of file vul_arg.h.

void vul_arg_info_list::set_help_option char const *  str  ) 
 

Change the help operator (defaults to -?).

Definition at line 142 of file vul_arg.cxx.

void vul_arg_info_list::set_help_precis char const *  str  )  [inline]
 

Set the (short) text used to describe the command.

Definition at line 193 of file vul_arg.h.

void vul_arg_info_list::verbose bool  on  )  [inline]
 

Definition at line 188 of file vul_arg.h.


Member Data Documentation

vcl_vector<vul_arg_base*> vul_arg_info_list::args_
 

Definition at line 200 of file vul_arg.h.

autonomy vul_arg_info_list::autonomy_
 

Definition at line 205 of file vul_arg.h.

vcl_string vul_arg_info_list::command_precis_
 

Definition at line 203 of file vul_arg.h.

vcl_string vul_arg_info_list::description_
 

Definition at line 202 of file vul_arg.h.

vcl_string vul_arg_info_list::help_
 

Definition at line 201 of file vul_arg.h.

bool vul_arg_info_list::verbose_
 

Definition at line 204 of file vul_arg.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:41:01 2008 for core/vul by  doxygen 1.4.4