My Project
AbstractHdfProxy.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/EpcExternalPartReference.h"
37 #include "resqml2/AbstractRepresentation.h"
38 
39 #define CUMULATIVE_LENGTH_DS_NAME "cumulativeLength"
40 #define ELEMENTS_DS_NAME "elements"
41 
42 namespace resqml2
43 {
44  class DLL_IMPORT_OR_EXPORT AbstractHdfProxy : public resqml2::EpcExternalPartReference
45  {
46  protected:
47 
51  AbstractHdfProxy(const std::string & packageDirAbsolutePath, const std::string & externalFilePath);
52 
53  AbstractHdfProxy(gsoap_resqml2_0_1::_eml__EpcExternalPartReference* fromGsoap, const std::string & packageDirAbsolutePath, const std::string & externalFilePath) :
54  EpcExternalPartReference(fromGsoap, packageDirAbsolutePath, externalFilePath) {}
55 
60  void initGsoapProxy2_0_1(soap* soapContext, const std::string & guid, const std::string & title);
61 
62  public:
63  virtual ~AbstractHdfProxy() {}
64 
69  virtual void open() = 0;
70 
74  virtual bool isOpened() = 0;
75 
79  virtual void close() = 0;
80 
85  virtual int getHdfDatatypeInDataset(const std::string & groupName) = 0;
86 
99  virtual void writeItemizedListOfList(const std::string & groupName,
100  const std::string & name,
101  const int & cumulativeLengthDatatype,
102  void * cumulativeLength,
103  const unsigned long long & cumulativeLengthSize,
104  const int & elementsDatatype,
105  void * elements,
106  const unsigned long long & elementsSize) = 0;
107 
112  virtual unsigned int getDimensionCount(const std::string & datasetName) = 0;
113 
118  virtual signed long long getElementCount(const std::string & datasetName) = 0;
119 
124  virtual void setCompressionLevel(const unsigned int & newCompressionLevel) = 0;
125 
126  virtual void writeArrayNdOfFloatValues(const std::string & groupName,
127  const std::string & name,
128  float * floatValues,
129  unsigned long long * numValuesInEachDimension,
130  const unsigned int & numDimensions) = 0;
131 
141  virtual void writeArrayNdOfDoubleValues(const std::string & groupName,
142  const std::string & name,
143  double * dblValues,
144  unsigned long long * numValuesInEachDimension,
145  const unsigned int & numDimensions) = 0;
146 
156  virtual void writeArrayNdOfCharValues(const std::string & groupName,
157  const std::string & name,
158  char * intValues,
159  unsigned long long * numValuesInEachDimension,
160  const unsigned int & numDimensions) = 0;
161 
171  virtual void writeArrayNdOfIntValues(const std::string & groupName,
172  const std::string & name,
173  int * intValues,
174  unsigned long long * numValuesInEachDimension,
175  const unsigned int & numDimensions) = 0;
176 
186  virtual void writeArrayNdOfGSoapULong64Values(const std::string & groupName,
187  const std::string & name,
188  ULONG64 * ulong64Values,
189  unsigned long long * numValuesInEachDimension,
190  const unsigned int & numDimensions) = 0;
191 
202  virtual void writeArrayNd(const std::string & groupName,
203  const std::string & name,
204  const int & datatype,
205  void * values,
206  unsigned long long * numValuesInEachDimension,
207  const unsigned int & numDimensions) = 0;
208 
218  virtual void createArrayNd(
219  const std::string& groupName,
220  const std::string& name,
221  const int & datatype,
222  unsigned long long* numValuesInEachDimension,
223  const unsigned int& numDimensions
224  ) = 0;
225 
235  virtual void writeArrayNdSlab(
236  const std::string& groupName,
237  const std::string& name,
238  const int & datatype,
239  void* values,
240  unsigned long long* numValuesInEachDimension,
241  unsigned long long* offsetValuesInEachDimension,
242  const unsigned int& numDimensions
243  ) = 0;
244 
250  virtual void readArrayNdOfDoubleValues(const std::string & datasetName, double* values) = 0;
251 
260  virtual void readArrayNdOfDoubleValues(
261  const std::string & datasetName,
262  double* values,
263  unsigned long long * numValuesInEachDimension,
264  unsigned long long * offsetInEachDimension,
265  const unsigned int & numDimensions
266  ) = 0;
267 
273  virtual void readArrayNdOfFloatValues(const std::string & datasetName, float* values) = 0;
274 
283  virtual void readArrayNdOfFloatValues(
284  const std::string & datasetName,
285  float* values,
286  unsigned long long * numValuesInEachDimension,
287  unsigned long long * offsetInEachDimension,
288  const unsigned int & numDimensions
289  ) = 0;
290 
294  virtual void readArrayNdOfGSoapLong64Values(const std::string & datasetName, LONG64* values) = 0;
295 
299  virtual void readArrayNdOfGSoapULong64Values(const std::string & datasetName, ULONG64* values) = 0;
300 
306  virtual void readArrayNdOfLongValues(const std::string & datasetName, long* values) = 0;
307 
316  virtual void readArrayNdOfLongValues(
317  const std::string & datasetName,
318  long* values,
319  unsigned long long * numValuesInEachDimension,
320  unsigned long long * offsetInEachDimension,
321  const unsigned int & numDimensions
322  ) = 0;
323 
329  virtual void readArrayNdOfULongValues(const std::string & datasetName, unsigned long* values) = 0;
330 
336  virtual void readArrayNdOfIntValues(const std::string & datasetName, int* values) = 0;
337 
343  virtual void readArrayNdOfUIntValues(const std::string & datasetName, unsigned int* values) = 0;
344 
351  virtual void readArrayNdOfShortValues(const std::string & datasetName, short* values) = 0;
352 
358  virtual void readArrayNdOfUShortValues(const std::string & datasetName, unsigned short* values) = 0;
359 
365  virtual void readArrayNdOfCharValues(const std::string & datasetName, char* values) = 0;
366 
371  virtual void readArrayNdOfUCharValues(const std::string & datasetName, unsigned char* values) = 0;
372 
377  virtual std::vector<unsigned long long> readArrayDimensions(const std::string & datasetName) = 0;
378 
379  friend void resqml2::AbstractRepresentation::setHdfProxy(resqml2::AbstractHdfProxy * proxy);
381 
382  };
383 }
void setHdfProxy(AbstractHdfProxy *proxy)
Definition: AbstractProperty.cpp:452
Definition: AbstractHdfProxy.h:44
Definition: EpcDocument.h:61
Definition: EpcExternalPartReference.h:40