Fesapi 2.3.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
DiscreteProperty.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 "AbstractValuesProperty.h"
22
23#include <limits>
24
25namespace RESQML2_NS
26{
33 class DiscreteProperty : public RESQML2_NS::AbstractValuesProperty
34 {
35 public:
36
38 virtual ~DiscreteProperty() = default;
39
57 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array1dOfValues(const int64_t * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue);
58 using AbstractValuesProperty::pushBackLongHdf5Array1dOfValues;
59
65 DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array1dOfValues(const int * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int nullValue, int minimumValue, int maximumValue);
66 using AbstractValuesProperty::pushBackIntHdf5Array1dOfValues;
67
73 DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array1dOfValues(const short * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, short nullValue, short minimumValue, short maximumValue);
74 using AbstractValuesProperty::pushBackShortHdf5Array1dOfValues;
75
81 DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array1dOfValues(const char * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, char nullValue, char minimumValue, char maximumValue);
82 using AbstractValuesProperty::pushBackCharHdf5Array1dOfValues;
83
104 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array2dOfValues(const int64_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue);
105 using AbstractValuesProperty::pushBackLongHdf5Array2dOfValues;
106
112 DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array2dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue, int minimumValue, int maximumValue);
113 using AbstractValuesProperty::pushBackIntHdf5Array2dOfValues;
114
120 DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array2dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue, short minimumValue, short maximumValue);
121 using AbstractValuesProperty::pushBackShortHdf5Array2dOfValues;
122
128 DLL_IMPORT_OR_EXPORT void pushBackUShortHdf5Array2dOfValues(const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue);
129 using AbstractValuesProperty::pushBackUShortHdf5Array2dOfValues;
130
136 DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array2dOfValues(const char * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, char nullValue, char minimumValue, char maximumValue);
137 using AbstractValuesProperty::pushBackCharHdf5Array2dOfValues;
138
161 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array3dOfValues(const int64_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue);
162 using AbstractValuesProperty::pushBackLongHdf5Array3dOfValues;
163
169 DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array3dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue, int minimumValue, int maximumValue);
170 using AbstractValuesProperty::pushBackIntHdf5Array3dOfValues;
171
177 DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array3dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue, short minimumValue, short maximumValue);
178 using AbstractValuesProperty::pushBackShortHdf5Array3dOfValues;
179
185 DLL_IMPORT_OR_EXPORT void pushBackUShortHdf5Array3dOfValues(const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue);
186 using AbstractValuesProperty::pushBackUShortHdf5Array3dOfValues;
187
193 DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array3dOfValues(const char * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, char nullValue, char minimumValue, char maximumValue);
194 using AbstractValuesProperty::pushBackCharHdf5Array3dOfValues;
195
213 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5ArrayOfValues(const int64_t * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue) final;
214
220 DLL_IMPORT_OR_EXPORT void pushBackIntHdf5ArrayOfValues(const int * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue) final;
221
227 DLL_IMPORT_OR_EXPORT void pushBackShortHdf5ArrayOfValues(const short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue) final;
228
234 DLL_IMPORT_OR_EXPORT void pushBackUShortHdf5ArrayOfValues(const unsigned short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue) final;
235
241 DLL_IMPORT_OR_EXPORT void pushBackCharHdf5ArrayOfValues(const char * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, char nullValue) final;
242
266 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5ArrayOfValues(const int64_t * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue);
267
273 DLL_IMPORT_OR_EXPORT void pushBackIntHdf5ArrayOfValues(const int * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue, int minimumValue, int maximumValue);
274
280 DLL_IMPORT_OR_EXPORT void pushBackShortHdf5ArrayOfValues(const short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue, short minimumValue, short maximumValue);
281
287 DLL_IMPORT_OR_EXPORT void pushBackUShortHdf5ArrayOfValues(const unsigned short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue);
288
294 DLL_IMPORT_OR_EXPORT void pushBackCharHdf5ArrayOfValues(const char * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, char nullValue, char minimumValue, char maximumValue);
295
319 DLL_IMPORT_OR_EXPORT virtual std::string pushBackRefToExistingIntegerDataset(EML2_NS::AbstractHdfProxy* proxy, const std::string & datasetName, int64_t nullValue, int64_t minimumValue, int64_t maximumValue) = 0;
320 using AbstractValuesProperty::pushBackRefToExistingIntegerDataset;
321
322 //***************************
323 //*** For hyperslabbing *****
324 //***************************
325
352 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5ArrayOfValues(
353 unsigned long long* numValues,
354 unsigned int numArrayDimensions,
355 int64_t* minimumValue, int64_t* maximumValue,
356 int64_t nullValue = (std::numeric_limits<int64_t>::max)(),
357 EML2_NS::AbstractHdfProxy* proxy = nullptr);
358 using AbstractValuesProperty::pushBackLongHdf5ArrayOfValues;
359
384 DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array3dOfValues(
385 uint64_t valueCountInFastestDim,
386 uint64_t valueCountInMiddleDim,
387 uint64_t valueCountInSlowestDim,
388 int64_t minimumValue, int64_t maximumValue,
389 int64_t nullValue = (std::numeric_limits<int64_t>::max)(),
390 EML2_NS::AbstractHdfProxy* proxy = nullptr);
391
430 DLL_IMPORT_OR_EXPORT void setValuesOfLongHdf5Array3dOfValues(
431 int64_t* values,
432 uint64_t valueCountInFastestDim,
433 uint64_t valueCountInMiddleDim,
434 uint64_t valueCountInSlowestDim,
435 uint64_t offsetInFastestDim,
436 uint64_t offsetInMiddleDim,
437 uint64_t offsetInSlowestDim,
438 bool computeMinMax,
439 EML2_NS::AbstractHdfProxy* proxy = nullptr,
440 unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)());
441 using AbstractValuesProperty::setValuesOfLongHdf5Array3dOfValues;
442
474 DLL_IMPORT_OR_EXPORT void setValuesOfLongHdf5ArrayOfValues(
475 int64_t* values,
476 unsigned long long const * numValues,
477 unsigned long long const * offsetValues,
478 unsigned int numArrayDimensions,
479 bool computeMinMax,
480 EML2_NS::AbstractHdfProxy* proxy = nullptr,
481 unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)());
482
491 DLL_IMPORT_OR_EXPORT virtual int64_t getNullValue(unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)()) const = 0;
492
503 DLL_IMPORT_OR_EXPORT virtual bool hasMinimumValue(unsigned int index = 0) const = 0;
504
520 DLL_IMPORT_OR_EXPORT virtual int64_t getMinimumValue(unsigned int index = 0) const = 0;
521
532 DLL_IMPORT_OR_EXPORT virtual bool hasMaximumValue(unsigned int index = 0) const = 0;
533
549 DLL_IMPORT_OR_EXPORT virtual int64_t getMaximumValue(unsigned int index = 0) const = 0;
550
560 DLL_IMPORT_OR_EXPORT virtual void setMinimumValue(int64_t value, unsigned int index = 0) const = 0;
561
571 DLL_IMPORT_OR_EXPORT virtual void setMaximumValue(int64_t value, unsigned int index = 0) const = 0;
572
574 DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
575
576 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
577
578 protected:
579
585 DiscreteProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::AbstractValuesProperty(partialObject) {}
586
588 DiscreteProperty() {}
589
595 DiscreteProperty(gsoap_resqml2_0_1::_resqml20__DiscreteProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
596
602 DiscreteProperty(gsoap_eml2_3::_resqml22__DiscreteProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
603
604 virtual size_t getMinimumValueSize() const = 0;
605 virtual size_t getMaximumValueSize() const = 0;
606 };
607}
Proxy class for an abstract values property.
Definition: AbstractValuesProperty.h:28
Proxy class for a discrete property. Such property contains discrete integer values; typically used t...
Definition: DiscreteProperty.h:34
void pushBackCharHdf5ArrayOfValues(const char *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, char nullValue) final
void pushBackIntHdf5ArrayOfValues(const int *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, int nullValue) final
void pushBackUShortHdf5ArrayOfValues(const unsigned short *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue)
virtual std::string pushBackRefToExistingIntegerDataset(eml2::AbstractHdfProxy *proxy, const std::string &datasetName, int64_t nullValue, int64_t minimumValue, int64_t maximumValue)=0
virtual int64_t getMaximumValue(unsigned int index=0) const =0
Gets the maximum value of a non vector property or the maximum value of one given value of a vector p...
void pushBackShortHdf5Array3dOfValues(const short *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, short nullValue, short minimumValue, short maximumValue)
void pushBackLongHdf5Array3dOfValues(uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, int64_t minimumValue, int64_t maximumValue, int64_t nullValue=(std::numeric_limits< int64_t >::max)(), eml2::AbstractHdfProxy *proxy=nullptr)
void pushBackShortHdf5Array1dOfValues(const short *values, uint64_t valueCount, eml2::AbstractHdfProxy *proxy, short nullValue, short minimumValue, short maximumValue)
void pushBackLongHdf5Array1dOfValues(const int64_t *values, uint64_t valueCount, eml2::AbstractHdfProxy *proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue)
Adds a 1d array of explicit long values to the property values.
void pushBackIntHdf5Array1dOfValues(const int *values, uint64_t valueCount, eml2::AbstractHdfProxy *proxy, int nullValue, int minimumValue, int maximumValue)
void pushBackCharHdf5Array1dOfValues(const char *values, uint64_t valueCount, eml2::AbstractHdfProxy *proxy, char nullValue, char minimumValue, char maximumValue)
void pushBackUShortHdf5Array2dOfValues(const unsigned short *values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue)
void pushBackLongHdf5ArrayOfValues(unsigned long long *numValues, unsigned int numArrayDimensions, int64_t *minimumValue, int64_t *maximumValue, int64_t nullValue=(std::numeric_limits< int64_t >::max)(), eml2::AbstractHdfProxy *proxy=nullptr)
virtual void setMaximumValue(int64_t value, unsigned int index=0) const =0
Sets the maximum value of a non vector property or the maximum value of one given value of a vector p...
void setValuesOfLongHdf5Array3dOfValues(int64_t *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, uint64_t offsetInFastestDim, uint64_t offsetInMiddleDim, uint64_t offsetInSlowestDim, bool computeMinMax, eml2::AbstractHdfProxy *proxy=nullptr, unsigned int patchIndex=(std::numeric_limits< unsigned int >::max)())
void pushBackLongHdf5Array2dOfValues(const int64_t *values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue)
Adds a 2d array of explicit long values to the property values.
void pushBackLongHdf5ArrayOfValues(const int64_t *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, int64_t nullValue) final
Adds an nd array of explicit long values to the property values.
void pushBackCharHdf5Array3dOfValues(const char *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, char nullValue, char minimumValue, char maximumValue)
static const char * XML_TAG
Definition: DiscreteProperty.h:574
virtual ~DiscreteProperty()=default
void pushBackIntHdf5Array3dOfValues(const int *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, int nullValue, int minimumValue, int maximumValue)
virtual void setMinimumValue(int64_t value, unsigned int index=0) const =0
Sets the minimum value of a non vector property or the minimum value of one given value of a vector p...
void pushBackShortHdf5ArrayOfValues(const short *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, short nullValue, short minimumValue, short maximumValue)
virtual int64_t getNullValue(unsigned int patchIndex=(std::numeric_limits< unsigned int >::max)()) const =0
Gets the null value in this discrete property.
virtual int64_t getMinimumValue(unsigned int index=0) const =0
Gets the minimum value of a non vector property or the minimum value of one given value of a vector p...
virtual bool hasMinimumValue(unsigned int index=0) const =0
Checks if a non vector property or a given value of a vector property has got a minimum value already...
void pushBackCharHdf5ArrayOfValues(const char *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, char nullValue, char minimumValue, char maximumValue)
void setValuesOfLongHdf5ArrayOfValues(int64_t *values, unsigned long long const *numValues, unsigned long long const *offsetValues, unsigned int numArrayDimensions, bool computeMinMax, eml2::AbstractHdfProxy *proxy=nullptr, unsigned int patchIndex=(std::numeric_limits< unsigned int >::max)())
void pushBackLongHdf5Array3dOfValues(const int64_t *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue)
Adds a 3d array of explicit long values to the property values.
virtual std::string getXmlTag() const final
Definition: DiscreteProperty.h:576
void pushBackUShortHdf5ArrayOfValues(const unsigned short *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, unsigned short nullValue) final
void pushBackUShortHdf5Array3dOfValues(const unsigned short *values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, unsigned short nullValue, unsigned short minimumValue, unsigned short maximumValue)
void pushBackCharHdf5Array2dOfValues(const char *values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, char nullValue, char minimumValue, char maximumValue)
void pushBackShortHdf5Array2dOfValues(const short *values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, short nullValue, short minimumValue, short maximumValue)
virtual bool hasMaximumValue(unsigned int index=0) const =0
Checks if a non vector property or a given value of a vector property has got a maximum value already...
void pushBackIntHdf5ArrayOfValues(const int *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, int nullValue, int minimumValue, int maximumValue)
void pushBackShortHdf5ArrayOfValues(const short *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, short nullValue) final
void pushBackLongHdf5ArrayOfValues(const int64_t *values, unsigned long long *numValues, unsigned int numDimensionsInArray, eml2::AbstractHdfProxy *proxy, int64_t nullValue, int64_t minimumValue, int64_t maximumValue)
Adds an nd array of explicit long values to the property values.
void pushBackIntHdf5Array2dOfValues(const int *values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, eml2::AbstractHdfProxy *proxy, int nullValue, int minimumValue, int maximumValue)