Loading...
Searching...
No Matches
gamsvariable.h
1
26#ifndef GAMSVARIABLE_H
27#define GAMSVARIABLE_H
28
29#include "gamssymbol.h"
30#include "gamsvariablerecord.h"
31
32namespace gams {
33
36class LIBSPEC GAMSVariable : public GAMSSymbol
37{
38public:
40
43
46 GAMSVariable(const GAMSSymbol& other);
47
50
54
58
63
67 GAMSVariableRecord firstRecord(const std::vector<std::string>& slice);
68
72
76 GAMSVariableRecord firstRecord(const std::string& key1);
77
82 GAMSVariableRecord firstRecord(const std::string& key1, const std::string& key2);
83
89 GAMSVariableRecord firstRecord(const std::string& key1, const std::string& key2, const std::string& key3);
90
94 GAMSVariableRecord lastRecord(const std::vector<std::string>& slice);
95
99
103 GAMSVariableRecord lastRecord(const std::string& key1);
104
109 GAMSVariableRecord lastRecord(const std::string& key1, const std::string& key2);
110
116 GAMSVariableRecord lastRecord(const std::string& key1, const std::string& key2, const std::string& key3);
117
121 GAMSVariableRecord findRecord(const std::vector<std::string>& keys);
122
126
130 GAMSVariableRecord findRecord(const std::string& key1);
131
136 GAMSVariableRecord findRecord(const std::string& key1, const std::string& key2);
137
143 GAMSVariableRecord findRecord(const std::string& key1, const std::string& key2, const std::string& key3);
144
148 GAMSVariableRecord mergeRecord(const std::vector<std::string>& keys);
149
153
157 GAMSVariableRecord mergeRecord(const std::string& key1);
158
163 GAMSVariableRecord mergeRecord(const std::string& key1, const std::string& key2);
164
170 GAMSVariableRecord mergeRecord(const std::string& key1, const std::string& key2, const std::string& key3);
171
175 GAMSVariableRecord addRecord(const std::vector<std::string>& keys);
176
180
184 GAMSVariableRecord addRecord(const std::string& key1);
185
190 GAMSVariableRecord addRecord(const std::string& key1, const std::string& key2);
191
197 GAMSVariableRecord addRecord(const std::string& key1, const std::string& key2, const std::string& key3);
198
201
202private:
203 friend class GAMSDatabaseImpl;
204 friend class GAMSSymbolIter<GAMSVariable>;
205 GAMSVariable(GAMSDatabase& database, void* symPtr, int dim, std::string name, std::string text, GAMSEnum::VarType varType);
206 GAMSVariable(GAMSDatabase& database, const std::string& name, const int dim, const std::string& text, GAMSEnum::VarType varType);
207 GAMSVariable(GAMSDatabase& database, const std::string& name, const std::string& text, const std::vector<GAMSDomain>& domains, GAMSEnum::VarType varType);
208};
209
210} // namespace gams
211
212#endif // GAMSVARIABLE_H
VarType
Variable subtype.
Definition: gamsenum.h:83
This is the representation of a single record of a GAMSVariable.
GAMSVariableRecord lastRecord(const std::string &key1, const std::string &key2, const std::string &key3)
GAMSVariableRecord firstRecord(const std::string &key1, const std::string &key2)
GAMSVariableRecord firstRecord()
GAMSVariableRecord lastRecord()
GAMSVariableRecord mergeRecord(const std::string &key1, const std::string &key2)
GAMSVariableRecord addRecord(const std::string &key1, const std::string &key2)
GAMSVariableRecord findRecord()
GAMSVariableRecord findRecord(const std::vector< std::string > &keys)
~GAMSVariable()
Destructor.
GAMSVariableRecord addRecord(const std::vector< std::string > &keys)
GAMSVariableRecord addRecord()
GAMSVariableRecord lastRecord(const std::string &key1)
GAMSVariableRecord findRecord(const std::string &key1, const std::string &key2, const std::string &key3)
GAMSVariableRecord addRecord(const std::string &key1, const std::string &key2, const std::string &key3)
GAMSVariableRecord mergeRecord(const std::string &key1)
GAMSVariableRecord mergeRecord(const std::vector< std::string > &keys)
GAMSVariable & operator=(const GAMSVariable &other)
GAMSVariableRecord firstRecord(const std::vector< std::string > &slice)
GAMSVariableRecord firstRecord(const std::string &key1)
GAMSSymbolIter< GAMSVariable > end()
GAMSVariableRecord lastRecord(const std::vector< std::string > &slice)
GAMSVariable(const GAMSSymbol &other)
GAMSEnum::VarType varType()
Retrieve subtype of variable (Binary, Integer, Positive, Negative, Free, SOS1, SOS2,...
GAMSSymbolIter< GAMSVariable > begin()
GAMSVariableRecord addRecord(const std::string &key1)
GAMSVariableRecord findRecord(const std::string &key1, const std::string &key2)
GAMSVariableRecord mergeRecord()
GAMSVariableRecord findRecord(const std::string &key1)
GAMSVariableRecord lastRecord(const std::string &key1, const std::string &key2)
GAMSVariableRecord mergeRecord(const std::string &key1, const std::string &key2, const std::string &key3)
GAMSVariable()
Standard constructor.
GAMSVariableRecord firstRecord(const std::string &key1, const std::string &key2, const std::string &key3)
Definition: gams.h:91