27 #ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H 28 #define TCLAP_UNLABELED_VALUE_ARGUMENT_H 84 const std::string& desc,
87 const std::string& typeDesc,
88 bool ignoreable =
false,
114 const std::string& desc,
117 const std::string& typeDesc,
119 bool ignoreable =
false,
142 const std::string& desc,
146 bool ignoreable =
false,
171 const std::string& desc,
176 bool ignoreable =
false,
187 virtual bool processArg(
int* i, std::vector<std::string>& args);
192 virtual std::string
shortID(
const std::string& val=
"val")
const;
197 virtual std::string
longID(
const std::string& val=
"val")
const;
208 virtual void addToList( std::list<Arg*>& argList )
const;
217 const std::string& desc,
220 const std::string& typeDesc,
223 :
ValueArg<T>(
"", name, desc, req, val, typeDesc, v)
233 const std::string& desc,
236 const std::string& typeDesc,
240 :
ValueArg<T>(
"", name, desc, req, val, typeDesc, v)
252 const std::string& desc,
258 :
ValueArg<T>(
"", name, desc, req, val, constraint, v)
266 const std::string& desc,
273 :
ValueArg<T>(
"", name, desc, req, val, constraint, v)
306 static_cast<void>(val);
307 return std::string(
"<") +
_typeDesc +
">";
316 static_cast<void>(val);
321 return std::string(
"<") +
_typeDesc +
">";
339 argList.push_back( const_cast<Arg*>(static_cast<const Arg* const>(
this)) );
bool _alreadySet
Indicates whether the argument has been set.
void _extractValue(const std::string &val)
Extracts the value from the string.
A virtual base class that defines the essential data for all arguments.
static void check(bool req, const std::string &argName)
The basic labeled argument that parses a value.
UnlabeledValueArg(const std::string &name, const std::string &desc, bool req, T value, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
UnlabeledValueArg constructor.
virtual std::string longID(const std::string &val="val") const
Overrides longID for specific behavior.
The interface that defines the interaction between the Arg and Constraint.
virtual bool operator==(const Arg &a) const
Overrides operator== for specific behavior.
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.
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.
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
bool _ignoreable
Whether this argument can be ignored, if desired.
std::string _typeDesc
A human readable description of the type to be parsed.
std::string getDescription() const
Returns the argument description.
virtual void addToList(std::list< Arg *> &argList) const
Instead of pushing to the front of list, push to the back.
std::string _name
A single word namd identifying the argument.
virtual std::string shortID(const std::string &val="val") const
Overrides shortID for specific behavior.
bool _hasBlanks(const std::string &s) const
Checks whether a given string has blank chars, indicating that it is a combined SwitchArg.
The basic unlabeled argument that parses a value.