15 #ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 16 #define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H 32 class UnlabeledMultiArg :
public MultiArg<T>
66 const std::string& desc,
68 const std::string& typeDesc,
69 bool ignoreable =
false,
90 const std::string& desc,
92 const std::string& typeDesc,
93 CmdLineInterface& parser,
94 bool ignoreable =
false,
113 const std::string& desc,
115 Constraint<T>* constraint,
116 bool ignoreable =
false,
136 const std::string& desc,
138 Constraint<T>* constraint,
139 CmdLineInterface& parser,
140 bool ignoreable =
false,
157 virtual std::string
shortID(
const std::string& val=
"val")
const;
163 virtual std::string
longID(
const std::string& val=
"val")
const;
175 virtual void addToList( std::list<Arg*>& argList )
const;
180 const std::string& desc,
182 const std::string& typeDesc,
185 :
MultiArg<T>(
"", name, desc, req, typeDesc, v)
187 _ignoreable = ignoreable;
193 const std::string& desc,
195 const std::string& typeDesc,
196 CmdLineInterface& parser,
199 : MultiArg<T>(
"", name, desc, req, typeDesc, v)
201 _ignoreable = ignoreable;
209 const std::string& desc,
211 Constraint<T>* constraint,
214 : MultiArg<T>(
"", name, desc, req, constraint, v)
216 _ignoreable = ignoreable;
222 const std::string& desc,
224 Constraint<T>* constraint,
225 CmdLineInterface& parser,
228 : MultiArg<T>(
"", name, desc, req, constraint, v)
230 _ignoreable = ignoreable;
240 if ( _hasBlanks( args[*i] ) )
247 _extractValue( args[(*i)] );
265 std::string
id =
"<" + _typeDesc +
"> ...";
273 std::string
id =
"<" + _typeDesc +
"> (accepted multiple times)";
281 if ( _name == a.getName() || _description == a.getDescription() )
290 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
virtual bool processArg(int *i, std::vector< std::string > &args)
virtual std::string shortID(const std::string &val="val") const
virtual std::string toString() const
MultiArg(const std::string &flag, const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, Visitor *v=NULL)
virtual bool operator==(const Arg &a) const
virtual std::string longID(const std::string &val="val") const
UnlabeledMultiArg(const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
virtual void addToList(std::list< Arg * > &argList) const
void _extractValue(const std::string &val)
bool _hasBlanks(const std::string &s) const
Arg(const std::string &flag, const std::string &name, const std::string &desc, bool req, bool valreq, Visitor *v=NULL)
static void check(bool req, const std::string &argName)