24 #ifndef DtCmdLine_UNLABELED_VALUE_ARGUMENT_H
25 #define DtCmdLine_UNLABELED_VALUE_ARGUMENT_H
36 #ifdef DtUSE_UTILITIES_NAMESPACE
37 namespace DtUSE_UTILITIES_NAMESPACE
90 const std::string& desc,
92 const std::string& typeDesc,
93 bool ignoreable =
false,
121 const std::string& desc,
123 const std::string& typeDesc,
125 bool ignoreable =
false,
150 const std::string& desc,
152 const std::vector<T>& allowed,
153 bool ignoreable =
false,
180 const std::string& desc,
182 const std::vector<T>& allowed,
184 bool ignoreable =
false,
195 virtual bool processArg(
int* i, std::vector<std::string>& args);
200 virtual std::string shortID(
const std::string& val=
"val")
const;
205 virtual std::string longID(
const std::string& val=
"val")
const;
216 virtual void addToList( std::list<Arg*>& argList )
const;
224 const std::string& desc,
226 const std::string& typeDesc,
229 :
ValueArg<T>(
"", name, desc, true, val, typeDesc, v)
236 const std::string& desc,
238 const std::string& typeDesc,
242 :
ValueArg<T>(
"", name, desc, true, val, typeDesc, v)
253 const std::string& desc,
255 const std::vector<T>& allowed,
258 :
ValueArg<T>(
"", name, desc, true, val, allowed, v)
265 const std::string& desc,
267 const std::vector<T>& allowed,
271 :
ValueArg<T>(
"", name, desc, true, val, allowed, v)
287 if ( _hasBlanks( args[*i] ) )
292 _extractValue( args[*i] );
303 std::string
id =
"<" + _typeDesc +
">";
317 std::string
id =
"<" + _typeDesc +
">";
337 argList.push_back( (
Arg*)
this );
342 #ifdef DtUSE_UTILITIES_NAMESPACE
A base class that defines the interface for visitors.
Definition: cmdVisitor.h:41
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
bool _ignoreable
Whether this argument can be ignored, if desired.
Definition: cmdArg.h:125
UnlabeledValueArg(const std::string &name, const std::string &desc, T value, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
UnlabeledValueArg constructor.
Definition: cmdUnlabeledValueArg.h:223
std::string getDescription() const
Returns the argument description.
Definition: cmdArg.h:473
const std::string & getName() const
Returns the argument name.
Definition: cmdArg.h:488
virtual std::string longID(const std::string &val="val") const
Overrides longID for specific behavior.
Definition: cmdUnlabeledValueArg.h:312
The basic labeled argument that parses a value.
Definition: cmdValueArg.h:63
virtual void addToList(std::list< Arg * > &argList) const
Instead of pushing to the front of list, push to the back.
Definition: cmdUnlabeledValueArg.h:335
A virtual base class that defines the essential data for all arguments.
Definition: cmdArg.h:48
virtual void add(Arg &a)=0
Adds an argument to the list of arguments to be parsed.
The basic unlabeled argument that parses a value.
Definition: cmdUnlabeledValueArg.h:51
virtual std::string shortID(const std::string &val="val") const
Overrides shortID for specific behavior.
Definition: cmdUnlabeledValueArg.h:301
The base class that manages the command line definition and passes along the parsing to the appropria...
Definition: cmdLineInterface.h:52
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
Definition: cmdUnlabeledValueArg.h:281
virtual bool operator==(const Arg &a) const
Overrides operator== for specific behavior.
Definition: cmdUnlabeledValueArg.h:326
This file declares the class DtCmdLine::ValueArg.