#include <GamsOptions.hpp>
Collaboration diagram for GamsOptions:

Public Member Functions | |
| GamsOptions (GamsHandler &gams_, const char *solvername) | |
| Constructor for GamsOptions class. | |
| ~GamsOptions () | |
| Destructor. | |
| bool | readOptionsFile (const char *optfilename) |
| Reads an options file. | |
| bool | isKnown (const char *optname) |
| Checks whether an option exists. | |
| bool | isDefined (const char *optname) |
| Checks whether the user specified some option. | |
| bool | getBool (const char *optname) |
| Gets the value of a boolean option. | |
| int | getInteger (const char *optname) |
| Gets the value of an integer option. | |
| double | getDouble (const char *optname) |
| Gets the value of a real (double) option. | |
| char * | getString (const char *optname, char *buffer) |
| Gets the value of a string option. | |
| void | setBool (const char *optname, bool bval) |
| Sets the value of a boolean option. | |
| void | setInteger (const char *optname, int ival) |
| Sets the value of an integer option. | |
| void | setDouble (const char *optname, double dval) |
| Sets the value of a double option. | |
| void | setString (const char *optname, const char *sval) |
| Sets the value of a string option. | |
Private Attributes | |
| GamsHandler & | gams |
| optRec * | optionshandle |
Definition at line 22 of file GamsOptions.hpp.
| GamsOptions::GamsOptions | ( | GamsHandler & | gams_, | |
| const char * | solvername | |||
| ) |
Constructor for GamsOptions class.
Initialization of options handle. Reading of the file "<systemdir>/opt<solvername>.def" to learn which options are supported.
| gams_ | A GAMS handler to get access to the system directory name and other stuff. | |
| solvername | The name of your solver. |
| GamsOptions::~GamsOptions | ( | ) |
Destructor.
| bool GamsOptions::readOptionsFile | ( | const char * | optfilename | ) |
Reads an options file.
| optfilename | Giving NULL for optfilename will read nothing and returns true. |
| bool GamsOptions::isKnown | ( | const char * | optname | ) |
Checks whether an option exists.
| bool GamsOptions::isDefined | ( | const char * | optname | ) |
Checks whether the user specified some option.
| optname | The name of the option. |
| bool GamsOptions::getBool | ( | const char * | optname | ) | [inline] |
Gets the value of a boolean option.
| optname | The name of the option. |
Definition at line 60 of file GamsOptions.hpp.
References getInteger().
| int GamsOptions::getInteger | ( | const char * | optname | ) |
Gets the value of an integer option.
| optname | The name of the option. |
Referenced by getBool().
| double GamsOptions::getDouble | ( | const char * | optname | ) |
Gets the value of a real (double) option.
| optname | The name of the option. |
| char* GamsOptions::getString | ( | const char * | optname, | |
| char * | buffer | |||
| ) |
Gets the value of a string option.
| optname | The name of the option. | |
| buffer | A buffer where the value can be stored (it should be large enough). |
| void GamsOptions::setBool | ( | const char * | optname, | |
| bool | bval | |||
| ) | [inline] |
Sets the value of a boolean option.
| optname | The name of the option. | |
| bval | The value to set. |
Definition at line 79 of file GamsOptions.hpp.
References setInteger().
| void GamsOptions::setInteger | ( | const char * | optname, | |
| int | ival | |||
| ) |
Sets the value of an integer option.
| optname | The name of the option. | |
| ival | The value to set. |
Referenced by setBool().
| void GamsOptions::setDouble | ( | const char * | optname, | |
| double | dval | |||
| ) |
Sets the value of a double option.
| optname | The name of the option. | |
| dval | The value to set. |
| void GamsOptions::setString | ( | const char * | optname, | |
| const char * | sval | |||
| ) |
Sets the value of a string option.
| optname | The name of the option. | |
| sval | The value to set. |
GamsHandler& GamsOptions::gams [private] |
Definition at line 24 of file GamsOptions.hpp.
struct optRec* GamsOptions::optionshandle [private] |
Definition at line 26 of file GamsOptions.hpp.
1.4.7