#include <Options.h>
Definition at line 345 of file Options.h.
◆ BoolOption()
Definition at line 350 of file Options.h.
351 :
Option(n, d, c,
"<bool>"), value(v) {}
Option(const char *name_, const char *desc_, const char *cate_, const char *type_)
◆ help()
| virtual void Gluco::BoolOption::help |
( |
bool | verbose = false | ) |
|
|
inlinevirtual |
Implements Gluco::Option.
Definition at line 371 of file Options.h.
371 {
372
373 fprintf(stderr,
" -%s, -no-%s",
name,
name);
374
376 fprintf(stderr, " ");
377
378 fprintf(stderr, " ");
379 fprintf(stderr, "(default: %s)\n", value ? "on" : "off");
380 if (verbose){
382 fprintf(stderr, "\n");
383 }
384 }
◆ operator bool()
| Gluco::BoolOption::operator bool |
( |
void | | ) |
const |
|
inline |
◆ operator bool &()
| Gluco::BoolOption::operator bool & |
( |
void | | ) |
|
|
inline |
◆ operator=()
Definition at line 355 of file Options.h.
355{ value = b; return *this; }
◆ parse()
| virtual bool Gluco::BoolOption::parse |
( |
const char * | str | ) |
|
|
inlinevirtual |
Implements Gluco::Option.
Definition at line 357 of file Options.h.
357 {
358 const char* span = str;
359
360 if (match(span, "-")){
361 bool b = !match(span, "no-");
362
364 value = b;
365 return true; }
366 }
367
368 return false;
369 }
The documentation for this class was generated from the following file: