Go to the documentation of this file.
15 #ifndef TCLAP_CMDLINE_H
16 #define TCLAP_CMDLINE_H
49 class CmdLine :
public CmdLineInterface
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,
261 : _progName(
"not_set_yet"),
266 _userSetOutput(false),
267 _helpAndVersion(help)
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++ )
TCLAP command line argument parser classes.
static void setDelimiter(char c)
TCLAP command line argument parser classes.
std::string & getVersion()
void deleteOnExit(Arg *ptr)
TClap class indirectly used to define the interface for visitors.
std::list< Arg * >::iterator ArgListIterator
std::list< Visitor * >::iterator VisitorListIterator
TCLAP command line argument parser classes.
TClap class indirectly used by CmdLine for handling xor'd arguments.
CmdLineOutput * getOutput()
TCLAP command line argument parser classes.
TCLAP command line argument parser classes.
TCLAP command line argument parser classes.
std::vector< Arg * >::iterator ArgVectorIterator
TCLAP command line argument parser classes.
virtual void failure(CmdLineInterface &c, ArgException &e)=0
std::list< Arg * > _argList
Virtual parent for all the different argument classes.
TCLAP command line argument parser classes.
Defines the exception that is thrown whenever a command line is created and parsed.
Defines the exception that is thrown whenever a conflict in arguments occurs.
TClap class indirectly used to handle CmdLine arguments.
TClap class indirectly used to define the interface for visitors.
bool _emptyCombined(const std::string &s)
std::list< Visitor * > _visitorDeleteOnExitList
XorHandler & getXorHandler()
std::list< Arg * > _argDeleteOnExitList
TCLAP command line argument parser classes.
void setOutput(CmdLineOutput *co)
std::string & getProgramName()
virtual void addToList(std::list< Arg * > &argList) const
static char flagStartChar()
TClap class indirectly used to define the interface for visitors.
std::string & getMessage()
TClap class indirectly used to define the interface for visitors.
TCLAP command line argument parser classes.
TCLAP command line argument parser classes.
CmdLine(const std::string &message, const char delimiter=' ', const std::string &version="none", bool helpAndVersion=true)
Tclap class indirectly used by children for standardising outputs.
void xorAdd(Arg &a, Arg &b)
static std::string flagStartString()
virtual std::string longID(const std::string &valueId="val") const
static std::string ignoreNameString()
Defines the exception when an argument is improperly specified.
void parse(int argc, char **argv)
std::list< Arg * > & getArgList()
virtual bool isRequired() const
TCLAP command line argument parser classes.
void add(std::vector< Arg * > &ors)
ecl_command_line
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:13