My Project
AbstractRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
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 common {
39  class AbstractHdfProxy;
40 }
41 
42 namespace resqml2
43 {
44  class DLL_IMPORT_OR_EXPORT AbstractRepresentation : public common::AbstractObject
45  {
46  protected:
47 
51  AbstractRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : common::AbstractObject(partialObject), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
52 
58 
62  AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation* fromGsoap) : common::AbstractObject(fromGsoap), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
63 
69  void pushBackSeismicSupport(AbstractRepresentation * seismicSupport);
70 
74  void setXmlInterpretation(class AbstractFeatureInterpretation * interp);
75 
80  virtual gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const { return nullptr; }
81 
90  gsoap_resqml2_0_1::resqml2__PointGeometry* createPointGeometryPatch2_0_1(const unsigned int & patchIndex, double * points, unsigned long long * numPoints, const unsigned int & numDimensionsInArray, common::AbstractHdfProxy * proxy);
91 
92  std::string getHdfProxyUuidFromPointGeometryPatch(gsoap_resqml2_0_1::resqml2__PointGeometry* patch) const;
93 
94  gsoap_resqml2_0_1::resqml2__Seismic2dCoordinates* getSeismic2dCoordinates(const unsigned int & patchIndex) const;
95 
96  gsoap_resqml2_0_1::resqml2__Seismic3dCoordinates* getSeismic3dCoordinates(const unsigned int & patchIndex) const;
97 
98  public:
99 
100  enum indexableElement { NODE = 0, EDGE = 1, FACE = 2, VOLUME = 3, PILLAR = 4 };
101 
106 
110  class AbstractLocal3dCrs* getLocalCrs() const;
111 
115  virtual gsoap_resqml2_0_1::eml20__DataObjectReference* getLocalCrsDor() const;
116 
120  std::string getLocalCrsUuid() const;
121 
125  common::AbstractHdfProxy* getHdfProxy() const;
126 
127  /*
128  * Getter for the uuid of the hdf proxy which is used for storing the numerical values of this representation i.e. geometry.
129  * An empty string is returned if no hdf proxy is used for storing the representation/geometry.
130  */
131  virtual std::string getHdfProxyUuid() const = 0;
132 
136  const std::vector<class AbstractProperty*> & getPropertySet() const;
137 
141  std::vector<class AbstractValuesProperty*> getValuesPropertySet() const;
142 
147  unsigned int getValuesPropertyCount() const;
148 
154  class AbstractValuesProperty* getValuesProperty(const unsigned int & index) const;
155 
160  void setInterpretation(class AbstractFeatureInterpretation * interp);
161 
165  class AbstractFeatureInterpretation* getInterpretation() const;
166 
170  gsoap_resqml2_0_1::eml20__DataObjectReference* getInterpretationDor() const;
171 
175  std::string getInterpretationUuid() const;
176 
180  std::string getInterpretationContentType() const;
181 
187  void pushBackSubRepresentation(class SubRepresentation* subRep);
188 
192  std::vector<SubRepresentation*> getSubRepresentationSet() const;
193 
198  unsigned int getSubRepresentationCount() const;
199 
204  SubRepresentation* getSubRepresentation(const unsigned int & index) const;
205 
209  std::vector<SubRepresentation*> getFaultSubRepresentationSet() const;
210 
215  unsigned int getFaultSubRepresentationCount() const;
216 
221  SubRepresentation* getFaultSubRepresentation(const unsigned int & index) const;
222 
226  virtual ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const = 0;
227 
231  ULONG64 getXyzPointCountOfAllPatches() const;
232 
238  virtual void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const = 0;
239 
245  void getXyzPointsOfPatchInGlobalCrs(const unsigned int & patchIndex, double * xyzPoints) const;
246 
252  void getXyzPointsOfAllPatches(double * xyzPoints) const;
253 
259  void getXyzPointsOfAllPatchesInGlobalCrs(double * xyzPoints) const;
260 
264  //const std::vector<AbstractRepresentation*> & getSeismicSupportSet() {return seismicSupportSet;}
265 
270  //std::vector<std::string> getSeismicSupportUuidSet();
271 
275  //unsigned int getSeismicPointCountOfPatch(const unsigned int & patchIndex);
276 
281  AbstractRepresentation* getSeismicSupportOfPatch(const unsigned int & patchIndex);
282 
283  virtual unsigned int getPatchCount() const = 0;
284 
290  void pushBackIntoRepresentationSet(class RepresentationSetRepresentation * repSet, bool xml = true);
291 
295  ULONG64 getRepresentationSetRepresentationCount() const;
296 
300  RepresentationSetRepresentation* getRepresentationSetRepresentation(const ULONG64 & index) const;
301 
302  void setHdfProxy(common::AbstractHdfProxy * proxy);
303 
308  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, double * inlines, double * crosslines, const unsigned int & pointCount,
310 
311  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, const double & startInline, const double & incrInline, const unsigned int & countInline,
312  const double & startCrossline, const double & incrCrossline, const unsigned int & countCrossline,
313  resqml2::AbstractRepresentation * seismicSupport);
314 
320  void addSeismic2dCoordinatesToPatch(const unsigned int patchIndex, double * lineAbscissa, const unsigned int & pointCount,
322 
327  void getSeismicLineAbscissaOfPointsOfPatch(const unsigned int & patchIndex, double* values);
328 
329  static const char* XML_TAG;
330 
331  protected:
332 
333  virtual std::vector<epc::Relationship> getAllEpcRelationships() const;
334  virtual void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
335 
336  // XML forward relationships
337  class AbstractFeatureInterpretation* interpretation;
338  common::AbstractHdfProxy * hdfProxy;
339  class AbstractLocal3dCrs * localCrs;
340  std::vector<AbstractRepresentation*> seismicSupportSet;
341 
342  // XML backward relationships
343  std::vector<SubRepresentation*> subRepresentationSet;
344  std::vector<AbstractProperty*> propertySet;
345  std::vector<AbstractRepresentation*> seismicSupportedRepSet;
346  std::vector<class RepresentationSetRepresentation*> representationSetRepresentationSet;
347 
348  friend void AbstractProperty::setRepresentation(AbstractRepresentation * rep);
349  };
350 }
351 
352 
virtual ~AbstractRepresentation()
Definition: AbstractRepresentation.h:105
AbstractRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: AbstractRepresentation.h:51
Definition: AbstractValuesProperty.h:41
Definition: AbstractLocal3dCrs.h:40
Definition: EpcDocument.h:168
Definition: AbstractObject.h:42
Definition: AbstractRepresentation.h:44
Definition: AbstractHdfProxy.h:43
virtual gsoap_resqml2_0_1::resqml2__PointGeometry * getPointGeometry2_0_1(const unsigned int &patchIndex) const
Definition: AbstractRepresentation.h:80
Definition: EpcDocument.h:62
AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation *fromGsoap)
Definition: AbstractRepresentation.h:62
Definition: SubRepresentation.h:40
Definition: AbstractHdfProxy.h:45
Definition: RepresentationSetRepresentation.h:40
Definition: AbstractFeatureInterpretation.h:45