Fesapi  0.13.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 "resqml2/AbstractProperty.h"
23 
24 namespace RESQML2_NS
25 {
26  class DLL_IMPORT_OR_EXPORT AbstractValuesProperty : public AbstractProperty
27  {
28  protected:
34  std::string getPathInHdfFileOfPatch(const unsigned int & patchIndex, LONG64 & nullValue) const;
35 
44  std::string pushBackRefToExistingIntegerDataset(COMMON_NS::AbstractHdfProxy* hdfProxy, const std::string & datasetName = "", const long & nullValue = (std::numeric_limits<long>::max)());
45 
46  public:
47 
48  enum hdfDatatypeEnum { UNKNOWN = 0, DOUBLE = 1, FLOAT = 2, LONG = 3, ULONG = 4, INT = 5, UINT = 6, SHORT = 7, USHORT = 8, CHAR = 9, UCHAR = 10};
49 
53  AbstractValuesProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractProperty(partialObject) {}
54 
60 
64  AbstractValuesProperty(gsoap_resqml2_0_1::resqml2__AbstractValuesProperty* fromGsoap) : RESQML2_NS::AbstractProperty(fromGsoap) {}
65 
70 
74  unsigned int getPatchCount() const;
75 
79  AbstractValuesProperty::hdfDatatypeEnum getValuesHdfDatatype() const;
80 
89  virtual std::string pushBackRefToExistingDataset(COMMON_NS::AbstractHdfProxy* hdfProxy, const std::string & datasetName = "", const long & nullValue = (std::numeric_limits<long>::max)()) = 0;
90 
96  long getLongValuesOfPatch(const unsigned int & patchIndex, long * values);
97 
103  long getNullValueOfPatch(const unsigned int & patchIndex);
104 
110  unsigned long getULongValuesOfPatch(const unsigned int & patchIndex, unsigned long * values);
111 
117  int getIntValuesOfPatch(const unsigned int & patchIndex, int * values);
118 
128  int getIntValuesOfPatch(
129  const unsigned int& patchIndex,
130  int* values,
131  unsigned long long* numValuesInEachDimension,
132  unsigned long long* offsetInEachDimension,
133  const unsigned int& numArrayDimensions
134  );
135 
147  void getIntValuesOf3dPatch(
148  const unsigned int& patchIndex,
149  int* values,
150  const unsigned int& valueCountInFastestDim,
151  const unsigned int& valueCountInMiddleDim,
152  const unsigned int& valueCountInSlowestDim,
153  const unsigned int& offsetInFastestDim,
154  const unsigned int& offsetInMiddleDim,
155  const unsigned int& offsetInSlowestDim
156  );
157 
163  unsigned int getUIntValuesOfPatch(const unsigned int & patchIndex, unsigned int * values);
164 
170  short getShortValuesOfPatch(const unsigned int & patchIndex, short * values);
171 
177  unsigned short getUShortValuesOfPatch(const unsigned int & patchIndex, unsigned short * values);
178 
184  char getCharValuesOfPatch(const unsigned int & patchIndex, char * values);
185 
191  unsigned char getUCharValuesOfPatch(const unsigned int & patchIndex, unsigned char * values);
192 
196  unsigned int getValuesCountOfPatch (const unsigned int & patchIndex);
197 
204  unsigned int getValuesCountOfDimensionOfPatch(const unsigned int & dimIndex, const unsigned int & patchIndex);
205 
211  unsigned int getDimensionsCountOfPatch(const unsigned int & patchIndex);
212 
216  void pushBackFacet(const gsoap_resqml2_0_1::resqml2__Facet & facet, const std::string & facetValue);
217 
221  unsigned int getFacetCount() const;
222 
226  gsoap_resqml2_0_1::resqml2__Facet getFacet(const unsigned int & index) const;
227 
231  std::string getFacetValue(const unsigned int & index) const;
232 
233  //***************************
234  //*** For hyperslabbing *****
235  //***************************
236 
243  void createLongHdf5ArrayOfValues(
244  unsigned long long* numValues,
245  const unsigned int& numArrayDimensions,
247  );
248 
256  void createLongHdf5Array3dOfValues(
257  const unsigned int& valueCountInFastestDim,
258  const unsigned int& valueCountInMiddleDim,
259  const unsigned int& valueCountInSlowestDim,
261  );
262 
274  void pushBackLongHdf5SlabArray3dOfValues(
275  long* values,
276  const unsigned int& valueCountInFastestDim,
277  const unsigned int& valueCountInMiddleDim,
278  const unsigned int& valueCountInSlowestDim,
279  const unsigned int& offsetInFastestDim,
280  const unsigned int& offsetInMiddleDim,
281  const unsigned int& offsetInSlowestDim,
283  );
284 
294  void pushBackLongHdf5SlabArrayOfValues(
295  long * values,
296  unsigned long long * numValues,
297  unsigned long long * offsetValues,
298  const unsigned int & numArrayDimensions,
300  );
301 
310  void getLongValuesOfPatch(
311  const unsigned int& patchIndex,
312  long* values,
313  unsigned long long* numValuesInEachDimension,
314  unsigned long long* offsetInEachDimension,
315  const unsigned int& numArrayDimensions
316  );
317 
329  void getLongValuesOf3dPatch(
330  const unsigned int& patchIndex,
331  long* values,
332  const unsigned int& valueCountInFastestDim,
333  const unsigned int& valueCountInMiddleDim,
334  const unsigned int& valueCountInSlowestDim,
335  const unsigned int& offsetInFastestDim,
336  const unsigned int& offsetInMiddleDim,
337  const unsigned int& offsetInSlowestDim
338  );
339 
340  };
341 }
342 
AbstractValuesProperty(gsoap_resqml2_0_1::resqml2__AbstractValuesProperty *fromGsoap)
Definition: AbstractValuesProperty.h:64
AbstractValuesProperty(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: AbstractValuesProperty.h:53
Definition: AbstractProperty.h:25
Definition: AbstractHdfProxy.h:30
AbstractValuesProperty()
Definition: AbstractValuesProperty.h:59
virtual ~AbstractValuesProperty()
Definition: AbstractValuesProperty.h:69
Definition: AbstractValuesProperty.h:26
Definition: EpcDocument.h:49