15 #ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H 16 #define TCLAP_UNLABELED_VALUE_ARGUMENT_H 34 class UnlabeledValueArg :
public ValueArg<T>
72 const std::string& desc,
75 const std::string& typeDesc,
76 bool ignoreable =
false,
102 const std::string& desc,
105 const std::string& typeDesc,
106 CmdLineInterface& parser,
107 bool ignoreable =
false,
130 const std::string& desc,
133 Constraint<T>* constraint,
134 bool ignoreable =
false,
159 const std::string& desc,
162 Constraint<T>* constraint,
163 CmdLineInterface& parser,
164 bool ignoreable =
false,
180 virtual std::string
shortID(
const std::string& val=
"val")
const;
185 virtual std::string
longID(
const std::string& val=
"val")
const;
196 virtual void addToList( std::list<Arg*>& argList )
const;
205 const std::string& desc,
208 const std::string& typeDesc,
211 :
ValueArg<T>(
"", name, desc, req, value, typeDesc, v)
213 _ignoreable = ignoreable;
221 const std::string& desc,
224 const std::string& typeDesc,
225 CmdLineInterface& parser,
228 : ValueArg<T>(
"", name, desc, req, value, typeDesc, v)
230 _ignoreable = ignoreable;
240 const std::string& desc,
243 Constraint<T>* constraint,
246 : ValueArg<T>(
"", name, desc, req, value, constraint, v)
248 _ignoreable = ignoreable;
254 const std::string& desc,
257 Constraint<T>* constraint,
258 CmdLineInterface& parser,
261 : ValueArg<T>(
"", name, desc, req, value, constraint, v)
263 _ignoreable = ignoreable;
278 if ( _hasBlanks( args[*i] ) )
283 _extractValue( args[*i] );
294 std::string
id =
"<" + _typeDesc +
">";
308 std::string
id =
"<" + _typeDesc +
">";
319 if ( _name == a.getName() || _description == a.getDescription() )
328 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
void _extractValue(const std::string &val)
ValueArg(const std::string &flag, const std::string &name, const std::string &desc, bool req, T value, const std::string &typeDesc, Visitor *v=NULL)
virtual std::string longID(const std::string &val="val") const
UnlabeledValueArg(const std::string &name, const std::string &desc, bool req, T value, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
virtual std::string toString() const
virtual bool processArg(int *i, std::vector< std::string > &args)
virtual bool operator==(const Arg &a) const
bool _hasBlanks(const std::string &s) const
virtual void addToList(std::list< Arg * > &argList) const
Arg(const std::string &flag, const std::string &name, const std::string &desc, bool req, bool valreq, Visitor *v=NULL)
virtual std::string shortID(const std::string &val="val") const
static void check(bool req, const std::string &argName)