tclap
1.4.0
|
The base class that manages the command line definition and passes along the parsing to the appropriate Arg classes. More...
#include <CmdLineInterface.h>
Public Member Functions | |
virtual | ~CmdLineInterface () |
Destructor. More... | |
virtual ArgContainer & | add (Arg &a)=0 |
Adds an argument. More... | |
virtual ArgContainer & | add (Arg *a)=0 |
Adds an argument. More... | |
virtual void | addToArgList (Arg *a)=0 |
virtual ArgContainer & | add (ArgGroup &args)=0 |
Adds an argument group to the list of arguments to be parsed. More... | |
virtual void | xorAdd (Arg &a, Arg &b)=0 |
virtual void | xorAdd (const std::vector< Arg *> &xors)=0 |
virtual void | parse (int argc, const char *const *argv)=0 |
Parses the command line. More... | |
void | parse (std::vector< std::string > &args) |
Parses the command line. More... | |
virtual void | setOutput (CmdLineOutput *co)=0 |
virtual std::string | getVersion () const =0 |
Returns the version string. More... | |
virtual std::string | getProgramName () const =0 |
Returns the program name string. More... | |
virtual std::list< ArgGroup * > | getArgGroups ()=0 |
Returns the list of ArgGroups. More... | |
virtual std::list< Arg * > | getArgList () const =0 |
virtual char | getDelimiter () const =0 |
Returns the delimiter string. More... | |
virtual std::string | getMessage () const =0 |
Returns the message string. More... | |
virtual bool | hasHelpAndVersion () const =0 |
Indicates whether or not the help and version switches were created automatically. More... | |
virtual void | reset ()=0 |
Resets the instance as if it had just been constructed so that the instance can be reused. More... | |
virtual void | beginIgnoring ()=0 |
Begin ignoring arguments since the "--" argument was specified. More... | |
virtual bool | ignoreRest ()=0 |
Whether to ignore the rest. More... | |
Public Member Functions inherited from TCLAP::ArgContainer | |
virtual | ~ArgContainer () |
The base class that manages the command line definition and passes along the parsing to the appropriate Arg classes.
Definition at line 46 of file CmdLineInterface.h.
|
inlinevirtual |
Destructor.
Definition at line 51 of file CmdLineInterface.h.
References add(), addToArgList(), beginIgnoring(), getArgGroups(), getArgList(), getDelimiter(), getMessage(), getProgramName(), getVersion(), hasHelpAndVersion(), ignoreRest(), parse(), reset(), setOutput(), and xorAdd().
|
pure virtual |
Adds an argument.
Ownership is not transfered.
a | - Argument to be added. |
A | reference to this so that add calls can be chained |
Implements TCLAP::ArgContainer.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::AnyOf::AnyOf(), TCLAP::ExclusiveArgGroup::ExclusiveArgGroup(), TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg(), and ~CmdLineInterface().
|
pure virtual |
Adds an argument.
Ownership is not transfered.
a | - Argument to be added. |
A | reference to this so that add calls can be chained |
Implements TCLAP::ArgContainer.
Implemented in TCLAP::CmdLine.
|
pure virtual |
Adds an argument group to the list of arguments to be parsed.
All arguments in the group are added and the ArgGroup object will validate that the input matches its constraints.
args | - Argument group to be added. |
A | reference to this so that add calls can be chained |
Implemented in TCLAP::CmdLine.
|
pure virtual |
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::ArgGroup::add(), TCLAP::ArgGroup::setParser(), and ~CmdLineInterface().
|
pure virtual |
Begin ignoring arguments since the "--" argument was specified.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::IgnoreRestVisitor::visit(), and ~CmdLineInterface().
|
pure virtual |
Returns the list of ArgGroups.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::_shortUsage(), TCLAP::DocBookOutput::usage(), and ~CmdLineInterface().
|
pure virtual |
Implemented in TCLAP::CmdLine.
Referenced by ~CmdLineInterface().
|
pure virtual |
Returns the delimiter string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::DocBookOutput::usage(), and ~CmdLineInterface().
|
pure virtual |
Returns the message string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::DocBookOutput::usage(), and ~CmdLineInterface().
|
pure virtual |
Returns the program name string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_shortUsage(), TCLAP::StdOutput::failure(), TCLAP::DocBookOutput::usage(), TCLAP::StdOutput::version(), and ~CmdLineInterface().
|
pure virtual |
Returns the version string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::DocBookOutput::usage(), TCLAP::DocBookOutput::version(), TCLAP::StdOutput::version(), and ~CmdLineInterface().
|
pure virtual |
Indicates whether or not the help and version switches were created automatically.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::failure(), and ~CmdLineInterface().
|
pure virtual |
|
pure virtual |
Parses the command line.
argc | - Number of arguments. |
argv | - Array of arguments. |
Implemented in TCLAP::CmdLine.
Referenced by ~CmdLineInterface().
void TCLAP::CmdLineInterface::parse | ( | std::vector< std::string > & | args | ) |
Parses the command line.
args | - A vector of strings representing the args. args[0] is still the program name. |
|
pure virtual |
Resets the instance as if it had just been constructed so that the instance can be reused.
Implemented in TCLAP::CmdLine.
Referenced by ~CmdLineInterface().
|
pure virtual |
co | - CmdLineOutput object that we want to use instead. |
Implemented in TCLAP::CmdLine.
Referenced by ~CmdLineInterface().
|
pure virtual |
Implemented in TCLAP::CmdLine.