0
2
0
... | ... |
@@ -43,13 +43,13 @@ |
43 | 43 |
.refOption("f", "A switch.", b) |
44 | 44 |
.refOption("nohelp", "", sil) |
45 | 45 |
.refOption("gra","Choice A",g1) |
46 | 46 |
.refOption("grb","Choice B",g2) |
47 | 47 |
.refOption("grc","Choice C",g3) |
48 | 48 |
.optionGroup("gr","gra") |
49 |
.optionGroup("gr"," |
|
49 |
.optionGroup("gr","grb") |
|
50 | 50 |
.optionGroup("gr","grc") |
51 | 51 |
.mandatoryGroup("gr") |
52 | 52 |
.onlyOneGroup("gr") |
53 | 53 |
.other("infile","The input file.") |
54 | 54 |
.other("..."); |
55 | 55 |
|
... | ... |
@@ -191,13 +191,12 @@ |
191 | 191 |
|
192 | 192 |
ArgParser &ArgParser::optionGroup(const std::string &group, |
193 | 193 |
const std::string &opt) |
194 | 194 |
{ |
195 | 195 |
Opts::iterator i = _opts.find(opt); |
196 | 196 |
LEMON_ASSERT(i!=_opts.end(), "Unknown option: '"+opt+"'"); |
197 |
if(i==_opts.end()) std::cout << "JAJJJJJJJJ\n"; |
|
198 | 197 |
LEMON_ASSERT(!(i->second.ingroup), |
199 | 198 |
"Option already in option group: '"+opt+"'"); |
200 | 199 |
GroupData &g=_groups[group]; |
201 | 200 |
g.opts.push_back(opt); |
202 | 201 |
i->second.ingroup=true; |
203 | 202 |
return *this; |
0 comments (0 inline)