GAMSlinks  0.4
GamsDictionary.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008
2 // All Rights Reserved.
3 // This code is published under the Common Public License.
4 //
5 // $Id: GamsDictionary.hpp 510 2008-08-16 19:31:27Z stefan $
6 //
7 // Author: Stefan Vigerske
8 
9 #ifndef GAMSDICTIONARY_HPP_
10 #define GAMSDICTIONARY_HPP_
11 
12 #include "GAMSlinksConfig.h"
13 
14 #include "GamsHandler.hpp"
15 
16 extern "C" struct dictRec;
17 
18 class GamsBCH;
19 class GamsGDX;
20 
24  friend class GamsBCH;
25  friend class GamsGDX;
26 private:
28 
29  struct dictRec* dict;
30 
31  char* constructName(char* buffer, int bufLen, int lSym, int* uelIndices, int nIndices);
32 
33 public:
38 
42 
46  bool readDictionary();
47 
50  bool haveNames() { return dict; }
51 
58  char* getColName(int colnr, char *buffer, int bufLen);
59 
66  char* getRowName(int rownr, char *buffer, int bufLen);
67 
73  char* getObjName(char* buffer, int bufLen);
74 
81  char* getColText(int colnr, char* buffer, int bufLen);
82 
89  char* getRowText(int rownr, char* buffer, int bufLen);
90 
96  char* getObjText(char* buffer, int bufLen);
97 
98 }; // class GamsDictionary
99 
100 #endif /*GAMSDICTIONARY_HPP_*/
Writing of GDX (Gams Data Exchange) files.
Definition: GamsGDX.hpp:24
char * getColText(int colnr, char *buffer, int bufLen)
The descriptive text of a column.
char * constructName(char *buffer, int bufLen, int lSym, int *uelIndices, int nIndices)
char * getRowName(int rownr, char *buffer, int bufLen)
The name of a row.
GamsHandler & gams
char * getRowText(int rownr, char *buffer, int bufLen)
The descriptive text of a row.
char * getColName(int colnr, char *buffer, int bufLen)
The name of a column.
~GamsDictionary()
Destructor.
struct dictRec * dict
Class to provide access to a GAMS dictionary.
Forwards requests for output, point transformations, dictionary files, and other things to a GAMS I/O...
Definition: GamsHandler.hpp:18
char * getObjName(char *buffer, int bufLen)
The name of the objective.
bool haveNames()
Indicates whether a dictionary has been successfully read.
GamsDictionary(GamsHandler &gams_)
Constructor.
char * getObjText(char *buffer, int bufLen)
The descriptive text of the objective.
bool readDictionary()
Reads the GAMS dictionary.
Interface to GAMS BCH facility.
Definition: GamsBCH.hpp:24