Hi, I recently upgraded across multiple in a huge switch from 0.13 to 2.12.2.1 (latest) and noted that many API changes were there of course as expected. But besides this I noted that we have one UnstructuredGridRepresentation
under RESQML2_NS
and another under RESQML2_0_1_NS
and similarly for properties DiscreteProperty
, ContinuousProperty
etc. I have been always following the example
code closely to import and export RESQML
files, and I noted even the example
code has changed since then. Previously where APIs createUnstructuredGridRepresentation
or createDiscreteProperty
, createContinuousProperty
, etc were called, it was returning the object of class type from RESQML2_0_1_NS
whereas now it returns from RESQML2_NS
, so I just wanted to confirm whether it is expected to use the one defined in the RESQML2_NS
as the expected return type just as in the example code? Also, any further comments detailing the difference and when to use the one from RESQML2_0_1_NS
are much appreciated.
It is clearly expected to ALWAYS use RESQML2_NS instead of RESQML2_0_1_NS by default. Use only specializations such as in RESQML2_0_1_NS if you really know what you do.
RESQML2_NS has appeared with the experimental support of RESQML2.2 in FESAPI. We wanted to provide a way for FESAPI users not to care if the objects would be (de)serialized to/from RESQML2.0.1 or RESQML2.2. RESQML2_NS is the abstraction of RESQML2.0.1 and RESAML2.2.
The intent is in consequnce that you code everything possible using RESQML2_NS. This code will be almost guaranteed to work the same either you work with RESQML2.0.1 files or RESQML2.2. files.
If you code using RESQML2_0_1_NS, your code would only work for RESQML2.0.1 with, most of time, no advantage.
1 Like