My Project
AbstractRepresentation.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 AbstractRepresentation : public AbstractObject
41  {
42  protected:
43 
47  AbstractRepresentation(common::EpcDocument * epcDoc, gsoap_resqml2_0_1::eml__DataObjectReference* partialObject) :AbstractObject(epcDoc, partialObject), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
48 
54 
58  AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation* fromGsoap) : AbstractObject(fromGsoap), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
59 
65  void pushBackSeismicSupport(AbstractRepresentation * seismicSupport);
66 
70  void setXmlInterpretation(class AbstractFeatureInterpretation * interp);
71 
76  virtual gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const { return nullptr; }
77 
86  gsoap_resqml2_0_1::resqml2__PointGeometry* createPointGeometryPatch2_0_1(const unsigned int & patchIndex, double * points, unsigned long long * numPoints, const unsigned int & numDimensionsInArray, resqml2::AbstractHdfProxy * proxy);
87 
88  std::string getHdfProxyUuidFromPointGeometryPatch(gsoap_resqml2_0_1::resqml2__PointGeometry* patch) const;
89 
90  gsoap_resqml2_0_1::resqml2__Seismic2dCoordinates* getSeismic2dCoordinates(const unsigned int & patchIndex) const;
91 
92  gsoap_resqml2_0_1::resqml2__Seismic3dCoordinates* getSeismic3dCoordinates(const unsigned int & patchIndex) const;
93 
94  public:
95 
96  enum indexableElement { NODE = 0, EDGE = 1, FACE = 2, VOLUME = 3, PILLAR = 4 };
97 
102 
106  class AbstractLocal3dCrs* getLocalCrs() const;
107 
111  virtual std::string getLocalCrsUuid() const;
112 
116  class AbstractHdfProxy* getHdfProxy() const;
117 
118  /*
119  * Getter for the uuid of the hdf proxy which is used for storing the numerical values of this representation i.e. geometry.
120  * An empty string is returned if no hdf proxy is used for storing the representation/geometry.
121  */
122  virtual std::string getHdfProxyUuid() const = 0;
123 
127  const std::vector<class AbstractProperty*> & getPropertySet() const;
128 
132  std::vector<class AbstractValuesProperty*> getValuesPropertySet() const;
133 
138  unsigned int getValuesPropertyCount() const;
139 
145  class AbstractValuesProperty* getValuesProperty(const unsigned int & index) const;
146 
151  void setInterpretation(class AbstractFeatureInterpretation * interp);
152 
156  class AbstractFeatureInterpretation* getInterpretation() const;
157 
161  std::string getInterpretationUuid() const;
162 
166  std::string getInterpretationContentType() const;
167 
172  void addSubRepresentation(SubRepresentation* subRep);
173 
177  std::vector<SubRepresentation*> getSubRepresentationSet() const;
178 
183  unsigned int getSubRepresentationCount() const;
184 
189  SubRepresentation* getSubRepresentation(const unsigned int & index) const;
190 
194  std::vector<SubRepresentation*> getFaultSubRepresentationSet() const;
195 
200  unsigned int getFaultSubRepresentationCount() const;
201 
206  SubRepresentation* getFaultSubRepresentation(const unsigned int & index) const;
207 
211  virtual ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const = 0;
212 
216  ULONG64 getXyzPointCountOfAllPatches() const;
217 
223  virtual void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const = 0;
224 
230  void getXyzPointsOfPatchInGlobalCrs(const unsigned int & patchIndex, double * xyzPoints) const;
231 
237  void getXyzPointsOfAllPatches(double * xyzPoints) const;
238 
244  void getXyzPointsOfAllPatchesInGlobalCrs(double * xyzPoints) const;
245 
249  //const std::vector<AbstractRepresentation*> & getSeismicSupportSet() {return seismicSupportSet;}
250 
255  //std::vector<std::string> getSeismicSupportUuidSet();
256 
260  //unsigned int getSeismicPointCountOfPatch(const unsigned int & patchIndex);
261 
266  AbstractRepresentation* getSeismicSupportOfPatch(const unsigned int & patchIndex);
267 
268  virtual unsigned int getPatchCount() const = 0;
269 
275  void pushBackIntoRepresentationSet(class RepresentationSetRepresentation * repSet, bool xml = true);
276 
277  void setHdfProxy(resqml2::AbstractHdfProxy * proxy);
278 
283  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, double * inlines, double * crosslines, const unsigned int & pointCount,
285 
286  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, const double & startInline, const double & incrInline, const unsigned int & countInline,
287  const double & startCrossline, const double & incrCrossline, const unsigned int & countCrossline,
288  resqml2::AbstractRepresentation * seismicSupport);
289 
295  void addSeismic2dCoordinatesToPatch(const unsigned int patchIndex, double * lineAbscissa, const unsigned int & pointCount,
297 
302  void getSeismicLineAbscissaOfPointsOfPatch(const unsigned int & patchIndex, double* values);
303 
304  static const char* XML_TAG;
305 
306  protected:
307 
308  virtual std::vector<epc::Relationship> getAllEpcRelationships() const;
309  virtual void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
310 
311  // XML forward relationships
312  class AbstractFeatureInterpretation* interpretation;
313  resqml2::AbstractHdfProxy * hdfProxy;
314  class AbstractLocal3dCrs * localCrs;
315  std::vector<AbstractRepresentation*> seismicSupportSet;
316 
317  // XML backward relationships
318  std::vector<SubRepresentation*> subRepresentationSet;
319  std::vector<AbstractProperty*> propertySet;
320  std::vector<AbstractRepresentation*> seismicSupportedRepSet;
321  std::vector<class RepresentationSetRepresentation*> representationSetRepresentationSet;
322 
324  };
325 }
326 
327 
virtual ~AbstractRepresentation()
Definition: AbstractRepresentation.h:101
Definition: AbstractHdfProxy.h:44
Definition: AbstractValuesProperty.h:40
Definition: AbstractLocal3dCrs.h:40
AbstractRepresentation(common::EpcDocument *epcDoc, gsoap_resqml2_0_1::eml__DataObjectReference *partialObject)
Definition: AbstractRepresentation.h:47
void setRepresentation(class AbstractRepresentation *rep)
Definition: AbstractProperty.cpp:276
Definition: AbstractObject.h:41
Definition: EpcDocument.h:155
Definition: AbstractRepresentation.h:40
virtual gsoap_resqml2_0_1::resqml2__PointGeometry * getPointGeometry2_0_1(const unsigned int &patchIndex) const
Definition: AbstractRepresentation.h:76
Definition: EpcDocument.h:61
AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation *fromGsoap)
Definition: AbstractRepresentation.h:58
Definition: SubRepresentation.h:40
Definition: RepresentationSetRepresentation.h:40
Definition: AbstractFeatureInterpretation.h:45