
Base class for script options. More...
#include <gecode/driver.hh>
Public Member Functions | |
| BaseOptions (const char *s) | |
| Initialize options for script with name s. | |
| virtual void | help (void) |
| Print help text. | |
| void | add (Driver::BaseOption &o) |
| Add new option o. | |
| void | parse (int &argc, char *argv[]) |
| Parse options from arguments argv (number is argc). | |
| const char * | name (void) const |
| Return name of script. | |
| void | name (const char *) |
| Set name of script. | |
| virtual | ~BaseOptions (void) |
| Destructor. | |
Protected Attributes | |
| Driver::BaseOption * | fst |
| First registered option. | |
| Driver::BaseOption * | lst |
| Last registered option. | |
| const char * | _name |
| Script name. | |
| Gecode::BaseOptions::BaseOptions | ( | const char * | s | ) |
Initialize options for script with name s.
Definition at line 524 of file options.cpp.
|
virtual |
Destructor.
Definition at line 612 of file options.cpp.
|
virtual |
Print help text.
Reimplemented in BIBDOptions, Gecode::FlatZinc::FlatZincOptions, Gecode::InstanceOptions, Gecode::SizeOptions, JobShopOptions, LangfordNumberOptions, SatOptions, SchurOptions, and SteelMillOptions.
Definition at line 535 of file options.cpp.
| void Gecode::BaseOptions::add | ( | Driver::BaseOption & | o | ) |
Add new option o.
Definition at line 515 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 589 of file options.cpp.
|
inline |
Return name of script.
Definition at line 195 of file options.hpp.
| void Gecode::BaseOptions::name | ( | const char * | n | ) |
Set name of script.
Definition at line 529 of file options.cpp.
|
protected |
|
protected |
|
protected |