26 #ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 27 #define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 77 const std::string& desc,
79 const std::string& typeDesc,
80 bool ignoreable =
false,
101 const std::string& desc,
103 const std::string& typeDesc,
105 bool ignoreable =
false,
124 const std::string& desc,
127 bool ignoreable =
false,
147 const std::string& desc,
151 bool ignoreable =
false,
162 virtual bool processArg(
int* i, std::vector<std::string>& args);
168 virtual std::string
shortID(
const std::string& val=
"val")
const;
174 virtual std::string
longID(
const std::string& val=
"val")
const;
186 virtual void addToList( std::list<Arg*>& argList )
const;
191 const std::string& desc,
193 const std::string& typeDesc,
196 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
204 const std::string& desc,
206 const std::string& typeDesc,
210 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
220 const std::string& desc,
225 :
MultiArg<T>(
"", name, desc, req, constraint, v)
233 const std::string& desc,
239 :
MultiArg<T>(
"", name, desc, req, constraint, v)
276 static_cast<void>(val);
277 return std::string(
"<") +
_typeDesc +
"> ...";
283 static_cast<void>(val);
284 return std::string(
"<") +
_typeDesc +
"> (accepted multiple times)";
299 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
bool _alreadySet
Indicates whether the argument has been set.
A virtual base class that defines the essential data for all arguments.
static void check(bool req, const std::string &argName)
An argument that allows multiple values of type T to be specified.
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
std::string _typeDesc
The description of type T to be used in the usage.
The interface that defines the interaction between the Arg and Constraint.
virtual bool operator==(const Arg &a) const
Operator ==.
void _extractValue(const std::string &val)
Extracts the value from the string.
virtual std::string shortID(const std::string &val="val") const
Returns the a short id string.
virtual void addToList(std::list< Arg *> &argList) const
Pushes this to back of list rather than front.
A base class that defines the interface for visitors.
const std::string & getName() const
Returns the argument name.
std::string _description
Description of the argument.
Just like a MultiArg, except that the arguments are unlabeled.
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual std::string toString() const
Returns a simple string representation of the argument.
virtual void add(Arg &a)=0
Adds an argument to the list of arguments to be parsed.
bool _ignoreable
Whether this argument can be ignored, if desired.
std::string getDescription() const
Returns the argument description.
UnlabeledMultiArg(const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
Constructor.
std::string _name
A single word namd identifying the argument.
bool _hasBlanks(const std::string &s) const
Checks whether a given string has blank chars, indicating that it is a combined SwitchArg.
virtual std::string longID(const std::string &val="val") const
Returns the a long id string.