Go to the documentation of this file.
32 #ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H
33 #define TCLAP_UNLABELED_VALUE_ARGUMENT_H
50 class UnlabeledValueArg :
public ValueArg<T>
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)) );
virtual std::string shortID(const std::string &val="val") const
Overrides shortID for specific behavior.
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.
The interface that defines the interaction between the Arg and Constraint.
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
std::string _name
A single work namd indentifying the argument.
static void check(bool req, const std::string &argName)
void _extractValue(const std::string &val)
Extracts the value from the string.
The base class that manages the command line definition and passes along the parsing to the appropria...
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.
std::string _typeDesc
A human readable description of the type 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 longID(const std::string &val="val") const
Overrides longID for specific behavior.
virtual void addToList(std::list< Arg * > &argList) const
Instead of pushing to the front of list, push to the back.
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.
The basic labeled argument that parses a value.
const std::string & getName() const
Returns the argument name.
virtual bool operator==(const Arg &a) const
Overrides operator== for specific behavior.
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |