22 #ifndef replacedCmdUnlabledMultiArg_H_
23 #define replacedCmdUnlabledMultiArg_H_
31 #include <cmdLine/cmdMultiArg.h>
48 using DtCmdLine::MultiArg<T>::_ignoreable;
51 using DtCmdLine::MultiArg<T>::_hasBlanks;
52 using DtCmdLine::MultiArg<T>::_extractValue;
53 using DtCmdLine::MultiArg<T>::_typeDesc;
54 using DtCmdLine::MultiArg<T>::_name;
55 using DtCmdLine::MultiArg<T>::_description;
76 const std::string& desc,
77 const std::string& typeDesc,
78 bool ignoreable =
false,
79 DtCmdLine::Visitor* v = NULL );
97 const std::string& desc,
98 const std::string& typeDesc,
99 DtCmdLine::CmdLineInterface& parser,
100 bool ignoreable =
false,
101 DtCmdLine::Visitor* v = NULL );
117 const std::string& desc,
118 const std::vector<T>& allowed,
119 bool ignoreable =
false,
120 DtCmdLine::Visitor* v = NULL );
137 const std::string& desc,
138 const std::vector<T>& allowed,
139 DtCmdLine::CmdLineInterface& parser,
140 bool ignoreable =
false,
141 DtCmdLine::Visitor* v = NULL );
151 virtual bool processArg(
int* i, std::vector<std::string>& args);
157 virtual std::string
shortID(
const std::string& val)
const;
163 virtual std::string
longID(
const std::string& val)
const;
169 virtual void addToList( std::list<DtCmdLine::Arg*>& argList )
const;
174 const std::string& desc,
175 const std::string& typeDesc,
177 DtCmdLine::Visitor* v)
178 : DtCmdLine::MultiArg<T>(
"", name, desc, false, typeDesc, v)
180 _ignoreable = ignoreable;
185 const std::string& desc,
186 const std::string& typeDesc,
187 DtCmdLine::CmdLineInterface& parser,
189 DtCmdLine::Visitor* v)
190 : DtCmdLine::MultiArg<T>(
"", name, desc, false, typeDesc, v)
192 _ignoreable = ignoreable;
199 const std::string& desc,
200 const std::vector<T>& allowed,
202 DtCmdLine::Visitor* v)
203 : DtCmdLine::MultiArg<T>(
"", name, desc, false, allowed, v)
205 _ignoreable = ignoreable;
210 const std::string& desc,
211 const std::vector<T>& allowed,
212 DtCmdLine::CmdLineInterface& parser,
214 DtCmdLine::Visitor* v)
215 : DtCmdLine::MultiArg<T>(
"", name, desc, false, allowed, v)
217 _ignoreable = ignoreable;
226 if ( _hasBlanks( args[*i] ) )
231 _extractValue( args[*i] );
238 std::string
id =
"<" + _typeDesc +
"> ...";
246 std::string
id =
"<" + _typeDesc +
">";
263 argList.push_back( (DtCmdLine::Arg*)
this );
virtual std::string shortID(const std::string &val) const
Returns the a short id string.
Definition: replacedCmdUnlabledMultiArg.h:236
virtual void addToList(std::list< DtCmdLine::Arg * > &argList) const
Pushes this to back of list rather than front.
Definition: replacedCmdUnlabledMultiArg.h:261
ReplacedUnlabeledMultiArg(const std::string &name, const std::string &desc, const std::string &typeDesc, bool ignoreable=false, DtCmdLine::Visitor *v=NULL)
Constructor.
Definition: replacedCmdUnlabledMultiArg.h:173
Just like a MultiArg, except that the DtCmdLine::Arguments are unlabeled.
Definition: replacedCmdUnlabledMultiArg.h:42
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the DtCmdLine::Argument.
Definition: replacedCmdUnlabledMultiArg.h:223
virtual std::string longID(const std::string &val) const
Returns the a long id string.
Definition: replacedCmdUnlabledMultiArg.h:244