tclap  1.4.0
Public Member Functions | Protected Attributes | List of all members
TCLAP::XorHandler Class Reference

This class handles lists of Arg's that are to be XOR'd on the command line. More...

#include <XorHandler.h>

Public Member Functions

 XorHandler ()
 Constructor. More...
 
void add (const std::vector< Arg *> &ors)
 Add a list of Arg*'s that will be xor'd 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...
 
const std::vector< std::vector< Arg * > > & getXorList () const
 

Protected Attributes

std::vector< std::vector< Arg * > > _orList
 The list of of lists of Arg's to be or'd together. More...
 

Detailed Description

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 40 of file XorHandler.h.

Constructor & Destructor Documentation

◆ XorHandler()

TCLAP::XorHandler::XorHandler ( )
inline

Constructor.

Does nothing.

Definition at line 54 of file XorHandler.h.

References add(), check(), contains(), getXorList(), printLongUsage(), and shortUsage().

Here is the call graph for this function:

Member Function Documentation

◆ add()

void TCLAP::XorHandler::add ( const std::vector< Arg *> &  ors)
inline

Add a list of Arg*'s that will be xor'd together.

Parameters
ors- list of Arg* that will be xor'd.

Definition at line 97 of file XorHandler.h.

References _orList.

Referenced by XorHandler().

◆ check()

int TCLAP::XorHandler::check ( const Arg a)
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.

Parameters
a- The Arg to be checked.

Definition at line 102 of file XorHandler.h.

References _orList, TCLAP::Arg::isRequired(), and TCLAP::Arg::isSet().

Referenced by XorHandler().

Here is the call graph for this function:

◆ contains()

bool TCLAP::XorHandler::contains ( const Arg a)
inline

Simply checks whether the Arg is contained in one of the arg lists.

Parameters
a- The Arg to be checked.

Definition at line 143 of file XorHandler.h.

References _orList.

Referenced by XorHandler().

◆ getXorList()

const std::vector< std::vector< Arg * > > & TCLAP::XorHandler::getXorList ( ) const
inline

Definition at line 155 of file XorHandler.h.

References _orList.

Referenced by TCLAP::ZshCompletionOutput::getMutexList(), and XorHandler().

◆ printLongUsage()

void TCLAP::XorHandler::printLongUsage ( std::ostream &  os)

Prints the XOR specific long usage.

Parameters
os- Stream to print to.

Referenced by XorHandler().

◆ shortUsage()

std::string TCLAP::XorHandler::shortUsage ( )

Returns the XOR specific short usage.

Referenced by XorHandler().

Member Data Documentation

◆ _orList

std::vector< std::vector<Arg*> > TCLAP::XorHandler::_orList
protected

The list of of lists of Arg's to be or'd together.

Definition at line 47 of file XorHandler.h.

Referenced by add(), check(), contains(), and getXorList().


The documentation for this class was generated from the following file: