23 #ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 24 #define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 74 const std::string& desc,
76 const std::string& typeDesc,
77 bool ignoreable =
false,
98 const std::string& desc,
100 const std::string& typeDesc,
102 bool ignoreable =
false,
121 const std::string& desc,
124 bool ignoreable =
false,
144 const std::string& desc,
148 bool ignoreable =
false,
159 virtual bool processArg(
int* i, std::vector<std::string>& args);
165 virtual std::string
shortID(
const std::string& val=
"val")
const;
171 virtual std::string
longID(
const std::string& val=
"val")
const;
183 virtual void addToList( std::list<Arg*>& argList )
const;
188 const std::string& desc,
190 const std::string& typeDesc,
193 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
201 const std::string& desc,
203 const std::string& typeDesc,
207 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
217 const std::string& desc,
222 :
MultiArg<T>(
"", name, desc, req, constraint, v)
230 const std::string& desc,
236 :
MultiArg<T>(
"", name, desc, req, constraint, v)
248 if ( _hasBlanks( args[*i] ) )
255 _extractValue( args[(*i)] );
273 static_cast<void>(val);
274 return std::string(
"<") + _typeDesc +
"> ...";
280 static_cast<void>(val);
281 return std::string(
"<") + _typeDesc +
"> (accepted multiple times)";
296 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
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.
The interface that defines the interaction between the Arg and Constraint.
virtual bool operator==(const Arg &a) const
Opertor ==.
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.
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.
virtual std::string longID(const std::string &val="val") const
Returns the a long id string.