Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
AbstractValuesProperty.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include <limits>
22 #include "AbstractProperty.h"
23 
24 namespace RESQML2_NS
25 {
28  {
29  public:
30 
34  virtual ~AbstractValuesProperty() = default;
35 
45  DLL_IMPORT_OR_EXPORT unsigned int getPatchCount() const final;
46 
54  DLL_IMPORT_OR_EXPORT void pushBackFacet(gsoap_eml2_3::eml23__FacetKind facet, const std::string & facetValue);
55 
61  DLL_IMPORT_OR_EXPORT unsigned int getFacetCount() const;
62 
72  DLL_IMPORT_OR_EXPORT gsoap_eml2_3::eml23__FacetKind getFacetKind(unsigned int index) const;
73 
83  DLL_IMPORT_OR_EXPORT std::string getFacetValue(unsigned int index) const;
84 
85  //****************************
86  //****** INTEGER *************
87  //****************************
88 
105  DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array1dOfValues(const int64_t * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
106 
112  DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array1dOfValues(const int * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
113 
119  DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array1dOfValues(const short * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
120 
126  DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array1dOfValues(const char * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy, char nullValue);
127 
147  DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array2dOfValues(const int64_t * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
148 
154  DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array2dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
155 
161  DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array2dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
162 
168  DLL_IMPORT_OR_EXPORT void pushBackUShortHdf5Array2dOfValues(const unsigned short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
169 
175  DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array2dOfValues(const char * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, char nullValue);
176 
198  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);
199 
205  DLL_IMPORT_OR_EXPORT void pushBackIntHdf5Array3dOfValues(const int * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
206 
212  DLL_IMPORT_OR_EXPORT void pushBackShortHdf5Array3dOfValues(const short * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
213 
219  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);
220 
226  DLL_IMPORT_OR_EXPORT void pushBackCharHdf5Array3dOfValues(const char * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy, char nullValue);
227 
246  DLL_IMPORT_OR_EXPORT virtual void pushBackLongHdf5ArrayOfValues(const int64_t * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int64_t nullValue);
247 
253  DLL_IMPORT_OR_EXPORT virtual void pushBackIntHdf5ArrayOfValues(const int * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, int nullValue);
254 
260  DLL_IMPORT_OR_EXPORT virtual void pushBackShortHdf5ArrayOfValues(const short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, short nullValue);
261 
267  DLL_IMPORT_OR_EXPORT virtual void pushBackUShortHdf5ArrayOfValues(const unsigned short * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, unsigned short nullValue);
268 
274  DLL_IMPORT_OR_EXPORT virtual void pushBackCharHdf5ArrayOfValues(const char * values, unsigned long long * numValues, unsigned int numDimensionsInArray, EML2_NS::AbstractHdfProxy* proxy, char nullValue);
275 
295  DLL_IMPORT_OR_EXPORT virtual std::string pushBackRefToExistingIntegerDataset(EML2_NS::AbstractHdfProxy* hdfProxy, const std::string & dataset = "", int64_t nullValue = (std::numeric_limits<int64_t>::max)());
296 
309  DLL_IMPORT_OR_EXPORT int64_t getLongValuesOfPatch(unsigned int patchIndex, int64_t * values) const;
310 
323  DLL_IMPORT_OR_EXPORT int64_t getNullValueOfPatch(unsigned int patchIndex) const;
324 
338  DLL_IMPORT_OR_EXPORT uint64_t getULongValuesOfPatch(unsigned int patchIndex, uint64_t * values) const;
339 
352  DLL_IMPORT_OR_EXPORT int getIntValuesOfPatch(unsigned int patchIndex, int * values) const;
353 
367  DLL_IMPORT_OR_EXPORT unsigned int getUIntValuesOfPatch(unsigned int patchIndex, unsigned int * values) const;
368 
381  DLL_IMPORT_OR_EXPORT short getShortValuesOfPatch(unsigned int patchIndex, short * values) const;
382 
396  DLL_IMPORT_OR_EXPORT unsigned short getUShortValuesOfPatch(unsigned int patchIndex, unsigned short * values) const;
397 
410  DLL_IMPORT_OR_EXPORT char getCharValuesOfPatch(unsigned int patchIndex, char * values) const;
411 
425  DLL_IMPORT_OR_EXPORT unsigned char getUCharValuesOfPatch(unsigned int patchIndex, unsigned char * values) const;
426 
427  //***********************************
428  //*** INTEGER For hyperslabbing *****
429  //***********************************
430 
451  DLL_IMPORT_OR_EXPORT void pushBackLongHdf5ArrayOfValues(
452  unsigned long long* numValues,
453  unsigned int numArrayDimensions,
454  int64_t nullValue = (std::numeric_limits<int64_t>::max)(),
455  EML2_NS::AbstractHdfProxy* proxy = nullptr);
456 
479  DLL_IMPORT_OR_EXPORT void pushBackLongHdf5Array3dOfValues(
480  uint64_t valueCountInFastestDim,
481  uint64_t valueCountInMiddleDim,
482  uint64_t valueCountInSlowestDim,
483  int64_t nullValue = (std::numeric_limits<int64_t>::max)(),
484  EML2_NS::AbstractHdfProxy* proxy = nullptr);
485 
522  DLL_IMPORT_OR_EXPORT void setValuesOfLongHdf5Array3dOfValues(
523  int64_t* values,
524  uint64_t valueCountInFastestDim,
525  uint64_t valueCountInMiddleDim,
526  uint64_t valueCountInSlowestDim,
527  uint64_t offsetInFastestDim,
528  uint64_t offsetInMiddleDim,
529  uint64_t offsetInSlowestDim,
530  EML2_NS::AbstractHdfProxy* proxy = nullptr,
531  unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)());
532 
563  DLL_IMPORT_OR_EXPORT void setValuesOfLongHdf5ArrayOfValues(
564  int64_t* values,
565  unsigned long long const * numValues,
566  unsigned long long const * offsetValues,
567  unsigned int numArrayDimensions,
568  EML2_NS::AbstractHdfProxy* proxy = nullptr,
569  unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)());
570 
590  DLL_IMPORT_OR_EXPORT void getLongValuesOfPatch(
591  unsigned int patchIndex,
592  int64_t* values,
593  unsigned long long const * numValuesInEachDimension,
594  unsigned long long const * offsetInEachDimension,
595  unsigned int numArrayDimensions
596  ) const;
597 
621  DLL_IMPORT_OR_EXPORT void getLongValuesOf3dPatch(
622  unsigned int patchIndex,
623  int64_t* values,
624  uint64_t valueCountInFastestDim,
625  uint64_t valueCountInMiddleDim,
626  uint64_t valueCountInSlowestDim,
627  uint64_t offsetInFastestDim,
628  uint64_t offsetInMiddleDim,
629  uint64_t offsetInSlowestDim
630  ) const;
631 
653  DLL_IMPORT_OR_EXPORT int getIntValuesOfPatch(
654  unsigned int patchIndex,
655  int* values,
656  unsigned long long* numValuesInEachDimension,
657  unsigned long long* offsetInEachDimension,
658  unsigned int numArrayDimensions
659  ) const;
660 
684  DLL_IMPORT_OR_EXPORT void getIntValuesOf3dPatch(
685  unsigned int patchIndex,
686  int* values,
687  unsigned int valueCountInFastestDim,
688  unsigned int valueCountInMiddleDim,
689  unsigned int valueCountInSlowestDim,
690  unsigned int offsetInFastestDim,
691  unsigned int offsetInMiddleDim,
692  unsigned int offsetInSlowestDim
693  ) const;
694 
695  //***********************************
696  //****** FLOATING POINT *************
697  //***********************************
698 
713  DLL_IMPORT_OR_EXPORT void pushBackDoubleHdf5Array1dOfValues(const double * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy = nullptr);
714 
733  DLL_IMPORT_OR_EXPORT void pushBackDoubleHdf5Array2dOfValues(const double * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
734 
755  DLL_IMPORT_OR_EXPORT void pushBackDoubleHdf5Array3dOfValues(const double * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
756 
774  DLL_IMPORT_OR_EXPORT void pushBackDoubleHdf5ArrayOfValues(double const * values, unsigned long long const * numValues, unsigned int numArrayDimensions, EML2_NS::AbstractHdfProxy* proxy = nullptr);
775 
781  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5Array1dOfValues(const float * values, uint64_t valueCount, EML2_NS::AbstractHdfProxy* proxy = nullptr);
782 
788  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5Array2dOfValues(const float * values, uint64_t valueCountInFastestDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
789 
795  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5Array3dOfValues(const float * values, uint64_t valueCountInFastestDim, uint64_t valueCountInMiddleDim, uint64_t valueCountInSlowestDim, EML2_NS::AbstractHdfProxy* proxy = nullptr);
796 
802  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5ArrayOfValues(float const * values, unsigned long long const * numValues, unsigned int numArrayDimensions, EML2_NS::AbstractHdfProxy* proxy = nullptr);
803 
822  DLL_IMPORT_OR_EXPORT virtual std::string pushBackRefToExistingFloatingPointDataset(EML2_NS::AbstractHdfProxy* proxy, const std::string & datasetName = "");
823 
834  DLL_IMPORT_OR_EXPORT void getDoubleValuesOfPatch(unsigned int patchIndex, double * values) const;
835 
846  DLL_IMPORT_OR_EXPORT void getFloatValuesOfPatch(unsigned int patchIndex, float * values) const;
847 
848  //******************************************
849  //*** For FLOATING POINT hyperslabbing *****
850  //******************************************
851 
869  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5ArrayOfValues(
870  unsigned long long const * numValues,
871  unsigned int numArrayDimensions,
872  EML2_NS::AbstractHdfProxy* proxy = nullptr
873  );
874 
894  DLL_IMPORT_OR_EXPORT void pushBackFloatHdf5Array3dOfValues(
895  uint64_t valueCountInFastestDim,
896  uint64_t valueCountInMiddleDim,
897  uint64_t valueCountInSlowestDim,
898  EML2_NS::AbstractHdfProxy* proxy = nullptr
899  );
900 
937  DLL_IMPORT_OR_EXPORT void setValuesOfFloatHdf5Array3dOfValues(
938  float const * values,
939  uint64_t valueCountInFastestDim,
940  uint64_t valueCountInMiddleDim,
941  uint64_t valueCountInSlowestDim,
942  uint64_t offsetInFastestDim,
943  uint64_t offsetInMiddleDim,
944  uint64_t offsetInSlowestDim,
945  EML2_NS::AbstractHdfProxy* proxy = nullptr,
946  unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)()
947  );
948 
979  DLL_IMPORT_OR_EXPORT void setValuesOfFloatHdf5ArrayOfValues(
980  float const * values,
981  unsigned long long const * numValues,
982  unsigned long long const * offsetValues,
983  unsigned int numArrayDimensions,
984  EML2_NS::AbstractHdfProxy* proxy = nullptr,
985  unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)()
986  );
987 
1006  DLL_IMPORT_OR_EXPORT void getFloatValuesOfPatch(
1007  unsigned int patchIndex,
1008  float* values,
1009  unsigned long long const * numValuesInEachDimension,
1010  unsigned long long const * offsetInEachDimension,
1011  unsigned int numArrayDimensions
1012  ) const;
1013 
1036  DLL_IMPORT_OR_EXPORT void getFloatValuesOf3dPatch(
1037  unsigned int patchIndex,
1038  float* values,
1039  uint64_t valueCountInFastestDim,
1040  uint64_t valueCountInMiddleDim,
1041  uint64_t valueCountInSlowestDim,
1042  uint64_t offsetInFastestDim,
1043  uint64_t offsetInMiddleDim,
1044  uint64_t offsetInSlowestDim
1045  ) const;
1046 
1047  protected:
1048 
1054  DLL_IMPORT_OR_EXPORT AbstractValuesProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractProperty(partialObject) {}
1055 
1061 
1067  AbstractValuesProperty(gsoap_resqml2_0_1::resqml20__AbstractValuesProperty* fromGsoap) : RESQML2_NS::AbstractProperty(fromGsoap) {}
1068  AbstractValuesProperty(gsoap_eml2_3::resqml22__AbstractValuesProperty* fromGsoap) : RESQML2_NS::AbstractProperty(fromGsoap) {}
1069 
1081  EML2_NS::AbstractHdfProxy* getDatasetOfPatch(unsigned int patchIndex, int64_t & nullValue, std::string & dsPath) const final;
1082 
1092  COMMON_NS::DataObjectReference getHdfProxyDor(unsigned int patchIndex) const final;
1093  };
1094 }
Proxy class for an abstract property.
Definition: AbstractProperty.h:36
Proxy class for an abstract values property.
Definition: AbstractValuesProperty.h:28
virtual ~AbstractValuesProperty()=default
unsigned int getPatchCount() const final