My Project
AbstractValuesProperty.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2/AbstractProperty.h"
37 
38 namespace resqml2
39 {
40  class DLL_IMPORT_OR_EXPORT AbstractValuesProperty : public resqml2::AbstractProperty
41  {
42  protected:
48  std::string getPathInHdfFileOfPatch(const unsigned int & patchIndex, LONG64 & nullValue) const;
49 
50  public:
51 
52  enum hdfDatatypeEnum { UNKNOWN = 0, DOUBLE = 1, FLOAT = 2, LONG = 3, ULONG = 4, INT = 5, UINT = 6, SHORT = 7, USHORT = 8, CHAR = 9, UCHAR = 10};
53 
59 
63  AbstractValuesProperty(gsoap_resqml2_0_1::resqml2__AbstractValuesProperty* fromGsoap) : resqml2::AbstractProperty(fromGsoap) {}
64 
69 
73  unsigned int getPatchCount() const;
74 
78  AbstractValuesProperty::hdfDatatypeEnum getValuesHdfDatatype() const;
79 
87  void pushBackRefToExistingDataset(resqml2::AbstractHdfProxy* hdfProxy, const bool & isAnIntegerDataset, const std::string & dataset = "");
88 
94  long getLongValuesOfPatch(const unsigned int & patchIndex, long * values);
95 
101  long getNullValueOfPatch(const unsigned int & patchIndex);
102 
108  unsigned long getULongValuesOfPatch(const unsigned int & patchIndex, unsigned long * values);
109 
115  int getIntValuesOfPatch(const unsigned int & patchIndex, int * values);
116 
122  unsigned int getUIntValuesOfPatch(const unsigned int & patchIndex, unsigned int * values);
123 
129  short getShortValuesOfPatch(const unsigned int & patchIndex, short * values);
130 
136  unsigned short getUShortValuesOfPatch(const unsigned int & patchIndex, unsigned short * values);
137 
143  char getCharValuesOfPatch(const unsigned int & patchIndex, char * values);
144 
150  unsigned char getUCharValuesOfPatch(const unsigned int & patchIndex, unsigned char * values);
151 
155  unsigned int getValuesCountOfPatch (const unsigned int & patchIndex);
156 
163  unsigned int getValuesCountOfDimensionOfPatch(const unsigned int & dimIndex, const unsigned int & patchIndex);
164 
170  unsigned int getDimensionsCountOfPatch(const unsigned int & patchIndex);
171 
175  void pushBackFacet(const gsoap_resqml2_0_1::resqml2__Facet & facet, const std::string & facetValue);
176 
180  unsigned int getFacetCount() const;
181 
185  gsoap_resqml2_0_1::resqml2__Facet getFacet(const unsigned int & index) const;
186 
190  std::string getFacetValue(const unsigned int & index) const;
191 
192  //***************************
193  //*** For hyperslabbing *****
194  //***************************
195 
202  void createLongHdf5ArrayOfValues(
203  unsigned long long* numValues,
204  const unsigned int& numArrayDimensions,
206  );
207 
215  void createLongHdf5Array3dOfValues(
216  const unsigned int& valueCountInFastestDim,
217  const unsigned int& valueCountInMiddleDim,
218  const unsigned int& valueCountInSlowestDim,
220  );
221 
233  void pushBackLongHdf5SlabArray3dOfValues(
234  long* values,
235  const unsigned int& valueCountInFastestDim,
236  const unsigned int& valueCountInMiddleDim,
237  const unsigned int& valueCountInSlowestDim,
238  const unsigned int& offsetInFastestDim,
239  const unsigned int& offsetInMiddleDim,
240  const unsigned int& offsetInSlowestDim,
242  );
243 
253  void pushBackLongHdf5SlabArrayOfValues(
254  long * values,
255  unsigned long long * numValues,
256  unsigned long long * offsetValues,
257  const unsigned int & numArrayDimensions,
259  );
260 
269  void getLongValuesOfPatch(
270  const unsigned int& patchIndex,
271  long* values,
272  unsigned long long* numValuesInEachDimension,
273  unsigned long long* offsetInEachDimension,
274  const unsigned int& numArrayDimensions
275  );
276 
288  void getLongValuesOf3dPatch(
289  const unsigned int& patchIndex,
290  long* values,
291  const unsigned int& valueCountInFastestDim,
292  const unsigned int& valueCountInMiddleDim,
293  const unsigned int& valueCountInSlowestDim,
294  const unsigned int& offsetInFastestDim,
295  const unsigned int& offsetInMiddleDim,
296  const unsigned int& offsetInSlowestDim
297  );
298 
299  };
300 }
virtual ~AbstractValuesProperty()
Definition: AbstractValuesProperty.h:68
Definition: AbstractHdfProxy.h:44
Definition: AbstractValuesProperty.h:40
AbstractValuesProperty()
Definition: AbstractValuesProperty.h:58
Definition: AbstractProperty.h:41
Definition: EpcDocument.h:61
AbstractValuesProperty(gsoap_resqml2_0_1::resqml2__AbstractValuesProperty *fromGsoap)
Definition: AbstractValuesProperty.h:63