Class to handle the access to a GAMS options file.  
 More...
#include <GamsOptions.hpp>
Class to handle the access to a GAMS options file. 
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. 
- Parameters
 - 
  
    | gams_ | A GAMS handler to get access to the system directory name and other stuff.  | 
    | solvername | The name of your solver.  | 
  
   
 
 
      
        
          | GamsOptions::~GamsOptions  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | bool GamsOptions::readOptionsFile  | 
          ( | 
          const char *  | 
          optfilename | ) | 
           | 
        
      
 
Reads an options file. 
- Parameters
 - 
  
    | optfilename | Giving NULL for optfilename will read nothing and returns true.  | 
  
   
 
 
      
        
          | bool GamsOptions::isKnown  | 
          ( | 
          const char *  | 
          optname | ) | 
           | 
        
      
 
Checks whether an option exists. 
- Returns
 - True, if the option exists, i.e., defined in the options definition file. False otherwise. 
 
 
 
      
        
          | bool GamsOptions::isDefined  | 
          ( | 
          const char *  | 
          optname | ) | 
           | 
        
      
 
Checks whether the user specified some option. 
- Parameters
 - 
  
    | optname | The name of the option.  | 
  
   
- Returns
 - True, if the option had been specified in the option file. 
 
 
 
  
  
      
        
          | bool GamsOptions::getBool  | 
          ( | 
          const char *  | 
          optname | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Gets the value of a boolean option. 
- Parameters
 - 
  
    | 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. 
- Parameters
 - 
  
    | optname | The name of the option.  | 
  
   
Referenced by getBool().
 
 
      
        
          | double GamsOptions::getDouble  | 
          ( | 
          const char *  | 
          optname | ) | 
           | 
        
      
 
Gets the value of a real (double) option. 
- Parameters
 - 
  
    | optname | The name of the option.  | 
  
   
 
 
      
        
          | char* GamsOptions::getString  | 
          ( | 
          const char *  | 
          optname,  | 
        
        
           | 
           | 
          char *  | 
          buffer  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Gets the value of a string option. 
- Parameters
 - 
  
    | 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. 
- Parameters
 - 
  
    | 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. 
- Parameters
 - 
  
    | 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. 
- Parameters
 - 
  
    | 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. 
- Parameters
 - 
  
    | optname | The name of the option.  | 
    | sval | The value to set.  | 
  
   
 
 
  
  
      
        
          | struct optRec* GamsOptions::optionshandle | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: