|
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. | |
| virtual ArgContainer & | add (Arg &a)=0 |
| Adds an argument. | |
| virtual ArgContainer & | add (Arg *a)=0 |
| Adds an argument. | |
| virtual void | addToArgList (Arg *a)=0 |
| virtual ArgContainer & | add (ArgGroup &args)=0 |
| Adds an argument group to the list of arguments to be parsed. | |
| 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. | |
| void | parse (std::vector< std::string > &args) |
| Parses the command line. | |
| virtual void | setOutput (CmdLineOutput *co)=0 |
| virtual std::string | getVersion () const =0 |
| Returns the version string. | |
| virtual std::string | getProgramName () const =0 |
| Returns the program name string. | |
| virtual std::list< ArgGroup * > | getArgGroups ()=0 |
| Returns the list of ArgGroups. | |
| virtual std::list< Arg * > | getArgList () const =0 |
| virtual char | getDelimiter () const =0 |
| Returns the delimiter string. | |
| virtual std::string | getMessage () const =0 |
| Returns the message string. | |
| virtual std::string | translateMessage (const std::string &messageId, const std::string &fallback) const =0 |
| Translates a built-in message using the current translator. | |
| virtual bool | hasHelpAndVersion () const =0 |
| Indicates whether or not the help and version switches were created automatically. | |
| virtual void | reset ()=0 |
| Resets the instance as if it had just been constructed so that the instance can be reused. | |
| virtual void | beginIgnoring ()=0 |
| Begin ignoring arguments since the "--" argument was specified. | |
| virtual bool | ignoreRest ()=0 |
| Whether to ignore the rest. | |
Public Member Functions inherited from TCLAP::ArgContainer | |
| virtual | ~ArgContainer () |
Protected Member Functions | |
| virtual bool | attachGroup (ArgGroup &) |
Friends | |
| class | ArgGroup |
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 57 of file CmdLineInterface.h.
|
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 TCLAP::UnlabeledValueArg< T >::UnlabeledValueArg().
|
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(), and TCLAP::ArgGroup::setParser().
|
inlineprotectedvirtual |
Reimplemented in TCLAP::CmdLine.
Definition at line 51 of file CmdLineInterface.h.
Referenced by TCLAP::ArgGroup::setParser().
|
pure virtual |
Begin ignoring arguments since the "--" argument was specified.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::IgnoreRestVisitor::visit().
|
pure virtual |
Returns the list of ArgGroups.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::_shortUsage(), and TCLAP::DocBookOutput::usage().
|
pure virtual |
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::_shortUsage(), and TCLAP::DocBookOutput::usage().
|
pure virtual |
Returns the delimiter string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::DocBookOutput::usage().
|
pure virtual |
Returns the message string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), and TCLAP::DocBookOutput::usage().
|
pure virtual |
Returns the program name string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_shortUsage(), TCLAP::StdOutput::failure(), TCLAP::DocBookOutput::usage(), and TCLAP::StdOutput::version().
|
pure virtual |
Returns the version string.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::DocBookOutput::usage(), TCLAP::DocBookOutput::version(), and TCLAP::StdOutput::version().
|
pure virtual |
Indicates whether or not the help and version switches were created automatically.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::failure().
|
pure virtual |
Whether to ignore the rest.
Implemented in TCLAP::CmdLine.
|
pure virtual |
Parses the command line.
| argc | - Number of arguments. |
| argv | - Array of arguments. |
Implemented in TCLAP::CmdLine.
| 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.
|
pure virtual |
| co | - CmdLineOutput object that we want to use instead. |
Implemented in TCLAP::CmdLine.
|
pure virtual |
Translates a built-in message using the current translator.
Implemented in TCLAP::CmdLine.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::failure(), TCLAP::StdOutput::usage(), and TCLAP::StdOutput::version().
Implemented in TCLAP::CmdLine.
|
pure virtual |
Implemented in TCLAP::CmdLine.
|
friend |
Definition at line 47 of file CmdLineInterface.h.