Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
AbstractRepresentation.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 <set>
22 
23 #include "resqml2/AbstractProperty.h"
24 
25 namespace COMMON_NS {
26  class AbstractHdfProxy;
27 }
28 
29 namespace RESQML2_NS
30 {
31  class DLL_IMPORT_OR_EXPORT AbstractRepresentation : public COMMON_NS::AbstractObject
32  {
33  protected:
34 
38  AbstractRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
39 
45 
49  AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap), interpretation(nullptr), hdfProxy(nullptr), localCrs(nullptr) {}
50 
56  void pushBackSeismicSupport(AbstractRepresentation * seismicSupport);
57 
61  void setXmlInterpretation(class AbstractFeatureInterpretation * interp);
62 
67  virtual gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const { return nullptr; }
68 
77  gsoap_resqml2_0_1::resqml2__PointGeometry* createPointGeometryPatch2_0_1(const unsigned int & patchIndex, double * points, unsigned long long * numPoints, const unsigned int & numDimensionsInArray, COMMON_NS::AbstractHdfProxy * proxy);
78 
79  std::string getHdfProxyUuidFromPointGeometryPatch(gsoap_resqml2_0_1::resqml2__PointGeometry* patch) const;
80 
81  gsoap_resqml2_0_1::resqml2__Seismic2dCoordinates* getSeismic2dCoordinates(const unsigned int & patchIndex) const;
82 
83  gsoap_resqml2_0_1::resqml2__Seismic3dCoordinates* getSeismic3dCoordinates(const unsigned int & patchIndex) const;
84 
85  public:
86 
87  enum indexableElement { NODE = 0, EDGE = 1, FACE = 2, VOLUME = 3, PILLAR = 4 };
88 
93 
97  class AbstractLocal3dCrs* getLocalCrs() const;
98 
102  virtual gsoap_resqml2_0_1::eml20__DataObjectReference* getLocalCrsDor() const;
103 
107  std::string getLocalCrsUuid() const;
108 
112  COMMON_NS::AbstractHdfProxy* getHdfProxy() const;
113 
114  /*
115  * Getter for the uuid of the hdf proxy which is used for storing the numerical values of this representation i.e. geometry.
116  * An empty string is returned if no hdf proxy is used for storing the representation/geometry.
117  */
118  virtual std::string getHdfProxyUuid() const = 0;
119 
123  const std::vector<class AbstractProperty*> & getPropertySet() const;
124 
128  std::vector<class AbstractValuesProperty*> getValuesPropertySet() const;
129 
134  unsigned int getValuesPropertyCount() const;
135 
141  class AbstractValuesProperty* getValuesProperty(const unsigned int & index) const;
142 
147  void setInterpretation(class AbstractFeatureInterpretation * interp);
148 
152  class AbstractFeatureInterpretation* getInterpretation() const;
153 
157  gsoap_resqml2_0_1::eml20__DataObjectReference* getInterpretationDor() const;
158 
162  std::string getInterpretationUuid() const;
163 
167  std::string getInterpretationContentType() const;
168 
174  void pushBackSubRepresentation(class SubRepresentation* subRep);
175 
179  std::vector<SubRepresentation*> getSubRepresentationSet() const;
180 
185  unsigned int getSubRepresentationCount() const;
186 
191  SubRepresentation* getSubRepresentation(const unsigned int & index) const;
192 
196  std::vector<SubRepresentation*> getFaultSubRepresentationSet() const;
197 
202  unsigned int getFaultSubRepresentationCount() const;
203 
208  SubRepresentation* getFaultSubRepresentation(const unsigned int & index) const;
209 
213  virtual ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const = 0;
214 
218  ULONG64 getXyzPointCountOfAllPatches() const;
219 
225  virtual void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const = 0;
226 
232  void getXyzPointsOfPatchInGlobalCrs(const unsigned int & patchIndex, double * xyzPoints) const;
233 
239  void getXyzPointsOfAllPatches(double * xyzPoints) const;
240 
246  void getXyzPointsOfAllPatchesInGlobalCrs(double * xyzPoints) const;
247 
252  AbstractRepresentation* getSeismicSupportOfPatch(const unsigned int & patchIndex) const;
253 
258  std::set<AbstractRepresentation*> getAllSeismicSupport() const;
259 
260  virtual unsigned int getPatchCount() const = 0;
261 
267  void pushBackIntoRepresentationSet(class RepresentationSetRepresentation * repSet, bool xml = true);
268 
272  ULONG64 getRepresentationSetRepresentationCount() const;
273 
277  RepresentationSetRepresentation* getRepresentationSetRepresentation(const ULONG64 & index) const;
278 
279  void setHdfProxy(COMMON_NS::AbstractHdfProxy * proxy);
280 
285  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, double * inlines, double * crosslines, const unsigned int & pointCount,
287 
288  void addSeismic3dCoordinatesToPatch(const unsigned int patchIndex, const double & startInline, const double & incrInline, const unsigned int & countInline,
289  const double & startCrossline, const double & incrCrossline, const unsigned int & countCrossline,
290  RESQML2_NS::AbstractRepresentation * seismicSupport);
291 
299  void addSeismic2dCoordinatesToPatch(const unsigned int patchIndex, double * lineAbscissa,
301 
307  void getSeismicLineAbscissaOfPointsOfPatch(const unsigned int & patchIndex, double* values);
308 
314  void getInlinesOfPointsOfPatch(const unsigned int & patchIndex, double * values);
315 
321  void getCrosslinesOfPointsOfPatch(const unsigned int & patchIndex, double * values);
322 
323  static const char* XML_TAG;
324 
325  protected:
326 
327  virtual std::vector<epc::Relationship> getAllEpcRelationships() const;
328  virtual void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
329 
330  // XML forward relationships
331  class AbstractFeatureInterpretation* interpretation;
332  COMMON_NS::AbstractHdfProxy * hdfProxy;
333  class AbstractLocal3dCrs * localCrs;
334 
335  // XML backward relationships
336  std::vector<SubRepresentation*> subRepresentationSet;
337  std::vector<AbstractProperty*> propertySet;
338  std::vector<AbstractRepresentation*> seismicSupportedRepSet;
339  std::vector<class RepresentationSetRepresentation*> representationSetRepresentationSet;
340 
341  friend void AbstractProperty::setRepresentation(AbstractRepresentation * rep);
342  };
343 }
344 
345 
346 
Definition: RepresentationSetRepresentation.h:25
Definition: SubRepresentation.h:25
Definition: AbstractRepresentation.h:31
Definition: AbstractFeatureInterpretation.h:30
virtual ~AbstractRepresentation()
Definition: AbstractRepresentation.h:92
virtual gsoap_resqml2_0_1::resqml2__PointGeometry * getPointGeometry2_0_1(const unsigned int &patchIndex) const
Definition: AbstractRepresentation.h:67
Definition: EpcDocument.h:154
Definition: AbstractObject.h:27
AbstractRepresentation(gsoap_resqml2_0_1::resqml2__AbstractRepresentation *fromGsoap)
Definition: AbstractRepresentation.h:49
Definition: AbstractHdfProxy.h:30
AbstractRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: AbstractRepresentation.h:38
Definition: AbstractValuesProperty.h:26
Definition: AbstractLocal3dCrs.h:25
Definition: AbstractHdfProxy.h:28
Definition: EpcDocument.h:49