15 #ifndef TCLAP_CMDLINE_H 16 #define TCLAP_CMDLINE_H 162 CmdLine(
const std::string& message,
163 const char delimiter =
' ',
164 const std::string& version =
"none",
165 bool helpAndVersion =
true);
197 void xorAdd( std::vector<Arg*>& xors );
204 void parse(
int argc,
char** argv);
259 const std::string& v,
303 "Displays usage information and exits.",
311 "Displays version information and exits.",
321 "Ignores the rest of the labeled arguments following this flag.",
334 (*it)->forceRequired();
335 (*it)->setRequireLabel(
"OR required" );
343 std::vector<Arg*> ors;
359 "Argument with same flag/name already exists!",
375 std::vector<std::string> args;
376 for (
int i = 1; i < argc; i++)
377 args.push_back(argv[i]);
379 int requiredCount = 0;
381 for (
int i = 0;
static_cast<unsigned int>(i) < args.size(); i++)
383 bool matched =
false;
386 if ( (*it)->processArg( &i, args ) )
418 for (
int i = 1;
static_cast<unsigned int>(i) < s.length(); i++ )
static char flagStartChar()
std::list< Visitor * >::iterator VisitorListIterator
TCLAP command line argument parser classes.
virtual bool isRequired() const
TCLAP command line argument parser classes.
std::list< Arg * > _argList
TClap class indirectly used to define the interface for visitors.
Tclap class indirectly used by children for standardising outputs.
Managing interface for The base class that manages the command line definition and passes along the p...
Virtual parent for all the different argument classes.
std::list< Arg * >::iterator ArgListIterator
static std::string ignoreNameString()
CmdLineOutput * getOutput()
TCLAP command line argument parser classes.
std::string & getVersion()
static std::string flagStartString()
Defines the exception that is thrown whenever a command line is created and parsed.
TCLAP command line argument parser classes.
std::vector< Arg * >::iterator ArgVectorIterator
CmdLine(const std::string &message, const char delimiter= ' ', const std::string &version="none", bool helpAndVersion=true)
virtual void failure(CmdLineInterface &c, ArgException &e)=0
TCLAP command line argument parser classes.
TCLAP command line argument parser classes.
TClap class indirectly used by CmdLine for handling xor'd arguments.
TClap class indirectly used to define the interface for visitors.
virtual std::string longID(const std::string &valueId="val") const
static void setDelimiter(char c)
std::string & getProgramName()
TClap class indirectly used to define the interface for visitors.
std::list< Visitor * > _visitorDeleteOnExitList
TCLAP command line argument parser classes.
XorHandler & getXorHandler()
Defines the exception when an argument is improperly specified.
TCLAP command line argument parser classes.
Manages the command line parsing object.
std::list< Arg * > _argDeleteOnExitList
TCLAP command line argument parser classes.
bool _emptyCombined(const std::string &s)
void deleteOnExit(Arg *ptr)
virtual void addToList(std::list< Arg * > &argList) const
TCLAP command line argument parser classes.
std::list< Arg * > & getArgList()
TCLAP command line argument parser classes.
void parse(int argc, char **argv)
std::string & getMessage()
TClap class indirectly used to define the interface for visitors.
void xorAdd(Arg &a, Arg &b)
void setOutput(CmdLineOutput *co)
TCLAP command line argument parser classes.
Defines the exception that is thrown whenever a conflict in arguments occurs.
void add(std::vector< Arg * > &ors)
TClap class indirectly used to handle CmdLine arguments.