Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
SubRepresentation.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 "resqml2/AbstractRepresentation.h"
22 
23 namespace RESQML2_NS
24 {
25  class DLL_IMPORT_OR_EXPORT SubRepresentation : public RESQML2_NS::AbstractRepresentation
26  {
27  protected:
28 
32  SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) :
33  RESQML2_NS::AbstractRepresentation(partialObject)
34  {
35  }
36 
38 
42  SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation* fromGsoap) : RESQML2_NS::AbstractRepresentation(fromGsoap) {}
43 
44  virtual void pushBackXmlSupportingRepresentation(AbstractRepresentation * supportingRep) = 0;
45 
46  public:
47 
51  virtual ~SubRepresentation() {}
52 
53  static const char* XML_TAG;
54  virtual std::string getXmlTag() const {return XML_TAG;}
55 
59  virtual indexableElement getElementKindOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex) const = 0;
60 
64  virtual ULONG64 getElementCountOfPatch(const unsigned int & patchIndex) const = 0;
65 
71  virtual void getElementIndicesOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex, ULONG64 * elementIndices) const = 0;
72 
77  virtual void getSupportingRepresentationIndicesOfPatch(const unsigned int & patchIndex, short * supportingRepresentationIndices) const = 0;
78 
82  virtual bool areElementIndicesPairwise(const unsigned int & patchIndex) const = 0;
83 
88  virtual bool areElementIndicesBasedOnLattice(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
89 
90  virtual LONG64 getLatticeElementIndicesStartValue(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
91  virtual unsigned int getLatticeElementIndicesDimensionCount(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
92  virtual LONG64 getLatticeElementIndicesOffsetValue(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
93  virtual ULONG64 getLatticeElementIndicesOffsetCount(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
94 
102  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & originIndex,
103  const unsigned int & elementCountInSlowestDimension,
104  const unsigned int & elementCountInMiddleDimension,
105  const unsigned int & elementCountInFastestDimension) = 0;
106 
115  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, ULONG64 * elementIndices, COMMON_NS::AbstractHdfProxy* proxy, short * supportingRepIndices = nullptr) = 0;
116 
126  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind0, const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind1,
127  const ULONG64 & elementCount,
128  ULONG64 * elementIndices0, ULONG64 * elementIndices1,
129  COMMON_NS::AbstractHdfProxy* proxy) = 0;
130 
141  virtual void pushBackRefToExistingDataset(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, const std::string & elementDataset,
142  const LONG64 & nullValue, COMMON_NS::AbstractHdfProxy * proxy, const std::string & supportingRepDataset = "") = 0;
143 
144  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
145 
151  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
152 
153  virtual unsigned int getPatchCount() const = 0;
154 
159  void pushBackSupportingRepresentation(AbstractRepresentation * supportingRep);
160 
164  virtual unsigned int getSupportingRepresentationCount() const = 0;
165 
169  AbstractRepresentation* getSupportingRepresentation(unsigned int index) const;
170 
174  virtual gsoap_resqml2_0_1::eml20__DataObjectReference* getSupportingRepresentationDor(unsigned int index) const = 0;
175 
179  std::string getSupportingRepresentationUuid(unsigned int index) const;
180 
184  std::string getSupportingRepresentationTitle(unsigned int index) const;
185 
191  std::string getSupportingRepresentationContentType() const;
192 
193  private:
194 
195  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const {return nullptr;}
196 
197  std::vector<epc::Relationship> getAllEpcRelationships() const;
198  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
199  };
200 }
201 
SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: SubRepresentation.h:32
virtual ~SubRepresentation()
Definition: SubRepresentation.h:51
Definition: SubRepresentation.h:25
Definition: AbstractRepresentation.h:31
virtual std::string getXmlTag() const
Definition: SubRepresentation.h:54
Definition: AbstractFeatureInterpretation.h:30
SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation *fromGsoap)
Definition: SubRepresentation.h:42
Definition: EpcDocument.h:154
Definition: AbstractHdfProxy.h:30
Definition: EpcDocument.h:49