32#ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H
33#define TCLAP_UNLABELED_VALUE_ARGUMENT_H
88 const std::string& desc,
91 const std::string& typeDesc,
92 bool ignoreable =
false,
118 const std::string& desc,
121 const std::string& typeDesc,
123 bool ignoreable =
false,
146 const std::string& desc,
150 bool ignoreable =
false,
175 const std::string& desc,
180 bool ignoreable =
false,
191 virtual bool processArg(
int* i, std::vector<std::string>& args);
196 virtual std::string
shortID(
const std::string& val=
"val")
const;
201 virtual std::string
longID(
const std::string& val=
"val")
const;
212 virtual void addToList( std::list<Arg*>& argList )
const;
221 const std::string& desc,
224 const std::string& typeDesc,
227:
ValueArg<T>(
"", name, desc, req, val, typeDesc, v)
237 const std::string& desc,
240 const std::string& typeDesc,
244:
ValueArg<T>(
"", name, desc, req, val, typeDesc, v)
256 const std::string& desc,
262:
ValueArg<T>(
"", name, desc, req, val, constraint, v)
270 const std::string& desc,
277:
ValueArg<T>(
"", name, desc, req, val, constraint, v)
294 if ( _hasBlanks( args[*i] ) )
299 _extractValue( args[*i] );
310 std::string
id =
"<" + _typeDesc +
">";
324 std::string
id =
"<" + _typeDesc +
">";
344 argList.push_back(
const_cast<Arg*
>(
static_cast<const Arg* const
>(
this)) );
A virtual base class that defines the essential data for all arguments.
bool _ignoreable
Whether this argument can be ignored, if desired.
const std::string & getName() const
Returns the argument name.
std::string getDescription() const
Returns the argument description.
virtual std::string toString() const
Returns a simple string representation of the argument.
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual void add(Arg &a)=0
Adds an argument to the list of arguments to be parsed.
The interface that defines the interaction between the Arg and Constraint.
static void check(bool req, const std::string &argName)
The basic unlabeled argument that parses a value.
virtual std::string longID(const std::string &val="val") const
Overrides longID for specific behavior.
virtual std::string shortID(const std::string &val="val") const
Overrides shortID for specific behavior.
virtual void addToList(std::list< Arg * > &argList) const
Instead of pushing to the front of list, push to the back.
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 bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
virtual bool operator==(const Arg &a) const
Overrides operator== for specific behavior.
The basic labeled argument that parses a value.
A base class that defines the interface for visitors.