Skip to content

Commit 70c7fa9

Browse files
Renames getElementCountPerValue to getValueCountPerIndexableElement
Replaces unsigned int patchIndex parameters with uint64_t for consistency with RESQML schema datatype.
1 parent c19c8d3 commit 70c7fa9

105 files changed

Lines changed: 359 additions & 365 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2018 F2I-CONSULTING
1+
Copyright 2018-2025 F2I-CONSULTING
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

example/example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,7 +2709,7 @@ void showAllProperties(RESQML2_NS::AbstractRepresentation const * rep, bool* ena
27092709
std::cout << "\tFirst value is " << values[0] << endl;
27102710
std::cout << "\tSecond value is " << values[1] << endl;
27112711

2712-
if (continuousProp->getElementCountPerValue() == 1) {
2712+
if (continuousProp->getValueCountPerIndexableElement() == 1) {
27132713
for (size_t cellIndex = 0; cellIndex < valueCount; ++cellIndex) {
27142714
if (enabledCells != nullptr && !enabledCells[cellIndex]) {
27152715
continue;

src/resqml2/AbstractIjkGridRepresentation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ void AbstractIjkGridRepresentation::getXyzPointsOfBlock(double *)
13461346
throw std::logic_error("Partial object");
13471347
}
13481348

1349-
uint64_t AbstractIjkGridRepresentation::getXyzPointCountOfPatch(unsigned int) const
1349+
uint64_t AbstractIjkGridRepresentation::getXyzPointCountOfPatch(uint64_t) const
13501350
{
13511351
const uint64_t result = getXyzPointCountOfKInterface() * (getKCellCount() + 1 + getKGapsCount()) + getSplitNodeCount();
13521352

@@ -1364,7 +1364,7 @@ uint64_t AbstractIjkGridRepresentation::getXyzPointCountOfPatch(unsigned int) co
13641364
throw std::logic_error("The IJK Grid is in an unknown Energistics standard version.");
13651365
}
13661366

1367-
void AbstractIjkGridRepresentation::getXyzPointsOfPatch(unsigned int, double *) const
1367+
void AbstractIjkGridRepresentation::getXyzPointsOfPatch(uint64_t, double *) const
13681368
{
13691369
throw std::logic_error("Partial object");
13701370
}

src/resqml2/AbstractIjkGridRepresentation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ namespace RESQML2_NS
758758

759759
virtual COMMON_NS::DataObjectReference getHdfProxyDor() const override { throw std::logic_error("Partial object"); }
760760

761-
DLL_IMPORT_OR_EXPORT virtual uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const override;
761+
DLL_IMPORT_OR_EXPORT virtual uint64_t getXyzPointCountOfPatch(uint64_t patchIndex) const override;
762762

763763
/**
764764
* @copybrief AbstractRepresentation::getXyzPointsOfPatch
@@ -770,7 +770,7 @@ namespace RESQML2_NS
770770
* with a count of <tt>((iCellCount+1) * (jCellCount+1) + splitCoordinateLineCount)</tt>
771771
* <tt> * kCellCount.</tt>
772772
*/
773-
DLL_IMPORT_OR_EXPORT virtual void getXyzPointsOfPatch(unsigned int patchIndex, double * xyzPoints) const override;
773+
DLL_IMPORT_OR_EXPORT virtual void getXyzPointsOfPatch(uint64_t patchIndex, double * xyzPoints) const override;
774774

775775
/** The standard XML tag without XML namespace for serializing this data object. */
776776
DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "IjkGridRepresentation";

src/resqml2/AbstractProperty.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void AbstractProperty::loadTargetRelationships()
5757
convertDorIntoRel<EML2_NS::PropertyKind>(dor);
5858
}
5959

60-
for (unsigned int patchIndex = 0; patchIndex < getPatchCount(); ++patchIndex) {
60+
for (uint64_t patchIndex = 0; patchIndex < getPatchCount(); ++patchIndex) {
6161
dor = getHdfProxyDor(patchIndex);
6262
if (!dor.isEmpty()) {
6363
convertDorIntoRel(dor);
@@ -233,7 +233,7 @@ bool AbstractProperty::useInterval() const
233233
throw logic_error("Not implemented yet");
234234
}
235235

236-
uint64_t AbstractProperty::getElementCountPerValue() const
236+
uint64_t AbstractProperty::getValueCountPerIndexableElement() const
237237
{
238238
uint64_t result;
239239
if (gsoapProxy2_0_1 != nullptr) {

src/resqml2/AbstractProperty.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ namespace RESQML2_NS
6868
DLL_IMPORT_OR_EXPORT AbstractRepresentation* getRepresentation() const;
6969

7070
/**
71-
* Gets the count of elements per property value. If the property is a scalar one then it should
71+
* Gets the count of values per indexable element. If the property is a scalar one then it should
7272
* be one. If it is a vectorial one, then it should be more than one. It is not possible to have
7373
* some tensor property values (more dimensions than a vector)
7474
*
75-
* @returns The element count per value.
75+
* @returns The value count per indexable element.
7676
*/
77-
DLL_IMPORT_OR_EXPORT uint64_t getElementCountPerValue() const;
77+
DLL_IMPORT_OR_EXPORT uint64_t getValueCountPerIndexableElement() const;
7878

7979
/**
8080
* Gets the kind of elements on which the property values are attached to

src/resqml2/AbstractRepresentation.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ COMMON_NS::DataObjectReference AbstractRepresentation::getHdfProxyDorFromPointGe
7676
return COMMON_NS::DataObjectReference();
7777
}
7878

79-
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* AbstractRepresentation::getSeismic3dCoordinates2_0_1(unsigned int patchIndex) const
79+
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* AbstractRepresentation::getSeismic3dCoordinates2_0_1(uint64_t patchIndex) const
8080
{
8181
gsoap_resqml2_0_1::resqml20__PointGeometry* const geom = getPointGeometry2_0_1(patchIndex);
8282
if (geom == nullptr) {
@@ -90,7 +90,7 @@ gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* AbstractRepresentation::getSe
9090
return nullptr;
9191
}
9292

93-
gsoap_eml2_3::resqml22__Seismic3dCoordinates* AbstractRepresentation::getSeismic3dCoordinates2_2(unsigned int patchIndex) const
93+
gsoap_eml2_3::resqml22__Seismic3dCoordinates* AbstractRepresentation::getSeismic3dCoordinates2_2(uint64_t patchIndex) const
9494
{
9595
gsoap_eml2_3::resqml22__PointGeometry* const geom = getPointGeometry2_2(patchIndex);
9696
if (geom == nullptr) {
@@ -401,7 +401,7 @@ uint64_t AbstractRepresentation::getXyzPointCountOfAllPatches() const
401401
return result;
402402
}
403403

404-
void AbstractRepresentation::getXyzPointsOfPatchInGlobalCrs(unsigned int patchIndex, double* xyzPoints) const
404+
void AbstractRepresentation::getXyzPointsOfPatchInGlobalCrs(uint64_t patchIndex, double* xyzPoints) const
405405
{
406406
if (getLocalCrs(patchIndex)->isPartial()) {
407407
throw invalid_argument("You cannot get the points in the global CRS if the local CRS is partial");
@@ -476,7 +476,7 @@ void AbstractRepresentation::getXyzPointsOfAllPatchesInGlobalCrs(double* xyzPoin
476476
getLocalCrs(0)->convertXyzPointsToGlobalCrs(xyzPoints, getXyzPointCountOfAllPatches());
477477
}
478478

479-
AbstractRepresentation* AbstractRepresentation::getSeismicSupportOfPatch(const unsigned int& patchIndex) const
479+
AbstractRepresentation* AbstractRepresentation::getSeismicSupportOfPatch(uint64_t patchIndex) const
480480
{
481481
if (patchIndex >= getPatchCount()) {
482482
throw out_of_range("The seismic support of the patch at the specified index is out of range.");
@@ -539,7 +539,7 @@ void AbstractRepresentation::loadTargetRelationships()
539539
}
540540

541541
// CRS
542-
for (unsigned int patchIndex = 0; patchIndex < getPatchCount(); ++patchIndex) {
542+
for (uint64_t patchIndex = 0; patchIndex < getPatchCount(); ++patchIndex) {
543543
dor = getLocalCrsDor(patchIndex);
544544
if (!dor.isEmpty()) {
545545
convertDorIntoRel<EML2_NS::AbstractLocal3dCrs>(dor);
@@ -591,7 +591,7 @@ void AbstractRepresentation::loadTargetRelationships()
591591
}
592592
}
593593

594-
void AbstractRepresentation::addSeismic3dCoordinatesToPatch(unsigned int patchIndex, double* inlines, double* crosslines, uint64_t pointCount,
594+
void AbstractRepresentation::addSeismic3dCoordinatesToPatch(uint64_t patchIndex, double* inlines, double* crosslines, uint64_t pointCount,
595595
RESQML2_NS::AbstractRepresentation* seismicSupport, EML2_NS::AbstractHdfProxy* proxy)
596596
{
597597
if (gsoapProxy2_0_1 != nullptr || gsoapProxy2_3 != nullptr) {
@@ -677,7 +677,7 @@ void AbstractRepresentation::addSeismic3dCoordinatesToPatch(unsigned int patchIn
677677
}
678678
}
679679

680-
void AbstractRepresentation::addSeismic3dCoordinatesToPatch(unsigned int patchIndex, double startInline, double incrInline, unsigned int countInline,
680+
void AbstractRepresentation::addSeismic3dCoordinatesToPatch(uint64_t patchIndex, double startInline, double incrInline, unsigned int countInline,
681681
double startCrossline, double incrCrossline, unsigned int countCrossline, RESQML2_NS::AbstractRepresentation* seismicSupport)
682682
{
683683
if (gsoapProxy2_0_1 != nullptr) {
@@ -759,7 +759,7 @@ void AbstractRepresentation::addSeismic3dCoordinatesToPatch(unsigned int patchIn
759759
}
760760
}
761761

762-
void AbstractRepresentation::addSeismic2dCoordinatesToPatch(unsigned int patchIndex, double* lineAbscissa,
762+
void AbstractRepresentation::addSeismic2dCoordinatesToPatch(uint64_t patchIndex, double* lineAbscissa,
763763
RESQML2_NS::AbstractRepresentation* seismicSupport, EML2_NS::AbstractHdfProxy* proxy)
764764
{
765765
if (gsoapProxy2_0_1 != nullptr || gsoapProxy2_3 != nullptr) {
@@ -825,7 +825,7 @@ void AbstractRepresentation::addSeismic2dCoordinatesToPatch(unsigned int patchIn
825825
}
826826
}
827827

828-
void AbstractRepresentation::getSeismicLineAbscissaOfPointsOfPatch(unsigned int patchIndex, double* values) const
828+
void AbstractRepresentation::getSeismicLineAbscissaOfPointsOfPatch(uint64_t patchIndex, double* values) const
829829
{
830830
if (gsoapProxy2_0_1 != nullptr) {
831831
gsoap_resqml2_0_1::resqml20__PointGeometry* const geom = getPointGeometry2_0_1(patchIndex);
@@ -852,7 +852,7 @@ void AbstractRepresentation::getSeismicLineAbscissaOfPointsOfPatch(unsigned int
852852
}
853853
}
854854

855-
void AbstractRepresentation::getInlinesOfPointsOfPatch(unsigned int patchIndex, double* values) const
855+
void AbstractRepresentation::getInlinesOfPointsOfPatch(uint64_t patchIndex, double* values) const
856856
{
857857
if (gsoapProxy2_0_1 != nullptr) {
858858
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* seisInfo = getSeismic3dCoordinates2_0_1(patchIndex);
@@ -881,7 +881,7 @@ void AbstractRepresentation::getInlinesOfPointsOfPatch(unsigned int patchIndex,
881881
}
882882
}
883883

884-
void AbstractRepresentation::getCrosslinesOfPointsOfPatch(unsigned int patchIndex, double* values) const
884+
void AbstractRepresentation::getCrosslinesOfPointsOfPatch(uint64_t patchIndex, double* values) const
885885
{
886886
if (gsoapProxy2_0_1 != nullptr) {
887887
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* seisInfo = getSeismic3dCoordinates2_0_1(patchIndex);

src/resqml2/AbstractRepresentation.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ namespace RESQML2_NS
162162
*
163163
* @returns The xyz point count of the patch at position @p patchIndex.
164164
*/
165-
DLL_IMPORT_OR_EXPORT virtual uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const = 0;
165+
DLL_IMPORT_OR_EXPORT virtual uint64_t getXyzPointCountOfPatch(uint64_t patchIndex) const = 0;
166166

167167
/**
168168
* Get the xyz point count of all patches of this representation.
@@ -184,7 +184,7 @@ namespace RESQML2_NS
184184
* dimension. It must be preallocated with a size of <tt>3 *
185185
* getXyzPointCountOfPatch(patchIndex)</tt>.
186186
*/
187-
DLL_IMPORT_OR_EXPORT virtual void getXyzPointsOfPatch(unsigned int patchIndex, double * xyzPoints) const = 0;
187+
DLL_IMPORT_OR_EXPORT virtual void getXyzPointsOfPatch(uint64_t patchIndex, double * xyzPoints) const = 0;
188188

189189
/**
190190
* @brief Gets all the xyz points of a particular patch of this representation. xyz points are given in
@@ -198,7 +198,7 @@ namespace RESQML2_NS
198198
* dimension. It must be preallocated with a size of <tt>3 *
199199
* getXyzPointCountOfPatch(patchIndex)</tt>.
200200
*/
201-
DLL_IMPORT_OR_EXPORT void getXyzPointsOfPatchInGlobalCrs(unsigned int patchIndex, double * xyzPoints) const;
201+
DLL_IMPORT_OR_EXPORT void getXyzPointsOfPatchInGlobalCrs(uint64_t patchIndex, double * xyzPoints) const;
202202

203203
/**
204204
* @brief Gets all the xyz points of all patches of this representation. xyz points are given in the
@@ -248,7 +248,7 @@ namespace RESQML2_NS
248248
* @returns Null if no seismic information have been provided for the patch at position @p
249249
* patchIndex. Else, its seismic support.
250250
*/
251-
DLL_IMPORT_OR_EXPORT AbstractRepresentation* getSeismicSupportOfPatch(const unsigned int & patchIndex) const;
251+
DLL_IMPORT_OR_EXPORT AbstractRepresentation* getSeismicSupportOfPatch(uint64_t patchIndex) const;
252252

253253
/**
254254
* Gets all seismic supports of the current geometry of this representation (that is to say the
@@ -299,7 +299,7 @@ namespace RESQML2_NS
299299
* values. It must be already opened for writing and won't be
300300
* closed in this method.
301301
*/
302-
DLL_IMPORT_OR_EXPORT void addSeismic3dCoordinatesToPatch(unsigned int patchIndex, double* inlines, double* crosslines, uint64_t pointCount,
302+
DLL_IMPORT_OR_EXPORT void addSeismic3dCoordinatesToPatch(uint64_t patchIndex, double* inlines, double* crosslines, uint64_t pointCount,
303303
RESQML2_NS::AbstractRepresentation* seismicSupport, EML2_NS::AbstractHdfProxy* proxy);
304304

305305
/**
@@ -320,7 +320,7 @@ namespace RESQML2_NS
320320
* @param countCrossline The crossline count.
321321
* @param [in] seismicSupport The representation of the seismic line.
322322
*/
323-
DLL_IMPORT_OR_EXPORT void addSeismic3dCoordinatesToPatch(unsigned int patchIndex, double startInline, double incrInline, unsigned int countInline,
323+
DLL_IMPORT_OR_EXPORT void addSeismic3dCoordinatesToPatch(uint64_t patchIndex, double startInline, double incrInline, unsigned int countInline,
324324
double startCrossline, double incrCrossline, unsigned int countCrossline,
325325
RESQML2_NS::AbstractRepresentation* seismicSupport);
326326

@@ -342,7 +342,7 @@ namespace RESQML2_NS
342342
* must be already opened for writing and won't be closed in
343343
* this method.
344344
*/
345-
DLL_IMPORT_OR_EXPORT void addSeismic2dCoordinatesToPatch(unsigned int patchIndex, double* lineAbscissa,
345+
DLL_IMPORT_OR_EXPORT void addSeismic2dCoordinatesToPatch(uint64_t patchIndex, double* lineAbscissa,
346346
RESQML2_NS::AbstractRepresentation * seismicSupport, EML2_NS::AbstractHdfProxy * proxy);
347347

348348
/**
@@ -356,7 +356,7 @@ namespace RESQML2_NS
356356
* @param [out] values The array where the abscissa are going to be stored. The count of
357357
* this array must be equal to <tt>getXyzPointCountOfPatch(patchIndex)</tt>.
358358
*/
359-
DLL_IMPORT_OR_EXPORT void getSeismicLineAbscissaOfPointsOfPatch(unsigned int patchIndex, double* values) const;
359+
DLL_IMPORT_OR_EXPORT void getSeismicLineAbscissaOfPointsOfPatch(uint64_t patchIndex, double* values) const;
360360

361361
/**
362362
* Gets all the inline coordinates of the points of a specific patch related to seismic lattice.
@@ -370,7 +370,7 @@ namespace RESQML2_NS
370370
* count of this array must be equal to
371371
* <tt>getXyzPointCountOfPatch(patchIndex)</tt>.
372372
*/
373-
DLL_IMPORT_OR_EXPORT void getInlinesOfPointsOfPatch(unsigned int patchIndex, double * values) const;
373+
DLL_IMPORT_OR_EXPORT void getInlinesOfPointsOfPatch(uint64_t patchIndex, double * values) const;
374374

375375
/**
376376
* Gets all the crossline coordinates of the points of a specific patch related to seismic
@@ -385,7 +385,7 @@ namespace RESQML2_NS
385385
* count of this array must be equal to
386386
* <tt>getXyzPointCountOfPatch(patchIndex)</tt>.
387387
*/
388-
DLL_IMPORT_OR_EXPORT void getCrosslinesOfPointsOfPatch(unsigned int patchIndex, double * values) const;
388+
DLL_IMPORT_OR_EXPORT void getCrosslinesOfPointsOfPatch(uint64_t patchIndex, double * values) const;
389389

390390
/** The standard XML tag without XML namespace for serializing this data object */
391391
static constexpr char const* XML_TAG = "AbstractRepresentation";
@@ -505,7 +505,7 @@ namespace RESQML2_NS
505505
*
506506
* @returns Null if it fails, else the seismic 3D coordinates.
507507
*/
508-
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* getSeismic3dCoordinates2_0_1(unsigned int patchIndex) const;
508+
gsoap_resqml2_0_1::resqml20__Seismic3dCoordinates* getSeismic3dCoordinates2_0_1(uint64_t patchIndex) const;
509509

510510
/**
511511
* Gets seismic 3D coordinates
@@ -514,6 +514,6 @@ namespace RESQML2_NS
514514
*
515515
* @returns Null if it fails, else the seismic 3D coordinates.
516516
*/
517-
gsoap_eml2_3::resqml22__Seismic3dCoordinates* getSeismic3dCoordinates2_2(unsigned int patchIndex) const;
517+
gsoap_eml2_3::resqml22__Seismic3dCoordinates* getSeismic3dCoordinates2_2(uint64_t patchIndex) const;
518518
};
519519
}

src/resqml2/AbstractValuesProperty.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ namespace RESQML2_NS
297297
}
298298

299299
if (forceStatisticsComputation) {
300-
return COMMON_NS::NumberArrayStatistics<T>(values, getValuesCountOfPatch(patchIndex), getElementCountPerValue(), nullValue);
300+
return COMMON_NS::NumberArrayStatistics<T>(values, getValuesCountOfPatch(patchIndex), getValueCountPerIndexableElement(), nullValue);
301301
}
302302

303303
return getStatistics<T>(patchIndex);
@@ -1908,7 +1908,7 @@ namespace RESQML2_NS
19081908
}
19091909
}
19101910
else if (gsoapProxy2_3 != nullptr) {
1911-
const auto valuePerIndexableElement = getElementCountPerValue();
1911+
const auto valuePerIndexableElement = getValueCountPerIndexableElement();
19121912
gsoap_eml2_3::resqml22__AbstractValuesProperty* prop = static_cast<gsoap_eml2_3::resqml22__AbstractValuesProperty*>(gsoapProxy2_3);
19131913
if (auto* integerArray = dynamic_cast<gsoap_eml2_3::eml23__AbstractIntegerArray*>(prop->ValuesForPatch.at(patchIndex))) {
19141914
if constexpr (std::is_integral_v<T>) {

src/resqml2/CommentProperty.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void CommentProperty::pushBackStringHdf5ArrayOfValues(const std::vector<std::str
7373
const string datasetName = pushBackRefToExistingDataset(proxy, getHdfGroup() + "/values_patch" + std::to_string(getPatchCount()));
7474
}
7575

76-
std::vector<std::string> CommentProperty::getStringValuesOfPatch(unsigned int patchIndex)
76+
std::vector<std::string> CommentProperty::getStringValuesOfPatch(uint64_t patchIndex)
7777
{
7878
std::vector<std::string> result;
7979

0 commit comments

Comments
 (0)