This class handles lists of Arg's that are to be XOR'd on the command line.
This is used by CmdLine and you shouldn't ever use it.
Definition at line 46 of file XorHandler.h.
#include <mrpt/otherlibs/tclap/XorHandler.h>
Public Member Functions | |
XorHandler () | |
Constructor. More... | |
void | add (std::vector< Arg *> &ors) |
Add a list of Arg*'s that will be orred together. More... | |
int | check (const Arg *a) |
Checks whether the specified Arg is in one of the xor lists and if it does match one, returns the size of the xor list that the Arg matched. More... | |
std::string | shortUsage () |
Returns the XOR specific short usage. More... | |
void | printLongUsage (std::ostream &os) |
Prints the XOR specific long usage. More... | |
bool | contains (const Arg *a) |
Simply checks whether the Arg is contained in one of the arg lists. More... | |
std::vector< std::vector< Arg * > > & | getXorList () |
Protected Attributes | |
std::vector< std::vector< Arg * > > | _orList |
The list of of lists of Arg's to be or'd together. More... | |
|
inline |
Constructor.
Does nothing.
Definition at line 60 of file XorHandler.h.
References add(), check(), contains(), getXorList(), printLongUsage(), and shortUsage().
|
inline |
Add a list of Arg*'s that will be orred together.
ors | - list of Arg* that will be xor'd. |
Definition at line 103 of file XorHandler.h.
References _orList.
Referenced by TCLAP::CmdLine::xorAdd(), and XorHandler().
|
inline |
Checks whether the specified Arg is in one of the xor lists and if it does match one, returns the size of the xor list that the Arg matched.
If the Arg matches, then it also sets the rest of the Arg's in the list. You shouldn't use this.
a | - The Arg to be checked. |
Definition at line 108 of file XorHandler.h.
References _orList, begin(), end(), mrpt::utils::find(), and TCLAP::Arg::isRequired().
Referenced by TCLAP::CmdLine::parse(), and XorHandler().
|
inline |
Simply checks whether the Arg is contained in one of the arg lists.
a | - The Arg to be checked. |
Definition at line 139 of file XorHandler.h.
References _orList, and begin().
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::_shortUsage(), TCLAP::DocBookOutput::usage(), and XorHandler().
|
inline |
Definition at line 151 of file XorHandler.h.
References _orList.
Referenced by TCLAP::StdOutput::_longUsage(), TCLAP::StdOutput::_shortUsage(), TCLAP::DocBookOutput::usage(), and XorHandler().
void TCLAP::XorHandler::printLongUsage | ( | std::ostream & | os | ) |
std::string TCLAP::XorHandler::shortUsage | ( | ) |
Returns the XOR specific short usage.
Referenced by XorHandler().
|
protected |
The list of of lists of Arg's to be or'd together.
Definition at line 53 of file XorHandler.h.
Referenced by add(), check(), contains(), and getXorList().
Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Tue Oct 31 07:27:35 UTC 2017 |