23 #ifndef DtCmdLine_XORHANDLER_H
24 #define DtCmdLine_XORHANDLER_H
36 #ifdef DtUSE_UTILITIES_NAMESPACE
37 namespace DtUSE_UTILITIES_NAMESPACE
68 void add( std::vector<Arg*>& ors );
77 int check(
const Arg* a );
82 std::string shortUsage();
88 void printLongUsage(std::ostream& os);
95 bool contains(
const Arg* a );
97 std::vector< std::vector<Arg*> >& getXorList();
105 inline void XorHandler::add( std::vector<Arg*>& ors )
107 _orList.push_back( ors );
145 inline int XorHandler::check(
const Arg* a )
149 for (i = 0; (
unsigned int)i < _orList.size(); i++ )
152 if ( std::find( _orList[i].begin(), _orList[i].end(), a ) !=
157 it != _orList[i].end();
163 return (
int)_orList[i].size();
173 inline bool XorHandler::contains(
const Arg* a )
175 for (
int i = 0; (
unsigned int)i < _orList.size(); i++ )
177 it != _orList[i].end();
185 inline std::vector< std::vector<Arg*> >& XorHandler::getXorList()
198 #ifdef DtUSE_UTILITIES_NAMESPACE
XorHandler()
Constructor.
Definition: cmdXorHandler.h:62
This file declares classes for VR-Link command line parsing utility.
virtual bool isRequired() const
Indicates whether the argument is required.
Definition: cmdArg.h:475
std::vector< std::vector< Arg * > > _orList
The list of of lists of Arg's to be or'd together.
Definition: cmdXorHandler.h:55
A virtual base class that defines the essential data for all arguments.
Definition: cmdArg.h:48
std::vector< Arg * >::iterator ArgVectorIterator
Typedef of an Arg vector iterator.
Definition: cmdArg.h:347