
Base class for options. More...
#include <driver.hh>
Public Member Functions | |
| BaseOption (const char *o, const char *e) | |
| Initialize for option o and explanation e. | |
| virtual bool | parse (int &argc, char *argv[])=0 |
| Parse option at first position and possibly delete. | |
| virtual void | help (void)=0 |
| Print help text. | |
| virtual | ~BaseOption (void) |
| Destructor. | |
Static Public Member Functions | |
| static char * | strdup (const char *s) |
| Create heap-allocated copy of string s. | |
| static void | strdel (const char *s) |
| Delete heap-allocated copy of string s. | |
Protected Attributes | |
| const char * | opt |
| String for option (including hyphen) | |
| const char * | exp |
| Short explanation. | |
| BaseOption * | next |
| Next option. | |
| Gecode::Driver::BaseOption::BaseOption | ( | const char * | o, |
| const char * | e | ||
| ) |
Initialize for option o and explanation e.
Definition at line 71 of file options.cpp.
| Gecode::Driver::BaseOption::~BaseOption | ( | void | ) | [virtual] |
Destructor.
Definition at line 74 of file options.cpp.
| virtual bool Gecode::Driver::BaseOption::parse | ( | int & | argc, |
| char * | argv[] | ||
| ) | [pure virtual] |
Parse option at first position and possibly delete.
Implemented in Gecode::Driver::BoolOption, Gecode::Driver::DoubleOption, Gecode::Driver::UnsignedIntOption, Gecode::Driver::IntOption, Gecode::Driver::StringOption, and Gecode::Driver::StringValueOption.
| virtual void Gecode::Driver::BaseOption::help | ( | void | ) | [pure virtual] |
Print help text.
Implemented in Gecode::Driver::BoolOption, Gecode::Driver::DoubleOption, Gecode::Driver::UnsignedIntOption, Gecode::Driver::IntOption, Gecode::Driver::StringOption, and Gecode::Driver::StringValueOption.
| char * Gecode::Driver::BaseOption::strdup | ( | const char * | s | ) | [static] |
Create heap-allocated copy of string s.
Definition at line 56 of file options.cpp.
| void Gecode::Driver::BaseOption::strdel | ( | const char * | s | ) | [static] |
Delete heap-allocated copy of string s.
Definition at line 65 of file options.cpp.
const char* Gecode::Driver::BaseOption::opt [protected] |
const char* Gecode::Driver::BaseOption::exp [protected] |
BaseOption* Gecode::Driver::BaseOption::next [protected] |