24 #ifndef DtCmdLine_SWITCH_ARG_H
25 #define DtCmdLine_SWITCH_ARG_H
36 #ifdef DtUSE_UTILITIES_NAMESPACE
37 namespace DtUSE_UTILITIES_NAMESPACE
78 const std::string& name,
79 const std::string& desc,
98 const std::string& name,
99 const std::string& desc,
113 virtual bool processArg(
int* i, std::vector<std::string>& args);
119 bool combinedSwitchesMatch(std::string& combined);
124 bool getValue()
const;
129 bool getDefault()
const;
140 inline SwitchArg::SwitchArg(
const std::string& flag,
141 const std::string& name,
142 const std::string& desc,
145 :
Arg(flag, name, desc, false, false, v)
147 , myDefault( _default )
151 const std::string& name,
152 const std::string& desc,
156 :
Arg(flag, name, desc, false, false, v)
158 , myDefault( _default )
167 inline SwitchArg::operator
bool() {
return _value; }
182 for (
unsigned int i = 1; i < combinedSwitches.length(); i++ )
183 if ( !
_flag.empty() && combinedSwitches[i] ==
_flag[0] )
236 #ifdef DtUSE_UTILITIES_NAMESPACE