My Project
SubRepresentation.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/AbstractRepresentation.h"
37 
38 namespace resqml2
39 {
40  class DLL_IMPORT_OR_EXPORT SubRepresentation : public resqml2::AbstractRepresentation
41  {
42  protected:
43 
47  SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) :
48  resqml2::AbstractRepresentation(partialObject)
49  {
50  }
51 
53 
57  SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation* fromGsoap) : resqml2::AbstractRepresentation(fromGsoap) {}
58 
59  virtual void pushBackXmlSupportingRepresentation(AbstractRepresentation * supportingRep) = 0;
60 
61  public:
62 
66  virtual ~SubRepresentation() {}
67 
68  static const char* XML_TAG;
69  virtual std::string getXmlTag() const {return XML_TAG;}
70 
74  virtual indexableElement getElementKindOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex) const = 0;
75 
79  virtual ULONG64 getElementCountOfPatch(const unsigned int & patchIndex) const = 0;
80 
86  virtual void getElementIndicesOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex, ULONG64 * elementIndices) const = 0;
87 
92  virtual void getSupportingRepresentationIndicesOfPatch(const unsigned int & patchIndex, short * supportingRepresentationIndices) const = 0;
93 
97  virtual bool areElementIndicesPairwise(const unsigned int & patchIndex) const = 0;
98 
103  virtual bool areElementIndicesBasedOnLattice(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
104 
105  virtual LONG64 getLatticeElementIndicesStartValue(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
106  virtual unsigned int getLatticeElementIndicesDimensionCount(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
107  virtual LONG64 getLatticeElementIndicesOffsetValue(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
108  virtual ULONG64 getLatticeElementIndicesOffsetCount(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const = 0;
109 
117  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & originIndex,
118  const unsigned int & elementCountInSlowestDimension,
119  const unsigned int & elementCountInMiddleDimension,
120  const unsigned int & elementCountInFastestDimension) = 0;
121 
130  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, ULONG64 * elementIndices, common::AbstractHdfProxy* proxy, short * supportingRepIndices = nullptr) = 0;
131 
141  virtual void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind0, const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind1,
142  const ULONG64 & elementCount,
143  ULONG64 * elementIndices0, ULONG64 * elementIndices1,
144  common::AbstractHdfProxy* proxy) = 0;
145 
156  virtual void pushBackRefToExistingDataset(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, const std::string & elementDataset,
157  const LONG64 & nullValue, common::AbstractHdfProxy * proxy, const std::string & supportingRepDataset = "") = 0;
158 
159  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
160 
166  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
167 
168  virtual unsigned int getPatchCount() const = 0;
169 
174  void pushBackSupportingRepresentation(AbstractRepresentation * supportingRep);
175 
179  virtual unsigned int getSupportingRepresentationCount() const = 0;
180 
184  AbstractRepresentation* getSupportingRepresentation(unsigned int index) const;
185 
189  virtual gsoap_resqml2_0_1::eml20__DataObjectReference* getSupportingRepresentationDor(unsigned int index) const = 0;
190 
194  std::string getSupportingRepresentationUuid(unsigned int index) const;
195 
199  std::string getSupportingRepresentationTitle(unsigned int index) const;
200 
206  std::string getSupportingRepresentationContentType() const;
207 
208  private:
209 
210  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const {return nullptr;}
211 
212  std::vector<epc::Relationship> getAllEpcRelationships() const;
213  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
214  };
215 }
virtual ~SubRepresentation()
Definition: SubRepresentation.h:66
SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: SubRepresentation.h:47
SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation *fromGsoap)
Definition: SubRepresentation.h:57
Definition: EpcDocument.h:168
virtual std::string getXmlTag() const
Definition: SubRepresentation.h:69
Definition: AbstractRepresentation.h:44
Definition: EpcDocument.h:62
Definition: SubRepresentation.h:40
Definition: AbstractHdfProxy.h:45
Definition: AbstractFeatureInterpretation.h:45