Main MRPT website > C++ reference
MRPT logo
Public Member Functions

TCLAP::CmdLineInterface Class Reference


Detailed Description

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

Definition at line 43 of file CmdLineInterface.h.

#include <mrpt/otherlibs/tclap/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 bool parse (int argc, char **argv)=0
 Parses the command line.
virtual CmdLineOutputgetOutput ()=0
 Returns the CmdLineOutput object.
virtual void setOutput (CmdLineOutput *co)=0
virtual std::string & getVersion ()=0
 Returns the version string.
virtual std::string & getProgramName ()=0
 Returns the program name string.
virtual std::list< Arg * > & getArgList ()=0
 Returns the argList.
virtual XorHandlergetXorHandler ()=0
 Returns the XorHandler.
virtual char getDelimiter ()=0
 Returns the delimiter string.
virtual std::string & getMessage ()=0
 Returns the message string.
virtual bool hasHelpAndVersion ()=0
 Indicates whether or not the help and version switches were created automatically.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 50 of file CmdLineInterface.h.


Member Function Documentation

virtual void TCLAP::CmdLineInterface::add ( Arg a  )  [pure virtual]
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 std::list<Arg*>& TCLAP::CmdLineInterface::getArgList (  )  [pure virtual]
virtual char TCLAP::CmdLineInterface::getDelimiter (  )  [pure virtual]

Returns the delimiter string.

Implemented in TCLAP::CmdLine.

virtual std::string& TCLAP::CmdLineInterface::getMessage (  )  [pure virtual]

Returns the message string.

Implemented in TCLAP::CmdLine.

Referenced by TCLAP::StdOutput::_longUsage(), and TCLAP::DocBookOutput::usage().

virtual CmdLineOutput* TCLAP::CmdLineInterface::getOutput (  )  [pure virtual]

Returns the CmdLineOutput object.

Implemented in TCLAP::CmdLine.

virtual std::string& TCLAP::CmdLineInterface::getProgramName (  )  [pure virtual]
virtual std::string& TCLAP::CmdLineInterface::getVersion (  )  [pure virtual]

Returns the version string.

Implemented in TCLAP::CmdLine.

Referenced by TCLAP::DocBookOutput::usage(), TCLAP::StdOutput::version(), and TCLAP::DocBookOutput::version().

virtual XorHandler& TCLAP::CmdLineInterface::getXorHandler (  )  [pure virtual]
virtual bool TCLAP::CmdLineInterface::hasHelpAndVersion (  )  [pure virtual]

Indicates whether or not the help and version switches were created automatically.

Implemented in TCLAP::CmdLine.

Referenced by TCLAP::StdOutput::failure().

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

Parses the command line.

Parameters:
argc - Number of arguments.
argv - Array of arguments.
Returns:
(Added by JLBC for MRPT): Return false if the program should exit (error in args, it was --help, etc...)

Implemented in TCLAP::CmdLine.

virtual void TCLAP::CmdLineInterface::setOutput ( CmdLineOutput co  )  [pure virtual]
Parameters:
co - CmdLineOutput object that we want to use instead.

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.

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.




Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011