Go to the documentation of this file.
31 #ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H
32 #define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H
48 class UnlabeledMultiArg :
public MultiArg<T>
82 const std::string& desc,
84 const std::string& typeDesc,
85 bool ignoreable =
false,
106 const std::string& desc,
108 const std::string& typeDesc,
110 bool ignoreable =
false,
129 const std::string& desc,
132 bool ignoreable =
false,
152 const std::string& desc,
156 bool ignoreable =
false,
167 virtual bool processArg(
int* i, std::vector<std::string>& args);
173 virtual std::string
shortID(
const std::string& val=
"val")
const;
179 virtual std::string
longID(
const std::string& val=
"val")
const;
191 virtual void addToList( std::list<Arg*>& argList )
const;
196 const std::string& desc,
198 const std::string& typeDesc,
201 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
209 const std::string& desc,
211 const std::string& typeDesc,
215 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
225 const std::string& desc,
230 :
MultiArg<T>(
"", name, desc, req, constraint, v)
238 const std::string& desc,
244 :
MultiArg<T>(
"", name, desc, req, constraint, v)
256 if ( _hasBlanks( args[*i] ) )
263 _extractValue( args[(*i)] );
281 std::string
id =
"<" + _typeDesc +
"> ...";
289 std::string
id =
"<" + _typeDesc +
"> (accepted multiple times)";
306 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
The interface that defines the interaction between the Arg and Constraint.
std::string _name
A single work namd indentifying the argument.
virtual std::string shortID(const std::string &val="val") const
Returns the a short id string.
static void check(bool req, const std::string &argName)
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
UnlabeledMultiArg(const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
Constructor.
std::string _typeDesc
The description of type T to be used in the usage.
An argument that allows multiple values of type T to be specified.
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual void addToList(std::list< Arg * > &argList) const
Pushes this to back of list rather than front.
void _extractValue(const std::string &val)
Extracts the value from the string.
A base class that defines the interface for visitors.
bool _ignoreable
Whether this argument can be ignored, if desired.
std::string _description
Description of the argument.
virtual void add(Arg &a)=0
Adds an argument to the list of arguments to be parsed.
A virtual base class that defines the essential data for all arguments.
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 toString() const
Returns a simple string representation of the argument.
bool _alreadySet
Indicates whether the argument has been set.
std::string getDescription() const
Returns the argument description.
virtual std::string longID(const std::string &val="val") const
Returns the a long id string.
const std::string & getName() const
Returns the argument name.
virtual bool operator==(const Arg &a) const
Opertor ==.
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |