GAMSlinks  0.4
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GamsDictionary Class Reference

Class to provide access to a GAMS dictionary. More...

#include <GamsDictionary.hpp>

Collaboration diagram for GamsDictionary:
Collaboration graph
[legend]

Public Member Functions

 GamsDictionary (GamsHandler &gams_)
 Constructor. More...
 
 ~GamsDictionary ()
 Destructor. More...
 
bool readDictionary ()
 Reads the GAMS dictionary. More...
 
bool haveNames ()
 Indicates whether a dictionary has been successfully read. More...
 
char * getColName (int colnr, char *buffer, int bufLen)
 The name of a column. More...
 
char * getRowName (int rownr, char *buffer, int bufLen)
 The name of a row. More...
 
char * getObjName (char *buffer, int bufLen)
 The name of the objective. More...
 
char * getColText (int colnr, char *buffer, int bufLen)
 The descriptive text of a column. More...
 
char * getRowText (int rownr, char *buffer, int bufLen)
 The descriptive text of a row. More...
 
char * getObjText (char *buffer, int bufLen)
 The descriptive text of the objective. More...
 

Private Member Functions

char * constructName (char *buffer, int bufLen, int lSym, int *uelIndices, int nIndices)
 

Private Attributes

GamsHandlergams
 
struct dictRec * dict
 

Friends

class GamsBCH
 
class GamsGDX
 

Detailed Description

Class to provide access to a GAMS dictionary.

Definition at line 23 of file GamsDictionary.hpp.

Constructor & Destructor Documentation

GamsDictionary::GamsDictionary ( GamsHandler gams_)

Constructor.

Parameters
gams_A GamsHandler that gives access to the GAMS dictionary file.
GamsDictionary::~GamsDictionary ( )

Destructor.

Member Function Documentation

char* GamsDictionary::constructName ( char *  buffer,
int  bufLen,
int  lSym,
int *  uelIndices,
int  nIndices 
)
private
bool GamsDictionary::readDictionary ( )

Reads the GAMS dictionary.

Returns
True if successfull, false otherwise.
bool GamsDictionary::haveNames ( )
inline

Indicates whether a dictionary has been successfully read.

Definition at line 50 of file GamsDictionary.hpp.

References dict.

char* GamsDictionary::getColName ( int  colnr,
char *  buffer,
int  bufLen 
)

The name of a column.

  @param colnr column index
            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure
char* GamsDictionary::getRowName ( int  rownr,
char *  buffer,
int  bufLen 
)

The name of a row.

  @param rownr row index
            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure
char* GamsDictionary::getObjName ( char *  buffer,
int  bufLen 
)

The name of the objective.

            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure
char* GamsDictionary::getColText ( int  colnr,
char *  buffer,
int  bufLen 
)

The descriptive text of a column.

  @param colnr col index
            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure
char* GamsDictionary::getRowText ( int  rownr,
char *  buffer,
int  bufLen 
)

The descriptive text of a row.

  @param rownr row index
            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure
char* GamsDictionary::getObjText ( char *  buffer,
int  bufLen 
)

The descriptive text of the objective.

            @param buffer a buffer for writing the name in
            @param bufLen length of the buffer
Returns
buffer on success, NULL on failure

Friends And Related Function Documentation

friend class GamsBCH
friend

Definition at line 24 of file GamsDictionary.hpp.

friend class GamsGDX
friend

Definition at line 25 of file GamsDictionary.hpp.

Member Data Documentation

GamsHandler& GamsDictionary::gams
private

Definition at line 27 of file GamsDictionary.hpp.

struct dictRec* GamsDictionary::dict
private

Definition at line 29 of file GamsDictionary.hpp.

Referenced by haveNames().


The documentation for this class was generated from the following file: