if(ErrCode) {
[ ... ]
}
-int gdxOpenWriteEx(const char *FileName, const char *Producer, int Compr, int &ErrNr)
Create a GDX file for writing with explicitly given compression flag. Non-zero if the file can be ope...
Definition: gxfile.cpp:396
+int gdxOpenWriteEx(const char *FileName, const char *Producer, int Compr, int &ErrNr)
Create a GDX file for writing with explicitly given compression flag. Non-zero if the file can be ope...
Definition: gxfile.cpp:397
- See also
- gdxOpenRead, gdxOpenWrite, gdxAutoConvert
diff --git a/classgdx_1_1TUELTable-members.html b/classgdx_1_1TUELTable-members.html
index 20cf75c9..cf52ab49 100644
--- a/classgdx_1_1TUELTable-members.html
+++ b/classgdx_1_1TUELTable-members.html
@@ -106,13 +106,13 @@
GetMaxUELLength() const (defined in gdx::TUELTable) | gdx::TUELTable | |
GetUserMap(int i) (defined in gdx::TUELTable) | gdx::TUELTable | |
IndexOf(const char *s) (defined in gdx::TUELTable) | gdx::TUELTable | |
- LoadFromStream(gdlib::gmsstrm::TXStreamDelphi &S) (defined in gdx::TUELTable) | gdx::TUELTable | |
+ LoadFromStream(gdlib::gmsstrm::TXStream &S) (defined in gdx::TUELTable) | gdx::TUELTable | |
MemoryUsed() const (defined in gdx::TUELTable) | gdx::TUELTable | |
NewUsrUel(int EN) (defined in gdx::TUELTable) | gdx::TUELTable | |
operator[](int index) const (defined in gdx::TUELTable) | gdx::TUELTable | |
RenameEntry(int N, const char *s) (defined in gdx::TUELTable) | gdx::TUELTable | |
ResetMapToUserStatus() (defined in gdx::TUELTable) | gdx::TUELTable | |
- SaveToStream(gdlib::gmsstrm::TXStreamDelphi &S) (defined in gdx::TUELTable) | gdx::TUELTable | |
+ SaveToStream(gdlib::gmsstrm::TXStream &S) (defined in gdx::TUELTable) | gdx::TUELTable | |
SetUserMap(int EN, int N) (defined in gdx::TUELTable) | gdx::TUELTable | |
size() const (defined in gdx::TUELTable) | gdx::TUELTable | |
StoreObject(const char *id, size_t idlen, int mapping) (defined in gdx::TUELTable) | gdx::TUELTable | |
diff --git a/classgdx_1_1TUELTable.html b/classgdx_1_1TUELTable.html
index 2ccc4911..0bd42bda 100644
--- a/classgdx_1_1TUELTable.html
+++ b/classgdx_1_1TUELTable.html
@@ -150,12 +150,12 @@
int | MemoryUsed () const |
|
-
-void | SaveToStream (gdlib::gmsstrm::TXStreamDelphi &S) |
- |
-
-void | LoadFromStream (gdlib::gmsstrm::TXStreamDelphi &S) |
- |
+
+void | SaveToStream (gdlib::gmsstrm::TXStream &S) |
+ |
+
+void | LoadFromStream (gdlib::gmsstrm::TXStream &S) |
+ |
TUELUserMapStatus | GetMapToUserStatus () |
|
diff --git a/gdx_8h_source.html b/gdx_8h_source.html
index 2e3e5774..11cc4e14 100644
--- a/gdx_8h_source.html
+++ b/gdx_8h_source.html
@@ -136,7 +136,7 @@
- 53 enum class TraceLevels
+ 53 enum class TraceLevels : uint8_t
@@ -386,9 +386,9 @@
- 1748std::unique_ptr<gdlib::gmsstrm::TMiBufferedStreamDelphi> FFile;
+ 1748std::unique_ptr<gdlib::gmsstrm::TMiBufferedStream> FFile;
1749TgxFileMode fmode { f_not_open }, fmode_AftReg { f_not_open };
-
+
@@ -496,107 +496,107 @@
-int gdxDataReadRawFastFilt(int SyNr, const char **UelFilterStr, TDataStoreFiltProc_t DP)
Read a symbol in Raw mode while applying a filter using a callback procedure. Returns zero if the ope...
Definition: gxfile.cpp:3600
-static int gdxErrorStr(int ErrNr, char *ErrMsg)
Returns the text for a given error number. Always non-zero.
Definition: gxfile.cpp:1713
-int gdxSymbolAddComment(int SyNr, const char *Txt)
Add a line of comment text for a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3515
-int gdxAcronymGetInfo(int N, char *AName, char *Txt, int &AIndx) const
Retrieve acronym information from the acronym table. Non-zero if the index into the acronym table is ...
Definition: gxfile.cpp:2958
-int gdxDataWriteRaw(const int *KeyInt, const double *Values)
Write a data element in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2199
-int gdxOpenReadEx(const char *FileName, int ReadMode, int &ErrNr)
Open a GDX file for reading allowing for skipping sections. Non-zero if the file can be opened,...
Definition: gxfile.cpp:2687
-int gdxDataReadFilteredStart(int SyNr, const int *FilterAction, int &NrRecs)
Initialize the reading of a symbol in filtered mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3087
-int gdxSymbolGetComment(int SyNr, int N, char *Txt)
Retrieve a line of comment text for a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3534
-int gdxSetTraceLevel(int N, const char *s)
Set the amount of trace (debug) information generated. Always non-zero.
Definition: gxfile.cpp:3180
-int gdxAddSetText(const char *Txt, int &TxtNr)
Register a string in the string table Register a string in the string table and return the integer nu...
Definition: gxfile.cpp:2119
-int gdxUELRegisterStrStart()
Start registering unique elements in string mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2620
-int gdxDataWriteStr(const char **KeyStr, const double *Values)
Write a data element in string mode. Each element string must follow the GAMS rules for unique elemen...
Definition: gxfile.cpp:471
-int gdxUMUelInfo(int &UelCnt, int &HighMap) const
Return information about the unique elements (UELs). Always non-zero.
Definition: gxfile.cpp:2645
-int gdxMapAcronymsToNaN() const
Flag to map all acronym values to the GAMS "Not a Number" special value. Disabled by default.
Definition: gxfile.cpp:3590
-int gdxFilterRegisterStart(int FilterNr)
Define a unique element filter. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3035
-int gdxUELRegisterMapStart()
Start registering unique elements in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2747
-static int gdxGetDLLVersion(char *V)
Returns a version descriptor of the library. Always non-zero.
Definition: gxfile.cpp:3258
-int64_t gdxGetMemoryUsed()
Return the number of bytes used by the data objects.
Definition: gxfile.cpp:3391
-int gdxSymbolGetDomainX(int SyNr, char **DomainIDs)
Retrieve the domain of a symbol (using relaxed or domain information). Returns zero if the operation ...
Definition: gxfile.cpp:2364
-int gdxSetTextNodeNr(int TxtNr, int Node)
Set the Node number for an entry in the string table. After registering a string with AddSetText,...
Definition: gxfile.cpp:3093
-double gdxAcronymValue(int AIndx) const
Create an acronym value based on the index (AIndx should be greater than 0). Returns the calculated a...
Definition: gxfile.cpp:3246
-int gdxDataReadRawFast(int SyNr, TDataStoreProc_t DP, int &NrRecs)
Read a symbol in Raw mode using a callback procedure. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3653
-int gdxGetLastError()
Returns the last error number or zero if there was no error. Calling this function will clear the las...
Definition: gxfile.cpp:2260
-int gdxDataWriteRawStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2207
-int gdxRenameUEL(const char *OldName, const char *NewName)
Rename unique element OldName to NewName.
Definition: gxfile.cpp:2665
-int gdxDataErrorRecord(int RecNr, int *KeyInt, double *Values)
Retrieve an error record. Non-zero if the record number is valid.
Definition: gxfile.cpp:2138
-int gdxSymbolSetDomain(const char **DomainIDs)
Define the domain of a symbol for which a write data operation just started using DataWriteRawStart,...
Definition: gxfile.cpp:2442
-int gdxSymbolSetDomainX(int SyNr, const char **DomainIDs)
Define the domain of a symbol (relaxed version). Returns zero if the operation is not possible.
Definition: gxfile.cpp:2533
-int gdxOpenWriteEx(const char *FileName, const char *Producer, int Compr, int &ErrNr)
Create a GDX file for writing with explicitly given compression flag. Non-zero if the file can be ope...
Definition: gxfile.cpp:396
-int gdxUELRegisterRaw(const char *Uel)
Register unique element in raw mode. This can only be used while writing to a GDX file....
Definition: gxfile.cpp:2584
-int gdxMapValue(double D, int &sv)
Classify a value as a potential special value. Non-zero if D is a special value, zero otherwise.
Definition: gxfile.cpp:3404
-int gdxGetDomainElements(int SyNr, int DimPos, int FilterNr, TDomainIndexProc_t DP, int &NrElem, void *Uptr)
Get the unique elements for a given dimension of a given symbol.
Definition: gxfile.cpp:3105
-int gdxOpenRead(const char *FileName, int &ErrNr)
Open a GDX file for reading. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:1720
-int gdxStoreDomainSets() const
Get flag to store one dimensional sets as potential domains, false (0) saves lots of space for large ...
Definition: gxfile.cpp:3570
-int gdxOpenAppend(const char *FileName, const char *Producer, int &ErrNr)
Open an existing GDX file for output. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:3424
-void gdxStoreDomainSetsSet(int flag)
Set flag to store one dimensional sets as potential domains, false (0) saves lots of space for large ...
Definition: gxfile.cpp:3575
-int gdxUELRegisterStr(const char *Uel, int &UelNr)
Register a unique element in string mode. A unique element must follow the GAMS rules when it contain...
Definition: gxfile.cpp:2608
-int gdxDataWriteStrStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in string mode. Returns zero if the operation is not possible or failed.
Definition: gxfile.cpp:461
-int gdxUELMaxLength() const
Returns the length of the longest unique element (UEL) name.
Definition: gxfile.cpp:3549
-int gdxResetSpecialValues()
Reset the internal values for special values. Always non-zero.
Definition: gxfile.cpp:690
-int gdxDataErrorRecordX(int RecNr, int *KeyInt, double *Values)
Retrieve an error record. Non-zero if the record number is valid.
Definition: gxfile.cpp:2151
-int gdxAcronymName(double V, char *AName)
Find the name of an acronym value. Non-zero if a name for the acronym is defined. An unnamed acronym ...
Definition: gxfile.cpp:3232
-int gdxSymbolDim(int SyNr)
Returns dimensionality of a symbol.
Definition: gxfile.cpp:2411
-int gdxDataWriteMapStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2706
-int gdxFileVersion(char *FileStr, char *ProduceStr) const
Return strings for file version and file producer. Always non-zero.
Definition: gxfile.cpp:1725
-int gdxDataReadSliceStart(int SyNr, int *ElemCounts)
Prepare for the reading of a slice of data from a data set. The actual read of the data is done by ca...
Definition: gxfile.cpp:3283
-int gdxAcronymNextNr(int NV)
Returns the value of the NextAutoAcronym variable and sets the variable to nv.
Definition: gxfile.cpp:3010
-int gdxDataReadStr(char **KeyStr, double *Values, int &DimFrst)
Read the next record using strings for the unique elements. The reading should be initialized by call...
Definition: gxfile.cpp:1747
-int gdxDataWriteDone()
Finish a write operation. Returns zero if the operation is not possible.
Definition: gxfile.cpp:507
-int gdxDataReadRaw(int *KeyInt, double *Values, int &DimFrst)
Read the next record in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2171
-int gdxDataReadMapStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2772
-int gdxDataSliceUELS(const int *SliceKeyInt, char **KeyStr)
Map a slice index in to the corresponding unique elements. After calling DataReadSliceStart,...
Definition: gxfile.cpp:3368
-int gdxClose()
Close a GDX file that was previously opened for reading or writing. Before the file is closed,...
Definition: gxfile.cpp:532
-int gdxDataReadRawStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2192
-int gdxDataWriteRawStartKeyBounds(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo, const int *MinUELIndices, const int *MaxUELIndices)
Start writing a new symbol in raw mode with bounds for UEL key indices being known in advance....
Definition: gxfile.cpp:2219
-int gdxUMUelGet(int UelNr, char *Uel, int &UelMap)
Get a unique element using an unmapped index. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2629
-int gdxAllowBogusDomains() const
Get flag to ignore using 1-dim sets as domain when their elements are not tracked (see gdxStoreDomain...
Definition: gxfile.cpp:3580
-int gdxSymbolInfo(int SyNr, char *SyId, int &Dimen, int &Typ)
Returns information (name, dimension count, type) about a symbol from the symbol table....
Definition: gxfile.cpp:1814
-int gdxUELRegisterMap(int UMap, const char *Uel)
Register unique element in mapped mode. A unique element must follow the GAMS rules when it contains ...
Definition: gxfile.cpp:2756
-int gdxDataWriteMap(const int *KeyInt, const double *Values)
Write a data element in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2714
-int gdxSystemInfo(int &SyCnt, int &UelCnt) const
Returns the number of symbols and unique elements. Always non-zero.
Definition: gxfile.cpp:2569
-int gdxDataReadDone()
Finish reading of a symbol in any mode (raw, mapped, string). . Returns zero if the operation is not ...
Definition: gxfile.cpp:1776
-int gdxFilterRegister(int UelMap)
Add a unique element to the current filter definition, zero if the index number is out of range or wa...
Definition: gxfile.cpp:3045
-int gdxAcronymIndex(double V) const
Get index value of an acronym. Returns zero if V does not represent an acronym.
Definition: gxfile.cpp:3227
-int gdxAcronymAdd(const char *AName, const char *Txt, int AIndx)
Add a new acronym entry. This can be used to add entries before data is written. Returns negative val...
Definition: gxfile.cpp:3208
-int gdxDataReadSlice(const char **UelFilterStr, int &Dimen, TDataStoreProc_t DP)
Read a slice of data from a data set, by fixing zero or more index positions in the data....
Definition: gxfile.cpp:3324
-int gdxSetSpecialValues(const double *AVals)
Set the internal values for special values. Before calling this function, initialize the array of spe...
Definition: gxfile.cpp:2301
-int gdxDataErrorCount() const
Query the number of error records.
Definition: gxfile.cpp:2133
-int gdxSymbMaxLength() const
Returns the length of the longest symbol name in the GDX file.
Definition: gxfile.cpp:3507
-int gdxDataReadMap(int RecNr, int *KeyInt, double *Values, int &DimFrst)
Read the next record in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2779
-int gdxFilterRegisterDone()
Finish registration of unique elements for a filter. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3062
-int gdxUMFindUEL(const char *Uel, int &UelNr, int &UelMap)
Search for unique element by its string. Non-zero if the element was found, zero otherwise.
Definition: gxfile.cpp:3554
-int gdxFilterExists(int FilterNr)
Check if there is a filter defined based on its number as used in gdxFilterRegisterStart....
Definition: gxfile.cpp:3029
-int gdxDataReadRawFastEx(int SyNr, TDataStoreExProc_t DP, int &NrRecs, void *Uptr)
Read a symbol in Raw mode using a callback procedure. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3665
-int gdxFindSymbol(const char *SyId, int &SyNr)
Search for a symbol by name in the symbol table; the search is not case-sensitive.
Definition: gxfile.cpp:1732
-int gdxSetReadSpecialValues(const double *AVals)
Set the internal values for special values when reading a GDX file. Before calling this function,...
Definition: gxfile.cpp:3448
-int gdxAddAlias(const char *Id1, const char *Id2)
Add an alias for a set to the symbol table. One of the two identifiers has to be a known set,...
Definition: gxfile.cpp:2079
-int gdxGetSpecialValues(double *AVals)
Retrieve the internal values for special values. Always non-zero.
Definition: gxfile.cpp:2280
-void gdxAllowBogusDomainsSet(int flag)
Set flag to ignore using 1-dim sets as domain when their elements are not tracked (see gdxStoreDomain...
Definition: gxfile.cpp:3585
-~TGXFileObj()
Dispose GDX file object.
Definition: gxfile.cpp:681
-int gdxGetUEL(int UelNr, char *Uel) const
Get the string for a unique element using a mapped index. Returns zero if the operation is not possib...
Definition: gxfile.cpp:2692
-int gdxSymbolGetDomain(int SyNr, int *DomainSyNrs)
Retrieve the domain of a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2355
-int gdxAcronymCount() const
Number of entries in the acronym table.
Definition: gxfile.cpp:2953
-int gdxGetElemText(int TxtNr, char *Txt, int &Node)
Retrieve the string and node number for an entry in the string table. Returns zero if the operation i...
Definition: gxfile.cpp:2236
-int gdxAcronymGetMapping(int N, int &orgIndx, int &newIndx, int &autoIndex)
Get information how acronym values are remapped. When reading GDX data, we need to map indices for ac...
Definition: gxfile.cpp:3017
-int gdxCurrentDim() const
Returns the dimension of the currently active symbol When reading or writing data,...
Definition: gxfile.cpp:2660
-int gdxSymbolInfoX(int SyNr, int &RecCnt, int &UserInfo, char *ExplTxt)
Returns additional information about a symbol. Returns zero if the symbol number is out of range,...
Definition: gxfile.cpp:2417
-int gdxAutoConvert(int NV)
Returns the value of the AutoConvert variable and sets the variable to nv. When we close a new GDX fi...
Definition: gxfile.cpp:3251
-int gdxSetHasText(int SyNr)
Test if any of the elements of the set has an associated text. Non-zero if the Set contains at least ...
Definition: gxfile.cpp:3443
-int gdxErrorCount() const
Returns the number of errors.
Definition: gxfile.cpp:2231
-int gdxOpenWrite(const char *FileName, const char *Producer, int &ErrNr)
Open a new GDX file for output. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:391
-int gdxUELRegisterDone()
Finish registration of unique elements. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2576
-int gdxFileInfo(int &FileVer, int &ComprLev) const
Returns file format number and compression level used. Always non-zero.
Definition: gxfile.cpp:3264
-int gdxDataReadStrStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in string mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:1840
-void gdxMapAcronymsToNaNSet(int flag)
Flag to map all acronym values to the GAMS "Not a Number" special value. Disabled by default.
Definition: gxfile.cpp:3595
-int gdxUELRegisterRawStart()
Start registering unique elements in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2600
-int gdxSymbIndxMaxLength(int SyNr, int *LengthInfo)
Returns the length of the longest UEL used for every index position for a given symbol.
Definition: gxfile.cpp:3472
-int gdxAcronymSetInfo(int N, const char *AName, const char *Txt, int AIndx)
Modify acronym information in the acronym table.
Definition: gxfile.cpp:2973
-
-
-
+int gdxDataReadRawFastFilt(int SyNr, const char **UelFilterStr, TDataStoreFiltProc_t DP)
Read a symbol in Raw mode while applying a filter using a callback procedure. Returns zero if the ope...
Definition: gxfile.cpp:3601
+static int gdxErrorStr(int ErrNr, char *ErrMsg)
Returns the text for a given error number. Always non-zero.
Definition: gxfile.cpp:1714
+int gdxSymbolAddComment(int SyNr, const char *Txt)
Add a line of comment text for a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3516
+int gdxAcronymGetInfo(int N, char *AName, char *Txt, int &AIndx) const
Retrieve acronym information from the acronym table. Non-zero if the index into the acronym table is ...
Definition: gxfile.cpp:2959
+int gdxDataWriteRaw(const int *KeyInt, const double *Values)
Write a data element in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2200
+int gdxOpenReadEx(const char *FileName, int ReadMode, int &ErrNr)
Open a GDX file for reading allowing for skipping sections. Non-zero if the file can be opened,...
Definition: gxfile.cpp:2688
+int gdxDataReadFilteredStart(int SyNr, const int *FilterAction, int &NrRecs)
Initialize the reading of a symbol in filtered mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3088
+int gdxSymbolGetComment(int SyNr, int N, char *Txt)
Retrieve a line of comment text for a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3535
+int gdxSetTraceLevel(int N, const char *s)
Set the amount of trace (debug) information generated. Always non-zero.
Definition: gxfile.cpp:3181
+int gdxAddSetText(const char *Txt, int &TxtNr)
Register a string in the string table Register a string in the string table and return the integer nu...
Definition: gxfile.cpp:2120
+int gdxUELRegisterStrStart()
Start registering unique elements in string mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2621
+int gdxDataWriteStr(const char **KeyStr, const double *Values)
Write a data element in string mode. Each element string must follow the GAMS rules for unique elemen...
Definition: gxfile.cpp:472
+int gdxUMUelInfo(int &UelCnt, int &HighMap) const
Return information about the unique elements (UELs). Always non-zero.
Definition: gxfile.cpp:2646
+int gdxMapAcronymsToNaN() const
Flag to map all acronym values to the GAMS "Not a Number" special value. Disabled by default.
Definition: gxfile.cpp:3591
+int gdxFilterRegisterStart(int FilterNr)
Define a unique element filter. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3036
+int gdxUELRegisterMapStart()
Start registering unique elements in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2748
+static int gdxGetDLLVersion(char *V)
Returns a version descriptor of the library. Always non-zero.
Definition: gxfile.cpp:3259
+int64_t gdxGetMemoryUsed()
Return the number of bytes used by the data objects.
Definition: gxfile.cpp:3392
+int gdxSymbolGetDomainX(int SyNr, char **DomainIDs)
Retrieve the domain of a symbol (using relaxed or domain information). Returns zero if the operation ...
Definition: gxfile.cpp:2365
+int gdxSetTextNodeNr(int TxtNr, int Node)
Set the Node number for an entry in the string table. After registering a string with AddSetText,...
Definition: gxfile.cpp:3094
+double gdxAcronymValue(int AIndx) const
Create an acronym value based on the index (AIndx should be greater than 0). Returns the calculated a...
Definition: gxfile.cpp:3247
+int gdxDataReadRawFast(int SyNr, TDataStoreProc_t DP, int &NrRecs)
Read a symbol in Raw mode using a callback procedure. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3654
+int gdxGetLastError()
Returns the last error number or zero if there was no error. Calling this function will clear the las...
Definition: gxfile.cpp:2261
+int gdxDataWriteRawStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2208
+int gdxRenameUEL(const char *OldName, const char *NewName)
Rename unique element OldName to NewName.
Definition: gxfile.cpp:2666
+int gdxDataErrorRecord(int RecNr, int *KeyInt, double *Values)
Retrieve an error record. Non-zero if the record number is valid.
Definition: gxfile.cpp:2139
+int gdxSymbolSetDomain(const char **DomainIDs)
Define the domain of a symbol for which a write data operation just started using DataWriteRawStart,...
Definition: gxfile.cpp:2443
+int gdxSymbolSetDomainX(int SyNr, const char **DomainIDs)
Define the domain of a symbol (relaxed version). Returns zero if the operation is not possible.
Definition: gxfile.cpp:2534
+int gdxOpenWriteEx(const char *FileName, const char *Producer, int Compr, int &ErrNr)
Create a GDX file for writing with explicitly given compression flag. Non-zero if the file can be ope...
Definition: gxfile.cpp:397
+int gdxUELRegisterRaw(const char *Uel)
Register unique element in raw mode. This can only be used while writing to a GDX file....
Definition: gxfile.cpp:2585
+int gdxMapValue(double D, int &sv)
Classify a value as a potential special value. Non-zero if D is a special value, zero otherwise.
Definition: gxfile.cpp:3405
+int gdxGetDomainElements(int SyNr, int DimPos, int FilterNr, TDomainIndexProc_t DP, int &NrElem, void *Uptr)
Get the unique elements for a given dimension of a given symbol.
Definition: gxfile.cpp:3106
+int gdxOpenRead(const char *FileName, int &ErrNr)
Open a GDX file for reading. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:1721
+int gdxStoreDomainSets() const
Get flag to store one dimensional sets as potential domains, false (0) saves lots of space for large ...
Definition: gxfile.cpp:3571
+int gdxOpenAppend(const char *FileName, const char *Producer, int &ErrNr)
Open an existing GDX file for output. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:3425
+void gdxStoreDomainSetsSet(int flag)
Set flag to store one dimensional sets as potential domains, false (0) saves lots of space for large ...
Definition: gxfile.cpp:3576
+int gdxUELRegisterStr(const char *Uel, int &UelNr)
Register a unique element in string mode. A unique element must follow the GAMS rules when it contain...
Definition: gxfile.cpp:2609
+int gdxDataWriteStrStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in string mode. Returns zero if the operation is not possible or failed.
Definition: gxfile.cpp:462
+int gdxUELMaxLength() const
Returns the length of the longest unique element (UEL) name.
Definition: gxfile.cpp:3550
+int gdxResetSpecialValues()
Reset the internal values for special values. Always non-zero.
Definition: gxfile.cpp:691
+int gdxDataErrorRecordX(int RecNr, int *KeyInt, double *Values)
Retrieve an error record. Non-zero if the record number is valid.
Definition: gxfile.cpp:2152
+int gdxAcronymName(double V, char *AName)
Find the name of an acronym value. Non-zero if a name for the acronym is defined. An unnamed acronym ...
Definition: gxfile.cpp:3233
+int gdxSymbolDim(int SyNr)
Returns dimensionality of a symbol.
Definition: gxfile.cpp:2412
+int gdxDataWriteMapStart(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo)
Start writing a new symbol in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2707
+int gdxFileVersion(char *FileStr, char *ProduceStr) const
Return strings for file version and file producer. Always non-zero.
Definition: gxfile.cpp:1726
+int gdxDataReadSliceStart(int SyNr, int *ElemCounts)
Prepare for the reading of a slice of data from a data set. The actual read of the data is done by ca...
Definition: gxfile.cpp:3284
+int gdxAcronymNextNr(int NV)
Returns the value of the NextAutoAcronym variable and sets the variable to nv.
Definition: gxfile.cpp:3011
+int gdxDataReadStr(char **KeyStr, double *Values, int &DimFrst)
Read the next record using strings for the unique elements. The reading should be initialized by call...
Definition: gxfile.cpp:1748
+int gdxDataWriteDone()
Finish a write operation. Returns zero if the operation is not possible.
Definition: gxfile.cpp:508
+int gdxDataReadRaw(int *KeyInt, double *Values, int &DimFrst)
Read the next record in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2172
+int gdxDataReadMapStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2773
+int gdxDataSliceUELS(const int *SliceKeyInt, char **KeyStr)
Map a slice index in to the corresponding unique elements. After calling DataReadSliceStart,...
Definition: gxfile.cpp:3369
+int gdxClose()
Close a GDX file that was previously opened for reading or writing. Before the file is closed,...
Definition: gxfile.cpp:533
+int gdxDataReadRawStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2193
+int gdxDataWriteRawStartKeyBounds(const char *SyId, const char *ExplTxt, int Dimen, int Typ, int UserInfo, const int *MinUELIndices, const int *MaxUELIndices)
Start writing a new symbol in raw mode with bounds for UEL key indices being known in advance....
Definition: gxfile.cpp:2220
+int gdxUMUelGet(int UelNr, char *Uel, int &UelMap)
Get a unique element using an unmapped index. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2630
+int gdxAllowBogusDomains() const
Get flag to ignore using 1-dim sets as domain when their elements are not tracked (see gdxStoreDomain...
Definition: gxfile.cpp:3581
+int gdxSymbolInfo(int SyNr, char *SyId, int &Dimen, int &Typ)
Returns information (name, dimension count, type) about a symbol from the symbol table....
Definition: gxfile.cpp:1815
+int gdxUELRegisterMap(int UMap, const char *Uel)
Register unique element in mapped mode. A unique element must follow the GAMS rules when it contains ...
Definition: gxfile.cpp:2757
+int gdxDataWriteMap(const int *KeyInt, const double *Values)
Write a data element in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2715
+int gdxSystemInfo(int &SyCnt, int &UelCnt) const
Returns the number of symbols and unique elements. Always non-zero.
Definition: gxfile.cpp:2570
+int gdxDataReadDone()
Finish reading of a symbol in any mode (raw, mapped, string). . Returns zero if the operation is not ...
Definition: gxfile.cpp:1777
+int gdxFilterRegister(int UelMap)
Add a unique element to the current filter definition, zero if the index number is out of range or wa...
Definition: gxfile.cpp:3046
+int gdxAcronymIndex(double V) const
Get index value of an acronym. Returns zero if V does not represent an acronym.
Definition: gxfile.cpp:3228
+int gdxAcronymAdd(const char *AName, const char *Txt, int AIndx)
Add a new acronym entry. This can be used to add entries before data is written. Returns negative val...
Definition: gxfile.cpp:3209
+int gdxDataReadSlice(const char **UelFilterStr, int &Dimen, TDataStoreProc_t DP)
Read a slice of data from a data set, by fixing zero or more index positions in the data....
Definition: gxfile.cpp:3325
+int gdxSetSpecialValues(const double *AVals)
Set the internal values for special values. Before calling this function, initialize the array of spe...
Definition: gxfile.cpp:2302
+int gdxDataErrorCount() const
Query the number of error records.
Definition: gxfile.cpp:2134
+int gdxSymbMaxLength() const
Returns the length of the longest symbol name in the GDX file.
Definition: gxfile.cpp:3508
+int gdxDataReadMap(int RecNr, int *KeyInt, double *Values, int &DimFrst)
Read the next record in mapped mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2780
+int gdxFilterRegisterDone()
Finish registration of unique elements for a filter. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3063
+int gdxUMFindUEL(const char *Uel, int &UelNr, int &UelMap)
Search for unique element by its string. Non-zero if the element was found, zero otherwise.
Definition: gxfile.cpp:3555
+int gdxFilterExists(int FilterNr)
Check if there is a filter defined based on its number as used in gdxFilterRegisterStart....
Definition: gxfile.cpp:3030
+int gdxDataReadRawFastEx(int SyNr, TDataStoreExProc_t DP, int &NrRecs, void *Uptr)
Read a symbol in Raw mode using a callback procedure. Returns zero if the operation is not possible.
Definition: gxfile.cpp:3666
+int gdxFindSymbol(const char *SyId, int &SyNr)
Search for a symbol by name in the symbol table; the search is not case-sensitive.
Definition: gxfile.cpp:1733
+int gdxSetReadSpecialValues(const double *AVals)
Set the internal values for special values when reading a GDX file. Before calling this function,...
Definition: gxfile.cpp:3449
+int gdxAddAlias(const char *Id1, const char *Id2)
Add an alias for a set to the symbol table. One of the two identifiers has to be a known set,...
Definition: gxfile.cpp:2080
+int gdxGetSpecialValues(double *AVals)
Retrieve the internal values for special values. Always non-zero.
Definition: gxfile.cpp:2281
+void gdxAllowBogusDomainsSet(int flag)
Set flag to ignore using 1-dim sets as domain when their elements are not tracked (see gdxStoreDomain...
Definition: gxfile.cpp:3586
+~TGXFileObj()
Dispose GDX file object.
Definition: gxfile.cpp:682
+int gdxGetUEL(int UelNr, char *Uel) const
Get the string for a unique element using a mapped index. Returns zero if the operation is not possib...
Definition: gxfile.cpp:2693
+int gdxSymbolGetDomain(int SyNr, int *DomainSyNrs)
Retrieve the domain of a symbol. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2356
+int gdxAcronymCount() const
Number of entries in the acronym table.
Definition: gxfile.cpp:2954
+int gdxGetElemText(int TxtNr, char *Txt, int &Node)
Retrieve the string and node number for an entry in the string table. Returns zero if the operation i...
Definition: gxfile.cpp:2237
+int gdxAcronymGetMapping(int N, int &orgIndx, int &newIndx, int &autoIndex)
Get information how acronym values are remapped. When reading GDX data, we need to map indices for ac...
Definition: gxfile.cpp:3018
+int gdxCurrentDim() const
Returns the dimension of the currently active symbol When reading or writing data,...
Definition: gxfile.cpp:2661
+int gdxSymbolInfoX(int SyNr, int &RecCnt, int &UserInfo, char *ExplTxt)
Returns additional information about a symbol. Returns zero if the symbol number is out of range,...
Definition: gxfile.cpp:2418
+int gdxAutoConvert(int NV)
Returns the value of the AutoConvert variable and sets the variable to nv. When we close a new GDX fi...
Definition: gxfile.cpp:3252
+int gdxSetHasText(int SyNr)
Test if any of the elements of the set has an associated text. Non-zero if the Set contains at least ...
Definition: gxfile.cpp:3444
+int gdxErrorCount() const
Returns the number of errors.
Definition: gxfile.cpp:2232
+int gdxOpenWrite(const char *FileName, const char *Producer, int &ErrNr)
Open a new GDX file for output. Non-zero if the file can be opened, zero otherwise.
Definition: gxfile.cpp:392
+int gdxUELRegisterDone()
Finish registration of unique elements. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2577
+int gdxFileInfo(int &FileVer, int &ComprLev) const
Returns file format number and compression level used. Always non-zero.
Definition: gxfile.cpp:3265
+int gdxDataReadStrStart(int SyNr, int &NrRecs)
Initialize the reading of a symbol in string mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:1841
+void gdxMapAcronymsToNaNSet(int flag)
Flag to map all acronym values to the GAMS "Not a Number" special value. Disabled by default.
Definition: gxfile.cpp:3596
+int gdxUELRegisterRawStart()
Start registering unique elements in raw mode. Returns zero if the operation is not possible.
Definition: gxfile.cpp:2601
+int gdxSymbIndxMaxLength(int SyNr, int *LengthInfo)
Returns the length of the longest UEL used for every index position for a given symbol.
Definition: gxfile.cpp:3473
+int gdxAcronymSetInfo(int N, const char *AName, const char *Txt, int AIndx)
Modify acronym information in the acronym table.
Definition: gxfile.cpp:2974
+
+
+
diff --git a/gxfile_8h_source.html b/gxfile_8h_source.html
index 904365e2..50cec747 100644
--- a/gxfile_8h_source.html
+++ b/gxfile_8h_source.html
@@ -139,331 +139,329 @@
-
-
- 47namespace gdlib::gmsstrm
-
- 49class TMiBufferedStreamDelphi;
-
-
+
+ 46namespace gdlib::gmsstrm
+
+
+
+
+
-
-
-
-
-
- 58using TgdxUELIndex = std::array<int, GMS_MAX_INDEX_DIM>;
- 59using TgdxValues = std::array<double, GMS_VAL_SCALE + 1>;
-
- 61using TDomainIndexProc_t = void ( * )(
int RawIndex,
int MappedIndex,
void *Uptr );
- 62using TDataStoreProc_t = void ( * )(
const int *Indx,
const double *Vals );
- 63using TDataStoreFiltProc_t = int ( * )(
const int *Indx,
const double *Vals,
void *Uptr );
- 64using TDataStoreExProc_t = int ( * )(
const int *Indx,
const double *Vals,
const int afdim,
void *Uptr );
-
- 66using TDataStoreExProc_F = int ( * )(
const int *Indx,
const double *Vals,
const int afdim, int64_t Uptr );
- 67using TDataStoreFiltProc_F = int ( * )(
const int *Indx,
const double *Vals, int64_t Uptr );
- 68using TDomainIndexProc_F = void ( * )(
int RawIndex,
int MappedIndex, int64_t Uptr );
+
+
+
+ 56using TgdxUELIndex = std::array<int, GMS_MAX_INDEX_DIM>;
+ 57using TgdxValues = std::array<double, GMS_VAL_SCALE + 1>;
+
+ 59using TDomainIndexProc_t = void ( * )(
int RawIndex,
int MappedIndex,
void *Uptr );
+ 60using TDataStoreProc_t = void ( * )(
const int *Indx,
const double *Vals );
+ 61using TDataStoreFiltProc_t = int ( * )(
const int *Indx,
const double *Vals,
void *Uptr );
+ 62using TDataStoreExProc_t = int ( * )(
const int *Indx,
const double *Vals,
const int afdim,
void *Uptr );
+
+ 64using TDataStoreExProc_F = int ( * )(
const int *Indx,
const double *Vals,
const int afdim, int64_t Uptr );
+ 65using TDataStoreFiltProc_F = int ( * )(
const int *Indx,
const double *Vals, int64_t Uptr );
+ 66using TDomainIndexProc_F = void ( * )(
int RawIndex,
int MappedIndex, int64_t Uptr );
+
+ 68const std::array<int, GMS_DT_ALIAS + 1> DataTypSize { 1, 1, 5, 5, 0 };
- 70const std::array<int, GMS_DT_ALIAS + 1> DataTypSize { 1, 1, 5, 5, 0 };
-
- 72constexpr int DOMC_UNMAPPED = -2,
-
-
-
- 76const std::string BADUEL_PREFIX =
"?L__",
- 77 BADStr_PREFIX =
"?Str__",
- 78 strGDXCOMPRESS =
"GDXCOMPRESS",
- 79 strGDXCONVERT =
"GDXCONVERT";
-
-
- 82 int FiltNumber {}, FiltMaxUel {};
- 83 gdlib::gmsobj::TBooleanBitArray FiltMap {};
-
-
- 86 TDFilter(
int Nr,
int UserHigh ) : FiltNumber { Nr },
- 87 FiltMaxUel { UserHigh }
-
-
+ 70constexpr int DOMC_UNMAPPED = -2,
+
+
+
+ 74const std::string BADUEL_PREFIX =
"?L__",
+ 75 BADStr_PREFIX =
"?Str__",
+ 76 strGDXCOMPRESS =
"GDXCOMPRESS",
+ 77 strGDXCONVERT =
"GDXCONVERT";
+
+
+ 80 int FiltNumber {}, FiltMaxUel {};
+ 81 gdlib::gmsobj::TBooleanBitArray FiltMap {};
+
+
+ 84 TDFilter(
int Nr,
int UserHigh ) : FiltNumber { Nr },
+ 85 FiltMaxUel { UserHigh }
+
+
+
+
-
-
- 93 [[nodiscard]]
int MemoryUsed()
const
-
- 95 return FiltMap.MemoryUsed();
-
-
- 98 [[nodiscard]]
bool InFilter(
int V )
const
-
- 100 return V >= 0 && V <= FiltMaxUel && FiltMap.GetBit( V );
-
-
- 103 void SetFilter(
int ix,
bool v )
-
- 105 FiltMap.SetBit( ix, v );
-
-
+ 91 [[nodiscard]]
int MemoryUsed()
const
+
+ 93 return FiltMap.MemoryUsed();
+
+
+ 96 [[nodiscard]]
bool InFilter(
int V )
const
+
+ 98 return V >= 0 && V <= FiltMaxUel && FiltMap.GetBit( V );
+
+
+ 101 void SetFilter(
int ix,
bool v )
+
+ 103 FiltMap.SetBit( ix, v );
+
+
+
+ 107using TSetBitMap = gdlib::gmsobj::TBooleanBitArray;
- 109using TSetBitMap = gdlib::gmsobj::TBooleanBitArray;
-
- 111enum class TgdxDAction
-
-
-
-
-
-
-
-
-
-
-
+ 109enum class TgdxDAction : uint8_t
+
+
+
+
+
+
+
+
+
+
+
+
+ 122using TDomainList = std::array<TDomain, GLOBAL_MAX_INDEX_DIM>;
- 124using TDomainList = std::array<TDomain, GLOBAL_MAX_INDEX_DIM>;
+ 124using TCommentsList = gdlib::gmsobj::TXStrings;
- 126using TCommentsList = gdlib::gmsobj::TXStrings;
-
-
-
-
- 131 int SDim, SDataCount, SErrors;
-
-
-
- 135 std::array<char, GMS_SSSIZE> SExplTxt;
-
- 137 std::unique_ptr<int[]> SDomSymbols,
-
- 139 std::optional<TCommentsList> SCommentsList;
-
- 141 std::unique_ptr<TSetBitMap> SSetBitMap;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 184class TgxModeSet :
public utils::IContainsPredicate<TgxFileMode>
-
- 186 std::array<bool, tgxfilemode_count> modeActive {};
-
-
-
- 190 TgxModeSet(
const std::initializer_list<TgxFileMode> &modes );
-
- 192 [[nodiscard]]
bool contains(
const TgxFileMode &mode )
const override;
- 193 [[nodiscard]]
bool empty()
const;
-
-
- 196const TgxModeSet AnyWriteMode { fw_init, fw_dom_raw, fw_dom_map, fw_dom_str, fw_raw_data, fw_map_data, fw_str_data },
- 197 AnyReadMode { fr_init, fr_raw_data, fr_map_data, fr_mapr_data, fr_str_data };
-
- 199enum class TgdxElemSize
-
-
-
-
-
-
-
-
-
-
-
-
- 212 int64_t FCapacity {}, FMapBytes {};
- 213 int64_t FMAXCAPACITY { std::numeric_limits<int>::max() +
static_cast<int64_t
>( 1 ) };
- 214 int FHighestIndex {};
-
+
+
+
+ 129 int SDim, SDataCount, SErrors;
+
+
+
+ 133 std::array<char, GMS_SSSIZE> SExplTxt;
+
+
+ 136 std::unique_ptr<int[]> SDomSymbols,
+
+ 138 std::optional<TCommentsList> SCommentsList;
+ 139 std::unique_ptr<TSetBitMap> SSetBitMap;
+
+
+
+ 143enum TgdxIntlValTyp : uint8_t
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 159enum TgxFileMode : uint8_t
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 182class TgxModeSet :
public utils::IContainsPredicate<TgxFileMode>
+
+ 184 std::array<bool, tgxfilemode_count> modeActive {};
+
+
+
+ 188 TgxModeSet(
const std::initializer_list<TgxFileMode> &modes );
+
+ 190 [[nodiscard]]
bool contains(
const TgxFileMode &mode )
const override;
+ 191 [[nodiscard]]
bool empty()
const;
+
+
+ 194const TgxModeSet AnyWriteMode { fw_init, fw_dom_raw, fw_dom_map, fw_dom_str, fw_raw_data, fw_map_data, fw_str_data },
+ 195 AnyReadMode { fr_init, fr_raw_data, fr_map_data, fr_mapr_data, fr_str_data };
+
+ 197enum class TgdxElemSize : uint8_t
+
+
+
+
+
+
+
+
+
+
+
+
+ 210 int64_t FCapacity {}, FMapBytes {};
+ 211 int64_t FMAXCAPACITY { std::numeric_limits<int>::max() +
static_cast<int64_t
>( 1 ) };
+ 212 int FHighestIndex {};
+
+
+ 215 void growMapping(
int F );
- 217 void growMapping(
int F );
-
-
-
-
- 222 [[nodiscard]]
int MemoryUsed()
const;
- 223 [[nodiscard]]
int GetHighestIndex()
const;
- 224 [[nodiscard]]
int GetMapping(
int F )
const;
- 225 void SetMapping(
int F,
int T );
- 226 [[nodiscard]]
int size()
const;
- 227 [[nodiscard]]
bool empty()
const;
-
-
-
- 231enum class TUELUserMapStatus
-
-
-
-
-
-
-
-
-
- 241using TXStrHashListImpl = gdlib::strhash::TXStrHashList<T>;
-
-
- 244using TXCSStrHashListImpl = gdlib::strhash::TXCSStrHashList<T>;
-
-
-
- 248 TUELUserMapStatus FMapToUserStatus { TUELUserMapStatus::map_unknown };
-
-
- 251 std::unique_ptr<TIntegerMapping> UsrUel2Ent {};
-
-
- 254 [[nodiscard]]
int size()
const;
- 255 [[nodiscard]]
bool empty()
const;
- 256 int GetUserMap(
int i );
- 257 void SetUserMap(
int EN,
int N );
- 258 int NewUsrUel(
int EN );
- 259 int AddUsrNew(
const char *s,
size_t slen );
- 260 int AddUsrIndxNew(
const char *s,
size_t slen,
int UelNr );
- 261 [[nodiscard]]
int GetMaxUELLength()
const;
- 262 int IndexOf(
const char *s );
- 263 int AddObject(
const char *
id,
size_t idlen,
int mapping );
- 264 int StoreObject(
const char *
id,
size_t idlen,
int mapping );
- 265 const char *operator[](
int index )
const;
- 266 void RenameEntry(
int N,
const char *s );
- 267 [[nodiscard]]
int MemoryUsed()
const;
- 268 void SaveToStream( gdlib::gmsstrm::TXStreamDelphi &S );
- 269 void LoadFromStream( gdlib::gmsstrm::TXStreamDelphi &S );
- 270 TUELUserMapStatus GetMapToUserStatus();
- 271 void ResetMapToUserStatus();
-
+
+
+
+ 220 [[nodiscard]]
int MemoryUsed()
const;
+ 221 [[nodiscard]]
int GetHighestIndex()
const;
+ 222 [[nodiscard]]
int GetMapping(
int F )
const;
+ 223 void SetMapping(
int F,
int T );
+ 224 [[nodiscard]]
int size()
const;
+ 225 [[nodiscard]]
bool empty()
const;
+
+
+
+ 229enum class TUELUserMapStatus : uint8_t
+
+
+
+
+
+
+
+
+
+ 239using TXStrHashListImpl = gdlib::strhash::TXStrHashList<T>;
+
+
+ 242using TXCSStrHashListImpl = gdlib::strhash::TXCSStrHashList<T>;
+
+
+
+ 246 TUELUserMapStatus FMapToUserStatus { TUELUserMapStatus::map_unknown };
+
+
+ 249 std::unique_ptr<TIntegerMapping> UsrUel2Ent {};
+
+
+ 252 [[nodiscard]]
int size()
const;
+ 253 [[nodiscard]]
bool empty()
const;
+ 254 int GetUserMap(
int i );
+ 255 void SetUserMap(
int EN,
int N );
+ 256 int NewUsrUel(
int EN );
+ 257 int AddUsrNew(
const char *s,
size_t slen );
+ 258 int AddUsrIndxNew(
const char *s,
size_t slen,
int UelNr );
+ 259 [[nodiscard]]
int GetMaxUELLength()
const;
+ 260 int IndexOf(
const char *s );
+ 261 int AddObject(
const char *
id,
size_t idlen,
int mapping );
+ 262 int StoreObject(
const char *
id,
size_t idlen,
int mapping );
+ 263 const char *operator[](
int index )
const;
+ 264 void RenameEntry(
int N,
const char *s );
+ 265 [[nodiscard]]
int MemoryUsed()
const;
+ 266 void SaveToStream( gdlib::gmsstrm::TXStream &S );
+ 267 void LoadFromStream( gdlib::gmsstrm::TXStream &S );
+ 268 TUELUserMapStatus GetMapToUserStatus();
+ 269 void ResetMapToUserStatus();
+
+
+ 272int MakeGoodExplText(
char *s );
- 274int MakeGoodExplText(
char *s );
-
-
- 277 std::string AcrName, AcrText;
- 278 int AcrMap {}, AcrReadMap { -1 };
-
-
- 281 TAcronym(
const char *Name,
const char *Text,
int Map );
- 282 explicit TAcronym( gdlib::gmsstrm::TXStreamDelphi &S );
-
-
- 285 [[nodiscard]]
int MemoryUsed()
const;
- 286 void SaveToStream( gdlib::gmsstrm::TXStreamDelphi &S )
const;
- 287 void SetNameAndText(
const char *Name,
const char *Text );
-
-
-
-
- 292 gdlib::gmsobj::TXList<TAcronym> FList;
-
-
-
-
- 297 int FindEntry(
int Map );
- 298 int FindName(
const char *Name );
- 299 int AddEntry(
const char *Name,
const char *Text,
int Map );
- 300 void CheckEntry(
int Map );
- 301 void SaveToStream( gdlib::gmsstrm::TXStreamDelphi &S );
- 302 void LoadFromStream( gdlib::gmsstrm::TXStreamDelphi &S );
-
- 304 [[nodiscard]]
int size()
const;
-
-
-
-
-
- 310 gdlib::gmsobj::TXList<TDFilter> FList;
-
-
-
-
-
- 316 void DeleteFilter(
int ix );
-
- 318 [[nodiscard]]
size_t MemoryUsed()
const;
-
-
- 321using TIntlValueMapDbl = std::array<double, vm_count>;
- 322using TIntlValueMapI64 = std::array<int64_t, vm_count>;
-
- 324using LinkedDataType = gdlib::datastorage::TLinkedData<int, double>;
- 325using LinkedDataIteratorType = gdlib::datastorage::TLinkedDataRec<int, double> *;
+
+ 275 std::string AcrName, AcrText;
+ 276 int AcrMap {}, AcrReadMap { -1 };
+
+
+ 279 TAcronym(
const char *Name,
const char *Text,
int Map );
+ 280 explicit TAcronym( gdlib::gmsstrm::TXStream &S );
+
+
+ 283 [[nodiscard]]
int MemoryUsed()
const;
+ 284 void SaveToStream( gdlib::gmsstrm::TXStream &S )
const;
+ 285 void SetNameAndText(
const char *Name,
const char *Text );
+
+
+
+
+ 290 gdlib::gmsobj::TXList<TAcronym> FList;
+
+
+
+
+ 295 int FindEntry(
int Map );
+ 296 int FindName(
const char *Name );
+ 297 int AddEntry(
const char *Name,
const char *Text,
int Map );
+ 298 void CheckEntry(
int Map );
+ 299 void SaveToStream( gdlib::gmsstrm::TXStream &S );
+ 300 void LoadFromStream( gdlib::gmsstrm::TXStream &S );
+
+ 302 [[nodiscard]]
int size()
const;
+
+
+
+
+
+ 308 gdlib::gmsobj::TXList<TDFilter> FList;
+
+
+
+
+
+ 314 void DeleteFilter(
int ix );
+
+ 316 [[nodiscard]]
size_t MemoryUsed()
const;
+
+
+ 319using TIntlValueMapDbl = std::array<double, vm_count>;
+ 320using TIntlValueMapI64 = std::array<int64_t, vm_count>;
+
+ 322using LinkedDataType = gdlib::datastorage::TLinkedData<int, double>;
+ 323using LinkedDataIteratorType = gdlib::datastorage::TLinkedDataRec<int, double> *;
+
+ 325using TSetTextList = TXCSStrHashListImpl<int>;
- 327using TSetTextList = TXCSStrHashListImpl<int>;
+ 327using TNameList = TXStrHashListImpl<PgdxSymbRecord>;
- 329using TNameList = TXStrHashListImpl<PgdxSymbRecord>;
-
-
- 332using TTblGamsDataImpl = gdlib::gmsdata::TTblGamsData<T>;
+
+ 330using TTblGamsDataImpl = gdlib::gmsdata::TTblGamsData<T>;
+
+ 332using TDomainStrList = TXStrHashListImpl<uint8_t>;
- 334using TDomainStrList = TXStrHashListImpl<uint8_t>;
-
-
-
-
-
-
-
-
-
+ 334enum tvarvaltype : uint8_t
+
+
+
+
+
+
+
+
+ 343extern std::string DLLLoadPath;
- 345extern std::string DLLLoadPath;
-
-
-
-
-
-
-
- 353bool IsGoodIdent(
const char *S );
- 354bool CanBeQuoted(
const char *s,
size_t slen );
- 355bool GoodUELString(
const char *s,
size_t slen );
+
+
+
+
+
+
+ 351bool IsGoodIdent(
const char *S );
+ 352bool CanBeQuoted(
const char *s,
size_t slen );
+ 353bool GoodUELString(
const char *s,
size_t slen );
+
+ 355int ConvertGDXFile(
const std::string &fn,
const std::string &MyComp );
- 357int ConvertGDXFile(
const std::string &fn,
const std::string &MyComp );
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/index.html b/index.html
index 26715c4a..b746573a 100644
--- a/index.html
+++ b/index.html
@@ -411,38 +411,54 @@
Set I /.../;
Parameter A(I,*);
Assuming we have read set I
already, the following code snapshot illustrates how to read parameter A
.
-
+
+
+
+
+
gdx.gdxUELRegisterMapStart();
+
gdx.gdxUELRegisterMap( 1000, "New-York" );
+
gdx.gdxUELRegisterMap( 2000, "Chicago" );
+
gdx.gdxUELRegisterDone();
+
if(!gdx.gdxFilterRegisterStart(123))
ReportGDXError();
gdx.gdxFilterRegister(1000);
gdx.gdxFilterRegister(2000);
-
if(!gdx.gdxFilterRegisterDone()
+
if(!gdx.gdxFilterRegisterDone())
ReportGDXError();
-
-
Filt[0] = 123;
-
Filt[1] = -1;
+
+
std::array filterAction {
+
123,
+
gdx::DOMC_EXPAND
+
};
-
gdx.gdxUMUelInfo(NrUnMapped,LastMapped);
+
int NrUnMapped, LastMapped;
+
gdx.gdxUMUelInfo(NrUnMapped, LastMapped);
-
if(!gdx.gdxFindSymbol("A",SyNr) {
+
int SyNr;
+
if(!gdx.gdxFindSymbol("A", SyNr) {
std::cout << "**** Could not find symbol A" << std::endl;
exit(1);
}
-
gdx.gdxSymbolInfo(SyNr,SyName,SyDim,SyTyp);
+
std::array<char, GMS_SSSIZE> SyName;
+
int SyDim, SyTyp;
+
gdx.gdxSymbolInfo(SyNr, SyName.data(), SyDim, SyTyp);
if(SyDim != 2 || SyTyp != dt_par) {
std::cout << "**** A is not a two dimensional parameter" << std::endl;
exit(1);
}
-
if(!gdx.gdxReadFilteredStart(SyNr,Filt,NrRecs);
+
int NrRecs;
+
if(!gdx.gdxDataReadFilteredStart(SyNr, filterAction.data(), NrRecs));
ReportGDXError();
-
+
+
int DimFrst;
for(int N{1}; N<=NrRecs; N++) {
-
if(gdx.gdxDataReadMap(N,IndxI,Values)) {
+
if(gdx.gdxDataReadMap(N, IndxI, Values, DimFrst)) {
}
}
@@ -451,14 +467,17 @@
ReportGDXError();
-gdx.gdxUMUelInfo(NrUnMapped,NewLastMapped);
+int NewLastMapped;
+gdx.gdxUMUelInfo(NrUnMapped, NewLastMapped);
if(NewLastMapped > LastMapped) {
for(int N{LastMapped + 1}; N<=NewLastMapped; N++) {
- gdx.gdxGetUel(N,S);
- std::cout << "New element " << N << " = " << S << '\n';
+ std::array<char, GMS_SSSIZE> S {};
+ gdx.gdxGetUel(N,S.data());
+ std::cout << "New element " << N << " = " << S.data() << '\n';
}
}
-
+
A runnable version of this example can be found in the unit test suite under /src/tests/gdxtests.cpp
as test case with the name "Test filter example from README".
+
Dealing with acronyms
In GAMS we can use acronyms in places where we can use a floating point number as in the following example: