TCLAP::CmdLineInterface Class Reference

The base class that manages the command line definition and passes along the parsing to the appropriate Arg classes. More...

#include <CmdLineInterface.h>

Inheritance diagram for TCLAP::CmdLineInterface:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~CmdLineInterface ()
 Destructor.
virtual void add (Arg &a)=0
 Adds an argument to the list of arguments to be parsed.
virtual void add (Arg *a)=0
 An alternative add.
virtual void xorAdd (Arg &a, Arg &b)=0
 Add two Args that will be xor'd.
virtual void xorAdd (std::vector< Arg * > &xors)=0
 Add a list of Args that will be xor'd.
virtual void usage (int exitVal=0)=0
 Prints the usage to stdout and exits.
virtual void version (int exitVal=0)=0
 Prints the version to stdout and exits.
virtual void failure (const ArgException &e)=0
 Prints (to stderr) an error message, short usage and exits with a value of 1.
virtual void parse (int argc, char **argv)=0
 Parses the command line.

Detailed Description

The base class that manages the command line definition and passes along the parsing to the appropriate Arg classes.


Constructor & Destructor Documentation

virtual TCLAP::CmdLineInterface::~CmdLineInterface (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void TCLAP::CmdLineInterface::add ( Arg a  )  [pure virtual]

An alternative add.

Functionally identical.

Parameters:
a - Argument to be added.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::add ( Arg a  )  [pure virtual]

Adds an argument to the list of arguments to be parsed.

Parameters:
a - Argument to be added.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::failure ( const ArgException e  )  [pure virtual]

Prints (to stderr) an error message, short usage and exits with a value of 1.

Can be overridden to produce alternative behavior.

Parameters:
e - The ArgException that caused the failure.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::parse ( int  argc,
char **  argv 
) [pure virtual]

Parses the command line.

Parameters:
argc - Number of arguments.
argv - Array of arguments.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::usage ( int  exitVal = 0  )  [pure virtual]

Prints the usage to stdout and exits.

Parameters:
exitVal - Value to exit with.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::version ( int  exitVal = 0  )  [pure virtual]

Prints the version to stdout and exits.

Parameters:
exitVal - Value to exit with.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::xorAdd ( std::vector< Arg * > &  xors  )  [pure virtual]

Add a list of Args that will be xor'd.

If this method is used, add does not need to be called.

Parameters:
xors - List of Args to be added and xor'd.

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::xorAdd ( Arg a,
Arg b 
) [pure virtual]

Add two Args that will be xor'd.

If this method is used, add does not need to be called.

Parameters:
a - Argument to be added and xor'd.
b - Argument to be added and xor'd.

Implemented in TCLAP::CmdLine.


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:27 2007 for MetalWarriors by  doxygen 1.4.7