GamsOptions.hpp

Go to the documentation of this file.
00001 // Copyright (C) GAMS Development 2008
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: GamsOptions.hpp 510 2008-08-16 19:31:27Z stefan $
00006 //
00007 // Author:  Stefan Vigerske
00008 
00009 #ifndef GAMSOPTIONS_HPP_
00010 #define GAMSOPTIONS_HPP_
00011 
00012 #include "GAMSlinksConfig.h"
00013 // from CoinUtils
00014 #include "CoinPragma.hpp"
00015 
00016 #include "GamsHandler.hpp"
00017 
00018 extern "C" struct optRec; 
00019 
00022 class GamsOptions {
00023 private:
00024         GamsHandler& gams;
00025 
00026         struct optRec* optionshandle; // handle for options
00027 
00028 public:
00035         GamsOptions(GamsHandler& gams_, const char* solvername);
00036         
00039         ~GamsOptions();
00040         
00044         bool readOptionsFile(const char* optfilename); 
00045 
00049         bool isKnown(const char* optname);
00054         bool isDefined(const char *optname);
00055 //      bool optDefinedRecent(const char *optname);
00056         
00060         inline bool getBool(const char* optname) { return getInteger(optname); }
00064         int getInteger(const char *optname);
00068         double getDouble(const char *optname);
00073         char* getString(const char *optname, char *buffer);
00074         
00079         inline void setBool(const char *optname, bool bval) { setInteger(optname, bval ? 1 : 0); }
00084         void setInteger(const char *optname, int ival);
00089         void setDouble(const char *optname, double dval);
00094         void setString(const char *optname, const char *sval);
00095 };
00096 
00097 #endif /*GAMSOPTIONS_HPP_*/

Generated on Tue Dec 30 03:01:24 2008 for GAMSlinks by  doxygen 1.4.7