Base class for script options. More...
#include <driver.hh>
Public Member Functions | |
BaseOptions (const char *s) | |
Initialize options for script with name s. More... | |
virtual void | help (void) |
Print help text. More... | |
void | add (Driver::BaseOption &o) |
Add new option o. More... | |
void | parse (int &argc, char *argv[]) |
Parse options from arguments argv (number is argc) More... | |
const char * | name (void) const |
Return name of script. More... | |
void | name (const char *) |
Set name of script. More... | |
virtual | ~BaseOptions (void) |
Destructor. More... | |
Protected Attributes | |
Driver::BaseOption * | fst |
First registered option. More... | |
Driver::BaseOption * | lst |
Last registered option. More... | |
const char * | _name |
Script name. More... | |
Gecode::BaseOptions::BaseOptions | ( | const char * | s | ) |
Initialize options for script with name s.
Definition at line 475 of file options.cpp.
|
virtual |
Destructor.
Definition at line 563 of file options.cpp.
|
virtual |
Print help text.
Reimplemented in Gecode::InstanceOptions, Gecode::SizeOptions, Gecode::FlatZinc::FlatZincOptions, SteelMillOptions, BIBDOptions, SatOptions, LangfordNumberOptions, and SchurOptions.
Definition at line 486 of file options.cpp.
void Gecode::BaseOptions::add | ( | Driver::BaseOption & | o | ) |
Add new option o.
Definition at line 466 of file options.cpp.
void Gecode::BaseOptions::parse | ( | int & | argc, |
char * | argv[] | ||
) |
Parse options from arguments argv (number is argc)
The options are parsed from position one onwards until no more options are detected. After parsing, the parsed arguments have been removed.
Definition at line 540 of file options.cpp.
|
inline |
Return name of script.
Definition at line 166 of file options.hpp.
void Gecode::BaseOptions::name | ( | const char * | n | ) |
Set name of script.
Definition at line 480 of file options.cpp.
|
protected |
|
protected |
|
protected |