Skip to content

Commit a454630

Browse files
Refactor integer array pushing in AbstractValuesProperty
Replaces multiple type-specific pushBack*Hdf5Array*OfValues methods with a set of templated functions for pushing integer arrays of various types and dimensions. The previous pushBack*Hdf5Array*OfValues are still there but are flagged as deprecated. Updates tests and SWIG interface to cover all integer types (signed and unsigned, 8/16/32/64 bits). Simplifies and unifies the API for pushing integer property values, improving maintainability and extensibility.
1 parent d38a405 commit a454630

15 files changed

Lines changed: 445 additions & 218 deletions

example/example.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void serializeWells(COMMON_NS::DataObjectRepository * repo, EML2_NS::AbstractHdf
309309
RESQML2_NS::DiscreteProperty* discreteProp = repo->createDiscreteProperty(w1i1FrameRep, "61c2917c-2334-4205-824e-d4f4a0cf6d8e", "Wellbore1 Interp1 FrameRep IntervalIndex", 1,
310310
gsoap_eml2_3::eml23__IndexableElement::intervals, unitNumberPropType);
311311
int8_t unitNumbers[5] = { 0, 1, 2, 3, 4 };
312-
discreteProp->pushBackInt8Hdf5Array1dOfValues(unitNumbers, 5, hdfProxy, -1);
312+
discreteProp->pushBackIntegerArray1dOfValues(unitNumbers, 5, hdfProxy, static_cast<std::int8_t>(-1));
313313
#if WITH_RESQML2_2
314314
// SeismicWellboreFrameRepresentation
315315
RESQML2_NS::SeismicWellboreFrameRepresentation* w1i1SeismicFrameRep = repo->createSeismicWellboreFrameRepresentation(
@@ -416,7 +416,7 @@ void serializeGraphicalInformationSet(COMMON_NS::DataObjectRepository * repo, EM
416416
RESQML2_NS::DiscreteProperty* discreteProp2 = repo->createDiscreteProperty(twoCellsIjkGrid, "1e2822ef-b6cb-4123-bdf4-c99df84a896f", "Another two faulted sugar cubes cellIndex", 1,
417417
gsoap_eml2_3::eml23__IndexableElement::cells, propType1);
418418
uint16_t prop2Values[2] = { 0, 1 };
419-
discreteProp2->pushBackUInt16Hdf5Array3dOfValues(prop2Values, 2, 1, 1, hdfProxy, -1);
419+
discreteProp2->pushBackIntegerArray3dOfValues(prop2Values, 2, 1, 1, hdfProxy, (std::numeric_limits<uint16_t>::max)());
420420

421421
// ********************
422422
// Continuous color map
@@ -1021,12 +1021,12 @@ void serializeGrid(COMMON_NS::DataObjectRepository * repo, EML2_NS::AbstractHdfP
10211021
#endif
10221022
discreteProp1 = repo->createDiscreteProperty(twoCellsIjkGrid, "ee0857fe-23ad-4dd9-8300-21fa2e9fb572", "Two faulted sugar cubes cellIndex", 1,
10231023
gsoap_eml2_3::eml23__IndexableElement::cells, propType1);
1024-
unsigned short prop1Values[2] = { 0, 1 };
1025-
discreteProp1->pushBackUInt16Hdf5Array3dOfValues(prop1Values, 2, 1, 1, hdfProxy, 1111);
1024+
uint16_t prop1Values[2] = { 0, 1 };
1025+
discreteProp1->pushBackIntegerArray3dOfValues(prop1Values, 2, 1, 1, hdfProxy, static_cast<uint16_t>(1111));
10261026
RESQML2_NS::DiscreteProperty* discreteProp2 = repo->createDiscreteProperty(twoCellsIjkGrid, "da73937c-2c60-4e10-8917-5154fde4ded5", "Two faulted sugar cubes other cellIndex", 1,
10271027
gsoap_eml2_3::eml23__IndexableElement::cells, propType1);
10281028
int64_t prop2Values[2] = { 10, 11 };
1029-
discreteProp2->pushBackInt64Hdf5Array3dOfValues(prop2Values, 2, 1, 1, hdfProxy, 1111);
1029+
discreteProp2->pushBackIntegerArray3dOfValues(prop2Values, 2, 1, 1, hdfProxy, static_cast<int64_t>(1111));
10301030

10311031
RESQML2_0_1_NS::PropertySet* parentPropSet = repo->createPropertySet("3135a6c1-1204-4c30-a0ec-c9357ec13510", "Testing parent property set", false, true, gsoap_resqml2_0_1::resqml20__TimeSetKind::not_x0020a_x0020time_x0020set);
10321032
RESQML2_0_1_NS::PropertySet* childPropSet = repo->createPropertySet("1d4b4342-288d-47c1-9572-9f330f8e632a", "Testing child property set", false, true,gsoap_resqml2_0_1::resqml20__TimeSetKind::not_x0020a_x0020time_x0020set);
@@ -1046,7 +1046,7 @@ void serializeGrid(COMMON_NS::DataObjectRepository * repo, EML2_NS::AbstractHdfP
10461046
int64_t discreteProp432Values[24] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
10471047
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 };
10481048
//hdfProxy->setMaxChunkSize(192/2); // Create two chunks
1049-
discreteProp432->pushBackInt64Hdf5Array3dOfValues(discreteProp432Values, 4, 3, 2, hdfProxy, 1111);
1049+
discreteProp432->pushBackIntegerArray3dOfValues(discreteProp432Values, 4, 3, 2, hdfProxy, static_cast<std::int64_t>(1111));
10501050

10511051
/**************
10521052
Continuous Properties

src/resqml2/AbstractValuesProperty.cpp

Lines changed: 82 additions & 128 deletions
Large diffs are not rendered by default.

src/resqml2/AbstractValuesProperty.h

Lines changed: 123 additions & 26 deletions
Large diffs are not rendered by default.

src/resqml2_0_1/ContinuousProperty.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ std::string ContinuousProperty::getUomAsString() const
109109
gsoap_resqml2_0_1::resqml20__ResqmlUom uom = getUom();
110110

111111
if (uom == gsoap_resqml2_0_1::resqml20__ResqmlUom::Euc) {
112-
unsigned int emCount = getExtraMetadataCount();
113-
for (unsigned int i = 0; i < emCount; ++i) {
112+
const uint64_t emCount = getExtraMetadataCount();
113+
for (uint64_t i = 0; i < emCount; ++i) {
114114
if (getExtraMetadataKeyAtIndex(i) == "Uom") {
115115
return getExtraMetadataStringValueAtIndex(i);
116116
}

src/resqml2_0_1/PropertyKind.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ std::string PropertyKind::getBaseUomAsString() const
155155
gsoap_resqml2_0_1::resqml20__ResqmlUom representativeUom = getSpecializedGsoapProxy()->RepresentativeUom;
156156

157157
if (representativeUom == gsoap_resqml2_0_1::resqml20__ResqmlUom::Euc) {
158-
unsigned int emCount = getExtraMetadataCount();
159-
for (unsigned int i = 0; i < emCount; ++i) {
158+
const uint64_t emCount = getExtraMetadataCount();
159+
for (uint64_t i = 0; i < emCount; ++i) {
160160
if (getExtraMetadataKeyAtIndex(i) == "Uom") {
161161
return getExtraMetadataStringValueAtIndex(i);
162162
}

swig/swigResqml2Include.i

Lines changed: 111 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6052,6 +6052,55 @@ namespace RESQML2_NS
60526052
//****************************/
60536053
//****** INTEGER *************/
60546054
//****************************/
6055+
6056+
template<typename T> void pushBackIntegerArrayOfValues(const T* values, const uint64_t* numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, T nullValue);
6057+
template<typename T> void pushBackIntegerArray1dOfValues(const T* values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, T nullValue) {
6058+
pushBackIntegerArrayOfValues(values, &valueCount, 1, proxy, nullValue);
6059+
}
6060+
template<typename T> void pushBackIntegerArray2dOfValues(const T* values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, T nullValue) {
6061+
const uint64_t valueCountPerDimension[2] = { valueCountInSlowestDim, valueCountInFastestDim };
6062+
pushBackIntegerArrayOfValues(values, valueCountPerDimension, 2, proxy, nullValue);
6063+
}
6064+
template<typename T> void pushBackIntegerArray3dOfValues(const T* values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, T nullValue) {
6065+
const uint64_t valueCountPerDimension[3] = { valueCountInSlowestDim, valueCountInMiddleDim, valueCountInFastestDim };
6066+
pushBackIntegerArrayOfValues(values, valueCountPerDimension, 3, proxy, nullValue);
6067+
}
6068+
6069+
%template(pushBackInt8ArrayOfValues) pushBackIntegerArrayOfValues<int8_t>;
6070+
%template(pushBackUInt8ArrayOfValues) pushBackIntegerArrayOfValues<uint8_t>;
6071+
%template(pushBackInt16ArrayOfValues) pushBackIntegerArrayOfValues<int16_t>;
6072+
%template(pushBackUInt16ArrayOfValues) pushBackIntegerArrayOfValues<uint16_t>;
6073+
%template(pushBackInt32ArrayOfValues) pushBackIntegerArrayOfValues<int32_t>;
6074+
%template(pushBackUInt32ArrayOfValues) pushBackIntegerArrayOfValues<uint32_t>;
6075+
%template(pushBackInt64ArrayOfValues) pushBackIntegerArrayOfValues<int64_t>;
6076+
%template(pushBackUInt64ArrayOfValues) pushBackIntegerArrayOfValues<uint64_t>;
6077+
6078+
%template(pushBackInt8Array1dOfValues) pushBackIntegerArray1dOfValues<int8_t>;
6079+
%template(pushBackUInt8Array1dOfValues) pushBackIntegerArray1dOfValues<uint8_t>;
6080+
%template(pushBackInt16Array1dOfValues) pushBackIntegerArray1dOfValues<int16_t>;
6081+
%template(pushBackUInt16Array1dOfValues) pushBackIntegerArray1dOfValues<uint16_t>;
6082+
%template(pushBackInt32Array1dOfValues) pushBackIntegerArray1dOfValues<int32_t>;
6083+
%template(pushBackUInt32Array1dOfValues) pushBackIntegerArray1dOfValues<uint32_t>;
6084+
%template(pushBackInt64Array1dOfValues) pushBackIntegerArray1dOfValues<int64_t>;
6085+
%template(pushBackUInt64Array1dOfValues) pushBackIntegerArray1dOfValues<uint64_t>;
6086+
6087+
%template(pushBackInt8Array2dOfValues) pushBackIntegerArray2dOfValues<int8_t>;
6088+
%template(pushBackUInt8Array2dOfValues) pushBackIntegerArray2dOfValues<uint8_t>;
6089+
%template(pushBackInt16Array2dOfValues) pushBackIntegerArray2dOfValues<int16_t>;
6090+
%template(pushBackUInt16Array2dOfValues) pushBackIntegerArray2dOfValues<uint16_t>;
6091+
%template(pushBackInt32Array2dOfValues) pushBackIntegerArray2dOfValues<int32_t>;
6092+
%template(pushBackUInt32Array2dOfValues) pushBackIntegerArray2dOfValues<uint32_t>;
6093+
%template(pushBackInt64Array2dOfValues) pushBackIntegerArray2dOfValues<int64_t>;
6094+
%template(pushBackUInt64Array2dOfValues) pushBackIntegerArray2dOfValues<uint64_t>;
6095+
6096+
%template(pushBackInt8Array3dOfValues) pushBackIntegerArray3dOfValues<int8_t>;
6097+
%template(pushBackUInt8Array3dOfValues) pushBackIntegerArray3dOfValues<uint8_t>;
6098+
%template(pushBackInt16Array3dOfValues) pushBackIntegerArray3dOfValues<int16_t>;
6099+
%template(pushBackUInt16Array3dOfValues) pushBackIntegerArray3dOfValues<uint16_t>;
6100+
%template(pushBackInt32Array3dOfValues) pushBackIntegerArray3dOfValues<int32_t>;
6101+
%template(pushBackUInt32Array3dOfValues) pushBackIntegerArray3dOfValues<uint32_t>;
6102+
%template(pushBackInt64Array3dOfValues) pushBackIntegerArray3dOfValues<int64_t>;
6103+
%template(pushBackUInt64Array3dOfValues) pushBackIntegerArray3dOfValues<uint64_t>;
60556104

60566105
/**
60576106
* @brief Adds a 1d array of explicit int 64 bits values to the property values.
@@ -6069,27 +6118,39 @@ namespace RESQML2_NS
60696118
* repository.
60706119
* @param nullValue The null value.
60716120
*/
6121+
#if SWIG_VERSION >= 0x040100
6122+
[[deprecated("Use pushBackIntegerArray1dOfValues instead.")]]
6123+
#endif
60726124
void pushBackInt64Hdf5Array1dOfValues(const int64_t * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
60736125

60746126
/**
60756127
* Adds a 1d array of explicit integer values to the property values.
60766128
*
60776129
* @copydetails pushBackInt64Hdf5Array1dOfValues
60786130
*/
6131+
#if SWIG_VERSION >= 0x040100
6132+
[[deprecated("Use pushBackIntegerArray1dOfValues instead.")]]
6133+
#endif
60796134
void pushBackInt32Hdf5Array1dOfValues(const int * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
60806135

60816136
/**
60826137
* Adds a 1d array of explicit short values to the property values.
60836138
*
60846139
* @copydetails pushBackInt64Hdf5Array1dOfValues
60856140
*/
6141+
#if SWIG_VERSION >= 0x040100
6142+
[[deprecated("Use pushBackIntegerArray1dOfValues instead.")]]
6143+
#endif
60866144
void pushBackInt16Hdf5Array1dOfValues(const short * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
60876145

60886146
/**
60896147
* Adds a 1d array of explicit char values to the property values.
60906148
*
60916149
* @copydetails pushBackInt64Hdf5Array1dOfValues
60926150
*/
6151+
#if SWIG_VERSION >= 0x040100
6152+
[[deprecated("Use pushBackIntegerArray1dOfValues instead.")]]
6153+
#endif
60936154
void pushBackInt8Hdf5Array1dOfValues(const int8_t * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue);
60946155

60956156
/**
@@ -6111,34 +6172,49 @@ namespace RESQML2_NS
61116172
* HDF proxy must be defined in the repository.
61126173
* @param nullValue The null value.
61136174
*/
6175+
#if SWIG_VERSION >= 0x040100
6176+
[[deprecated("Use pushBackIntegerArray2dOfValues instead.")]]
6177+
#endif
61146178
void pushBackInt64Hdf5Array2dOfValues(const int64_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
61156179

61166180
/**
61176181
* Adds a 2d array of explicit integer values to the property values.
61186182
*
61196183
* @copydetails pushBackInt64Hdf5Array2dOfValues
61206184
*/
6185+
#if SWIG_VERSION >= 0x040100
6186+
[[deprecated("Use pushBackIntegerArray2dOfValues instead.")]]
6187+
#endif
61216188
void pushBackInt32Hdf5Array2dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
61226189

61236190
/**
61246191
* Adds a 2d array of explicit short values to the property values.
61256192
*
61266193
* @copydetails pushBackInt64Hdf5Array2dOfValues
61276194
*/
6195+
#if SWIG_VERSION >= 0x040100
6196+
[[deprecated("Use pushBackIntegerArray2dOfValues instead.")]]
6197+
#endif
61286198
void pushBackInt16Hdf5Array2dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
61296199

61306200
/**
61316201
* Adds a 2d array of explicit unsigned short values to the property values.
61326202
*
61336203
* @copydetails pushBackInt64Hdf5Array2dOfValues
61346204
*/
6205+
#if SWIG_VERSION >= 0x040100
6206+
[[deprecated("Use pushBackIntegerArray2dOfValues instead.")]]
6207+
#endif
61356208
void pushBackUInt16Hdf5Array2dOfValues(const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
61366209

61376210
/**
61386211
* Adds a 2d array of explicit char values to the property values.
61396212
*
61406213
* @copydetails pushBackInt64Hdf5Array2dOfValues
61416214
*/
6215+
#if SWIG_VERSION >= 0x040100
6216+
[[deprecated("Use pushBackIntegerArray2dOfValues instead.")]]
6217+
#endif
61426218
void pushBackInt8Hdf5Array2dOfValues(const int8_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue);
61436219

61446220
/**
@@ -6162,34 +6238,49 @@ namespace RESQML2_NS
61626238
* HDF proxy must be defined in the repository.
61636239
* @param nullValue The null value.
61646240
*/
6241+
#if SWIG_VERSION >= 0x040100
6242+
[[deprecated("Use pushBackIntegerArray3dOfValues instead.")]]
6243+
#endif
61656244
void pushBackInt64Hdf5Array3dOfValues(const int64_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
61666245

61676246
/**
61686247
* Adds a 3d array of explicit integer values to the property values.
61696248
*
61706249
* @copydetails pushBackInt64Hdf5Array3dOfValues
61716250
*/
6251+
#if SWIG_VERSION >= 0x040100
6252+
[[deprecated("Use pushBackIntegerArray3dOfValues instead.")]]
6253+
#endif
61726254
void pushBackInt32Hdf5Array3dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
61736255

61746256
/**
61756257
* Adds a 3d array of explicit short values to the property values.
61766258
*
61776259
* @copydetails pushBackInt64Hdf5Array3dOfValues
61786260
*/
6261+
#if SWIG_VERSION >= 0x040100
6262+
[[deprecated("Use pushBackIntegerArray3dOfValues instead.")]]
6263+
#endif
61796264
void pushBackInt16Hdf5Array3dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
61806265

61816266
/**
61826267
* Adds a 3d array of explicit unsigned short values to the property values.
61836268
*
61846269
* @copydetails pushBackInt64Hdf5Array3dOfValues
61856270
*/
6271+
#if SWIG_VERSION >= 0x040100
6272+
[[deprecated("Use pushBackIntegerArray3dOfValues instead.")]]
6273+
#endif
61866274
void pushBackUInt16Hdf5Array3dOfValues(const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
61876275

61886276
/**
61896277
* Adds a 3d array of explicit char values to the property values.
61906278
*
61916279
* @copydetails pushBackInt64Hdf5Array3dOfValues
61926280
*/
6281+
#if SWIG_VERSION >= 0x040100
6282+
[[deprecated("Use pushBackIntegerArray3dOfValues instead.")]]
6283+
#endif
61936284
void pushBackInt8Hdf5Array3dOfValues(const int8_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue);
61946285

61956286
/**
@@ -6210,35 +6301,50 @@ namespace RESQML2_NS
62106301
* be defined in the repository.
62116302
* @param nullValue The null value.
62126303
*/
6213-
virtual void pushBackInt64Hdf5ArrayOfValues(const int64_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
6304+
#if SWIG_VERSION >= 0x040100
6305+
[[deprecated("Use pushBackIntegerArrayOfValues instead.")]]
6306+
#endif
6307+
void pushBackInt64Hdf5ArrayOfValues(const int64_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
62146308

62156309
/**
62166310
* Adds an nd array of explicit integer values to the property values.
62176311
*
62186312
* @copydetails pushBackInt64Hdf5ArrayOfValues
62196313
*/
6220-
virtual void pushBackInt32Hdf5ArrayOfValues(const int * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
6314+
#if SWIG_VERSION >= 0x040100
6315+
[[deprecated("Use pushBackIntegerArrayOfValues instead.")]]
6316+
#endif
6317+
void pushBackInt32Hdf5ArrayOfValues(const int * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
62216318

62226319
/**
62236320
* Adds an nd array of explicit short values to the property values.
62246321
*
62256322
* @copydetails pushBackInt64Hdf5ArrayOfValues
62266323
*/
6227-
virtual void pushBackInt16Hdf5ArrayOfValues(const short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
6324+
#if SWIG_VERSION >= 0x040100
6325+
[[deprecated("Use pushBackIntegerArrayOfValues instead.")]]
6326+
#endif
6327+
void pushBackInt16Hdf5ArrayOfValues(const short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
62286328

62296329
/**
62306330
* Adds an nd array of explicit unsigned short values to the property values.
62316331
*
62326332
* @copydetails pushBackInt64Hdf5ArrayOfValues
62336333
*/
6234-
virtual void pushBackUInt16Hdf5ArrayOfValues(const unsigned short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
6334+
#if SWIG_VERSION >= 0x040100
6335+
[[deprecated("Use pushBackIntegerArrayOfValues instead.")]]
6336+
#endif
6337+
void pushBackUInt16Hdf5ArrayOfValues(const unsigned short * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
62356338

62366339
/**
62376340
* Adds an nd array of explicit int8_t values to the property values.
62386341
*
62396342
* @copydetails pushBackInt64Hdf5ArrayOfValues
62406343
*/
6241-
virtual void pushBackInt8Hdf5ArrayOfValues(const int8_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue);
6344+
#if SWIG_VERSION >= 0x040100
6345+
[[deprecated("Use pushBackIntegerArrayOfValues instead.")]]
6346+
#endif
6347+
void pushBackInt8Hdf5ArrayOfValues(const int8_t * values, const uint64_t * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int8_t nullValue);
62426348

62436349
/**
62446350
* Pushes back a new patch of values for this property where the values have not to be written

test/eml2_test/HdfProxy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ void HdfProxy::initRepo() {
4040

4141
RESQML2_NS::DiscreteProperty* discreteProp432 = repo->createDiscreteProperty(ijkgrid432, "f9447f76-34c5-4967-a3ee-4f400f96dba6", "4x3x2 grid cellIndex", 1,
4242
gsoap_eml2_3::eml23__IndexableElement::cells, propType1);
43-
LONG64 discreteProp432Values[24] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
43+
int64_t discreteProp432Values[24] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
4444
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 };
4545

4646
// getting the hdf proxy
4747
EML2_NS::AbstractHdfProxy* hdfProxy = repo->getHdfProxySet()[0];
4848
hdfProxy->setCompressionLevel(6);
4949
hdfProxy->setMaxChunkSize(192/2); // Create two chunks
50-
discreteProp432->pushBackInt64Hdf5Array3dOfValues(discreteProp432Values, 4, 3, 2, hdfProxy, 1111);
50+
discreteProp432->pushBackIntegerArray3dOfValues(discreteProp432Values, 4, 3, 2, hdfProxy, static_cast<int64_t>(1111));
5151
}
5252

5353
void HdfProxy::readRepo() {

test/resqml2_2test/DiscreteColorMapTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void DiscreteColorMapTest::initRepo() {
7575
DiscreteProperty* discreteProperty = repo->createDiscreteProperty(ijkgrid, uuidDiscreteProperty, titleDiscreteProperty, 1,
7676
gsoap_eml2_3::eml23__IndexableElement::cells, propertyKind);
7777
uint16_t prop1Values[2] = { 0, 1 };
78-
discreteProperty->pushBackUInt16Hdf5Array3dOfValues(prop1Values, 2, 1, 1, hdfProxy, -1);
78+
discreteProperty->pushBackIntegerArray3dOfValues(prop1Values, 2, 1, 1, hdfProxy, (std::numeric_limits<uint16_t>::max)());
7979

8080
// associating a discrete color map to the discrete property kind
8181
RESQML2_NS::DiscreteColorMap* discreteColorMap1 = repo->createDiscreteColorMap(uuidPropertyKindDiscreteColorMap, titlePropertyKindDiscreteColorMap);

0 commit comments

Comments
 (0)