Public Types | Public Member Functions | Public Attributes | Private Member Functions
vul_arg_info_list Class Reference

a helper for vul_arg::parse. More...

#include <vul_arg.h>

List of all members.

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 &)
vul_arg_info_listoperator= (vul_arg_info_list const &)

Detailed Description

a helper for vul_arg::parse.

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

Definition at line 206 of file vul_arg.h.


Member Enumeration Documentation

Enumerator:
subset 
all 

Definition at line 209 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 214 of file vul_arg.h.

vul_arg_info_list::~vul_arg_info_list ( ) [inline]

Definition at line 218 of file vul_arg.h.

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

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

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

Definition at line 247 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 263 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 232 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 152 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 228 of file vul_arg.h.

void vul_arg_info_list::verbose ( bool  on) [inline]

Definition at line 223 of file vul_arg.h.


Member Data Documentation

Definition at line 235 of file vul_arg.h.

Definition at line 240 of file vul_arg.h.

Definition at line 238 of file vul_arg.h.

Definition at line 237 of file vul_arg.h.

Definition at line 236 of file vul_arg.h.

Definition at line 239 of file vul_arg.h.


The documentation for this class was generated from the following files: