Go to the documentation of this file.
23 #ifndef TCLAP_XORHANDLER_H
24 #define TCLAP_XORHANDLER_H
45 std::vector< std::vector<Arg*> >
_orList;
58 void add( std::vector<Arg*>& ors );
67 int check(
const Arg* a );
87 std::vector< std::vector<Arg*> >&
getXorList();
103 for (
int i = 0;
static_cast<unsigned int>(i) <
_orList.size(); i++ )
115 if ( a != (*it) && (*it)->isSet() )
117 "Mutually exclusive argument already set!",
128 if ( (*ait)->allowMore() )
131 return static_cast<int>(
_orList[i].size());
143 for (
int i = 0;
static_cast<unsigned int>(i) <
_orList.size(); i++ )
void printLongUsage(std::ostream &os)
Prints the XOR specific long usage.
Thrown from CmdLine when the arguments on the command line are not properly specified,...
std::vector< std::vector< Arg * > > _orList
The list of of lists of Arg's to be or'd together.
bool contains(const Arg *a)
Simply checks whether the Arg is contained in one of the arg lists.
std::string shortUsage()
Returns the XOR specific short usage.
std::vector< Arg * >::iterator ArgVectorIterator
Typedef of an Arg vector iterator.
void add(std::vector< Arg * > &ors)
Add a list of Arg*'s that will be xor'd together.
std::vector< std::vector< Arg * > > & getXorList()
int check(const Arg *a)
Checks whether the specified Arg is in one of the xor lists and if it does match one,...
virtual bool isRequired() const
Indicates whether the argument is required.
A virtual base class that defines the essential data for all arguments.