Skip to content

Commit

Permalink
Merge pull request #316 from F2I-Consulting/dev
Browse files Browse the repository at this point in the history
v2.8.0.0
  • Loading branch information
philippeVerney authored Jun 19, 2023
2 parents 837d42d + e47f072 commit 79babc0
Show file tree
Hide file tree
Showing 24 changed files with 334 additions and 465 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ set (FESAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

# version mechanism
set (Fesapi_VERSION_MAJOR 2)
set (Fesapi_VERSION_MINOR 7)
set (Fesapi_VERSION_PATCH 1)
set (Fesapi_VERSION_MINOR 8)
set (Fesapi_VERSION_PATCH 0)
set (Fesapi_VERSION_TWEAK 0)

set (Fesapi_VERSION ${Fesapi_VERSION_MAJOR}.${Fesapi_VERSION_MINOR}.${Fesapi_VERSION_PATCH}.${Fesapi_VERSION_TWEAK})
Expand Down
1 change: 0 additions & 1 deletion cmake/swigCsInclude.i
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,6 @@ namespace RESQML2_NS
PointsProperty*,
PolylineRepresentation*,
PolylineSetRepresentation*,
PropertySet*,
RepresentationSetRepresentation*,
RockFluidOrganizationInterpretation*,
RockFluidUnitInterpretation*,
Expand Down
1 change: 0 additions & 1 deletion cmake/swigJavaInclude.i
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,6 @@ namespace RESQML2_NS
PointsProperty*,
PolylineRepresentation*,
PolylineSetRepresentation*,
PropertySet*,
RepresentationSetRepresentation*,
RockFluidOrganizationInterpretation*,
RockFluidUnitInterpretation*,
Expand Down
1 change: 0 additions & 1 deletion cmake/swigPythonInclude.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ namespace RESQML2_NS
PointsProperty*,
PolylineRepresentation*,
PolylineSetRepresentation*,
PropertySet*,
RepresentationSetRepresentation*,
RockFluidOrganizationInterpretation*,
RockFluidUnitInterpretation*,
Expand Down
6 changes: 3 additions & 3 deletions example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ void serializeGrid(COMMON_NS::DataObjectRepository * pck, EML2_NS::AbstractHdfPr
int64_t prop2Values[2] = { 10, 11 };
discreteProp2->pushBackInt64Hdf5Array3dOfValues(prop2Values, 2, 1, 1, hdfProxy, 1111);

RESQML2_NS::PropertySet* propSet = pck->createPropertySet("", "Testing property set", false, true,gsoap_resqml2_0_1::resqml20__TimeSetKind::not_x0020a_x0020time_x0020set);
RESQML2_0_1_NS::PropertySet* propSet = pck->createPropertySet("", "Testing property set", false, true,gsoap_resqml2_0_1::resqml20__TimeSetKind::not_x0020a_x0020time_x0020set);
propSet->pushBackProperty(discreteProp1);
propSet->pushBackProperty(discreteProp2);

Expand Down Expand Up @@ -2525,9 +2525,9 @@ void showAllProperties(RESQML2_NS::AbstractRepresentation const * rep, bool* ena
RESQML2_NS::AbstractProperty const * prop = propertySet[propIndex];
showAllMetadata(prop, "\t");

std::vector<RESQML2_NS::PropertySet *> propSets = prop->getPropertySets();
std::vector<RESQML2_0_1_NS::PropertySet *> propSets = prop->getPropertySets();
for (size_t propSetIndex = 0; propSetIndex < propSets.size(); ++propSetIndex) {
RESQML2_NS::PropertySet* propSet = propSets[propSetIndex];
RESQML2_0_1_NS::PropertySet* propSet = propSets[propSetIndex];
std::cout << "\tContained in property set : ";
showAllMetadata(propSet, "\t");
}
Expand Down
3 changes: 2 additions & 1 deletion src/common/DataObjectRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ EML2_NS::PropertyKind* DataObjectRepository::createPropertyKind(const std::strin
}
}

RESQML2_NS::PropertySet* DataObjectRepository::createPropertySet(const std::string & guid, const std::string & title,
RESQML2_0_1_NS::PropertySet* DataObjectRepository::createPropertySet(const std::string & guid, const std::string & title,
bool hasMultipleRealizations, bool hasSinglePropertyKind, gsoap_resqml2_0_1::resqml20__TimeSetKind timeSetKind)
{
return new RESQML2_0_1_NS::PropertySet(this, guid, title, hasMultipleRealizations, hasSinglePropertyKind, timeSetKind);
Expand Down Expand Up @@ -2844,6 +2844,7 @@ GETTER_DATAOBJECTS_IMPL(RESQML2_NS::UnstructuredGridRepresentation, Unstructured
GETTER_DATAOBJECTS_IMPL(RESQML2_NS::WellboreFeature, Wellbore)
GETTER_DATAOBJECTS_IMPL(RESQML2_NS::WellboreTrajectoryRepresentation, WellboreTrajectoryRepresentation)
GETTER_DATAOBJECTS_IMPL(RESQML2_NS::WellboreFrameRepresentation, WellboreFrameRepresentation)
GETTER_DATAOBJECTS_IMPL(RESQML2_0_1_NS::PropertySet, PropertySet)

GETTER_DATAOBJECTS_IMPL(WITSML2_NS::Well, WitsmlWell)
GETTER_DATAOBJECTS_IMPL(WITSML2_NS::Wellbore, WitsmlWellbore)
Expand Down
6 changes: 4 additions & 2 deletions src/common/DataObjectRepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ namespace RESQML2_NS
class PointsProperty;
class PolylineRepresentation;
class PolylineSetRepresentation;
class PropertySet;
class RepresentationSetRepresentation;
class RockFluidOrganizationInterpretation;
class RockFluidUnitInterpretation;
Expand Down Expand Up @@ -123,6 +122,7 @@ namespace RESQML2_0_1_NS
class Horizon;
class PointsProperty;
class PropertyKind;
class PropertySet;
class RockFluidUnitFeature;
class SeismicLineFeature;
class TectonicBoundaryFeature;
Expand Down Expand Up @@ -588,6 +588,8 @@ namespace COMMON_NS
GETTER_DATAOBJECTS(RESQML2_NS::WellboreTrajectoryRepresentation, WellboreTrajectoryRepresentation)
GETTER_DATAOBJECTS(RESQML2_NS::WellboreFrameRepresentation, WellboreFrameRepresentation)

GETTER_DATAOBJECTS(RESQML2_0_1_NS::PropertySet, PropertySet)

GETTER_DATAOBJECTS(WITSML2_NS::Well, WitsmlWell)
GETTER_DATAOBJECTS(WITSML2_NS::Wellbore, WitsmlWellbore)
GETTER_DATAOBJECTS(WITSML2_NS::Trajectory, WitsmlTrajectory)
Expand Down Expand Up @@ -2737,7 +2739,7 @@ namespace COMMON_NS
*
* @returns A pointer to the new property set.
*/
DLL_IMPORT_OR_EXPORT RESQML2_NS::PropertySet* createPropertySet(const std::string & guid, const std::string & title,
DLL_IMPORT_OR_EXPORT RESQML2_0_1_NS::PropertySet* createPropertySet(const std::string & guid, const std::string & title,
bool hasMultipleRealizations, bool hasSinglePropertyKind, gsoap_resqml2_0_1::resqml20__TimeSetKind timeSetKind);

/**
Expand Down
26 changes: 7 additions & 19 deletions src/resqml2/AbstractProperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ under the License.
#include "../eml2/TimeSeries.h"

#include "AbstractRepresentation.h"
#include "PropertySet.h"
#include "AbstractLocal3dCrs.h"

#include "../resqml2_0_1/PropertyKindMapper.h"
#include "../resqml2_0_1/PropertySet.h"

using namespace RESQML2_NS;
using namespace std;
Expand Down Expand Up @@ -279,31 +279,19 @@ gsoap_eml2_3::eml23__IndexableElement AbstractProperty::getAttachmentKind() cons
throw logic_error("Not implemented yet");
}

std::vector<RESQML2_NS::PropertySet *> AbstractProperty::getPropertySets() const
std::vector<RESQML2_0_1_NS::PropertySet *> AbstractProperty::getPropertySets() const
{
return repository->getSourceObjects<RESQML2_NS::PropertySet>(this);
return repository->getSourceObjects<RESQML2_0_1_NS::PropertySet>(this);
}

unsigned int AbstractProperty::getPropertySetCount() const
uint64_t AbstractProperty::getPropertySetCount() const
{
const std::vector<RESQML2_NS::PropertySet *> & propSets = getPropertySets();

if (propSets.size() > (std::numeric_limits<unsigned int>::max)()) {
throw range_error("Too much property set containing this property");
}

return static_cast<unsigned int>(propSets.size());
return getPropertySets().size();
}

RESQML2_NS::PropertySet * AbstractProperty::getPropertySet(unsigned int index) const
RESQML2_0_1_NS::PropertySet * AbstractProperty::getPropertySet(uint64_t index) const
{
const std::vector<RESQML2_NS::PropertySet *> & propSets = getPropertySets();

if (index < propSets.size()) {
return propSets[index];
}

throw out_of_range("The index of the prop Set is out of range");
return getPropertySets().at(index);
}

void AbstractProperty::setLocalCrs(AbstractLocal3dCrs * crs)
Expand Down
10 changes: 6 additions & 4 deletions src/resqml2/AbstractProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace RESQML2_NS
*
* @returns A vector of all property sets which contain this property.
*/
DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::PropertySet *> getPropertySets() const;
DLL_IMPORT_OR_EXPORT std::vector<RESQML2_0_1_NS::PropertySet *> getPropertySets() const;

/**
* Gets the count of property sets which contain this property
Expand All @@ -156,7 +156,7 @@ namespace RESQML2_NS
*
* @returns The count of property sets which contain this property.
*/
DLL_IMPORT_OR_EXPORT unsigned int getPropertySetCount() const;
DLL_IMPORT_OR_EXPORT uint64_t getPropertySetCount() const;

/**
* Gets a given property set taken from all property sets which contain this property
Expand All @@ -167,7 +167,7 @@ namespace RESQML2_NS
*
* @returns The property set at @p index.
*/
DLL_IMPORT_OR_EXPORT RESQML2_NS::PropertySet * getPropertySet(unsigned int index) const;
DLL_IMPORT_OR_EXPORT RESQML2_0_1_NS::PropertySet * getPropertySet(uint64_t index) const;

//*********************************************
//****************** CRS **********************
Expand Down Expand Up @@ -206,7 +206,7 @@ namespace RESQML2_NS
/**
* Checks if this property has at least one realization index. Realization index is used if the property is
* the result of a multi-realization process.
* Reamrk : v2.0.1 is constrained to have a maximum of one realisation index
* Remark : v2.0.1 is constrained to have a maximum of one realisation index
*
* @returns True if the property has at least one realization index, false if not.
*/
Expand All @@ -216,6 +216,7 @@ namespace RESQML2_NS
* Gets the realization index of this property. Realization index is used if the property is the
* result of a multi-realization process. You should have checked before that this property
* actually has a realization index.
* Remark : v2.0.1 is constrained to have a maximum of one realisation index
*
* @exception std::invalid_argument If this property has actually no realization index.
*
Expand All @@ -242,6 +243,7 @@ namespace RESQML2_NS
* @exception std::logic_error If no supported gSOAP proxy is available.
*
* @param realizationIndices The realization indices to set to this property.
* Remark : v2.0.1 is constrained to have a maximum of one realisation index
* @param [in,out] hdfProxy (Optional) The HDF proxy where to store @p
* realizationIndices values. If @p nullptr (default), then
* the repository default HDF proxy will be used.
Expand Down
2 changes: 0 additions & 2 deletions src/resqml2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ set(FESAPI_RESQML_2_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/Abstr
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PointsProperty.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PolylineRepresentation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PolylineSetRepresentation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PropertySet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/RepresentationSetRepresentation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/RockFluidOrganizationInterpretation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/SealedVolumeFrameworkRepresentation.cpp
Expand Down Expand Up @@ -105,7 +104,6 @@ set(FESAPI_RESQML_2_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/Abstr
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PointsProperty.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PolylineRepresentation.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PolylineSetRepresentation.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/PropertySet.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/RepresentationSetRepresentation.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/RockFluidOrganizationInterpretation.h
${CMAKE_CURRENT_SOURCE_DIR}/${RESQML_PREFIX_2}/RockFluidUnitInterpretation.h
Expand Down
138 changes: 0 additions & 138 deletions src/resqml2/PropertySet.cpp

This file was deleted.

Loading

0 comments on commit 79babc0

Please sign in to comment.