Fesapi 2.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
PointsProperty.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "AbstractProperty.h"
22
23namespace RESQML2_NS
24{
26 class PointsProperty : public AbstractProperty
27 {
28 public:
29
33 virtual ~PointsProperty() = default;
34
40 DLL_IMPORT_OR_EXPORT COMMON_NS::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const final;
41
47 DLL_IMPORT_OR_EXPORT std::vector<uint32_t> getValuesCountPerDimensionOfPatch(uint64_t patchIndex) const final;
48
59 DLL_IMPORT_OR_EXPORT uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const {
60 return getValuesCountOfPatch(patchIndex) / 3;
61 }
62
68 DLL_IMPORT_OR_EXPORT uint64_t getXyzPointCountOfAllPatches() const;
69
83 DLL_IMPORT_OR_EXPORT void getXyzPointsOfPatch(unsigned int patchIndex, double * xyzPoints) const;
84
97 DLL_IMPORT_OR_EXPORT void getXyzPointsOfPatchInGlobalCrs(unsigned int patchIndex, double * xyzPoints) const;
98
108 DLL_IMPORT_OR_EXPORT void getXyzPointsOfAllPatches(double * xyzPoints) const;
109
119 DLL_IMPORT_OR_EXPORT void getXyzPointsOfAllPatchesInGlobalCrs(double * xyzPoints) const;
120
135 DLL_IMPORT_OR_EXPORT void pushBackArray1dOfXyzPoints(const double * xyzPoints, uint64_t pointCount, EML2_NS::AbstractHdfProxy* proxy = nullptr);
136
155 DLL_IMPORT_OR_EXPORT void pushBackArray2dOfXyzPoints(const double * xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
156
177 DLL_IMPORT_OR_EXPORT void pushBackArray3dOfXyzPoints(const double * xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInMiddleDim, uint64_t pointCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
178
196 DLL_IMPORT_OR_EXPORT void pushBackArrayOfXyzPoints(double const * xyzPoints, uint64_t const * pointCountByDimension, uint32_t numArrayDimensions, EML2_NS::AbstractHdfProxy* proxy = nullptr);
197
216 DLL_IMPORT_OR_EXPORT virtual std::string pushBackRefToExistingDataset(EML2_NS::AbstractHdfProxy* proxy, const std::string & datasetName = "") = 0;
217
226 bool validatePropertyKindAssociation(EML2_NS::PropertyKind*) final {
227 return true;
228 }
229
238 bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final {
239 return true;
240 }
241
243 DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
244
245 DLL_IMPORT_OR_EXPORT std::string getXmlTag() const final { return XML_TAG; }
246
247 protected:
248
254 DLL_IMPORT_OR_EXPORT PointsProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractProperty(partialObject) {}
255
260 PointsProperty() {}
261
267 PointsProperty(gsoap_resqml2_0_1::_resqml20__PointsProperty* fromGsoap) : RESQML2_NS::AbstractProperty(fromGsoap) {}
268 PointsProperty(gsoap_eml2_3::resqml22__PointsProperty* fromGsoap) : RESQML2_NS::AbstractProperty(fromGsoap) {}
269
270 virtual EML2_NS::AbstractHdfProxy* getValuesHdfProxyAndDatasetPathOfPatch(unsigned int patchIndex, std::string & datasetPath) const = 0;
271 };
272}
Proxy class for an abstract property.
Definition AbstractProperty.h:37
uint64_t getValuesCountOfPatch(uint64_t patchIndex) const
Proxy class for an points property.
Definition PointsProperty.h:27
void pushBackArrayOfXyzPoints(double const *xyzPoints, uint64_t const *pointCountByDimension, uint32_t numArrayDimensions, eml2::AbstractHdfProxy *proxy=nullptr)
Adds an nd array of points (in local CRS) to the property.
void getXyzPointsOfAllPatches(double *xyzPoints) const
Gets all the xyz points of all patches of this property. xyz points are given in the local CRS.
void pushBackArray2dOfXyzPoints(const double *xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInSlowestDim, eml2::AbstractHdfProxy *proxy=nullptr)
Adds a 2d array of points (in local CRS) to the property.
std::string getXmlTag() const final
Definition PointsProperty.h:245
void pushBackArray1dOfXyzPoints(const double *xyzPoints, uint64_t pointCount, eml2::AbstractHdfProxy *proxy=nullptr)
Adds a 1d array of points (in local CRS) to the property.
void pushBackArray3dOfXyzPoints(const double *xyzPoints, uint64_t pointCountInFastestDim, uint64_t pointCountInMiddleDim, uint64_t pointCountInSlowestDim, eml2::AbstractHdfProxy *proxy=nullptr)
Adds a 3d array of points (in local CRS) to the property.
void getXyzPointsOfAllPatchesInGlobalCrs(double *xyzPoints) const
uint64_t getXyzPointCountOfAllPatches() const
bool validatePropertyKindAssociation(eml2::PropertyKind *) final
Definition PointsProperty.h:226
bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final
Definition PointsProperty.h:238
std::vector< uint32_t > getValuesCountPerDimensionOfPatch(uint64_t patchIndex) const final
virtual ~PointsProperty()=default
virtual std::string pushBackRefToExistingDataset(eml2::AbstractHdfProxy *proxy, const std::string &datasetName="")=0
void getXyzPointsOfPatchInGlobalCrs(unsigned int patchIndex, double *xyzPoints) const
Gets all the xyz points of a particular patch of this property. xyz points are given in the global CR...
static const char * XML_TAG
Definition PointsProperty.h:243
common::AbstractObject::numericalDatatypeEnum getValuesHdfDatatype() const final
void getXyzPointsOfPatch(unsigned int patchIndex, double *xyzPoints) const
Gets all the xyz points of a particular patch of this property. xyz points are given in the local CRS...
uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const
Definition PointsProperty.h:59