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