GAMSlinks  0.4
GamsGDX.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008 GAMS Development and others
2 // All Rights Reserved.
3 // This code is published under the Common Public License.
4 //
5 // $Id: GamsGDX.hpp 510 2008-08-16 19:31:27Z stefan $
6 //
7 // Author: Stefan Vigerske
8 
9 #ifndef GAMSGDX_HPP_
10 #define GAMSGDX_HPP_
11 
12 #include "GAMSlinksConfig.h"
13 
14 #include "GamsHandler.hpp"
15 #include "GamsDictionary.hpp"
16 
17 extern "C" {
18  struct dictRec;
19  struct gdxRec;
20 }
21 
24 class GamsGDX {
25 private:
28 
29  struct gdxRec* gdx;
30 
31  void reportError(int n) const;
32 
33 public:
38  GamsGDX(GamsHandler& gams_, GamsDictionary& dict_);
39 
42  ~GamsGDX();
43 
47  bool init();
48 
56  bool writePoint(const double* x, const double* rc, double objval, const char* filename) const;
57 
58 };
59 
60 
61 #endif /*GAMSGDX_HPP_*/
Writing of GDX (Gams Data Exchange) files.
Definition: GamsGDX.hpp:24
GamsDictionary & dict
Definition: GamsGDX.hpp:27
Class to provide access to a GAMS dictionary.
bool writePoint(const double *x, const double *rc, double objval, const char *filename) const
Writes a given point to a GDX file.
Forwards requests for output, point transformations, dictionary files, and other things to a GAMS I/O...
Definition: GamsHandler.hpp:18
void reportError(int n) const
bool init()
Loads and initializes the GDX dynamic library.
struct gdxRec * gdx
Definition: GamsGDX.hpp:29
GamsGDX(GamsHandler &gams_, GamsDictionary &dict_)
Constructor.
~GamsGDX()
Destructor.
GamsHandler & gams
Definition: GamsGDX.hpp:26