My Project
GridConnectionSetRepresentation.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/AbstractRepresentation.h"
37 
38 namespace resqml2
39 {
40  class DLL_IMPORT_OR_EXPORT GridConnectionSetRepresentation : public AbstractRepresentation
41  {
42  protected:
43 
47  GridConnectionSetRepresentation(gsoap_resqml2_0_1::eml__DataObjectReference* partialObject) :
48  AbstractRepresentation(nullptr, partialObject) {}
49 
54 
58  GridConnectionSetRepresentation(gsoap_resqml2_0_1::_resqml2__GridConnectionSetRepresentation* fromGsoap) : AbstractRepresentation(fromGsoap) {}
59 
60  virtual void pushBackXmlInterpretation(class AbstractFeatureInterpretation* interp) = 0;
61  virtual void pushBackXmlSupportingGridRepresentation(class AbstractGridRepresentation * supportingGridRep) = 0;
62 
63  public:
64 
69 
70  static const char* XML_TAG;
71  virtual std::string getXmlTag() const;
72 
73  virtual std::string getHdfProxyUuid() const = 0;
74 
78  virtual ULONG64 getCellIndexPairCount() const = 0;
79 
83  virtual ULONG64 getCellIndexPairs(ULONG64 * cellIndexPairs) const = 0;
84 
89  virtual unsigned int getCellIndexPairCountFromInterpretationIndex(const unsigned int & interpretationIndex) const = 0;
90 
94  virtual bool isAssociatedToInterpretations() const = 0;
95 
100  virtual void getInterpretationIndexCumulativeCount(unsigned int * cumulativeCount) const = 0;
101 
106  virtual void getInterpretationIndices(unsigned int * interpretationIndices) const = 0;
107 
111  virtual LONG64 getInterpretationIndexNullValue() const = 0;
112 
120  virtual void getGridConnectionSetInformationFromInterpretationIndex(ULONG64 * cellIndexPairs, ULONG64 * gridIndexPairs, int * localFaceIndexPairs, const unsigned int & interpretationIndex) const = 0;
121 
126  virtual std::string getInterpretationUuidFromIndex(const unsigned int & interpretationIndex) const = 0;
127 
132  class AbstractFeatureInterpretation * getInterpretationFromIndex(const unsigned int & interpretationIndex) const;
133 
137  virtual unsigned int getInterpretationCount() const = 0;
138 
142  virtual bool hasLocalFacePerCell() const = 0;
143 
148  virtual void getLocalFacePerCellIndexPairs(int * localFacePerCellIndexPairs) const = 0;
149 
153  virtual bool isBasedOnMultiGrids() const = 0;
154 
159  virtual void getGridIndexPairs(ULONG64 * gridIndexPairs) const = 0;
160 
169  virtual void setCellIndexPairsUsingExistingDataset(const ULONG64 & cellIndexPairCount, const std::string & cellIndexPair, const ULONG64 & nullValue, resqml2::AbstractHdfProxy * proxy, const std::string & gridIndexPair = "") = 0;
170 
179  void setCellIndexPairs(const ULONG64 & cellIndexPairCount, ULONG64 * cellIndexPair, const ULONG64 & nullValue, resqml2::AbstractHdfProxy * proxy, ULONG64 * gridIndexPair = nullptr);
180 
186  virtual void setLocalFacePerCellIndexPairs(const ULONG64 & cellIndexPairCount, int * localFacePerCellIndexPair, resqml2::AbstractHdfProxy * proxy) = 0;
187 
195  virtual void setConnectionInterpretationIndices(unsigned int * interpretationIndices, const unsigned int & interpretationIndiceCount, const ULONG64 & nullValue, resqml2::AbstractHdfProxy * proxy) = 0;
196 
201  void pushBackInterpretation(class AbstractFeatureInterpretation* interp);
202 
207  void pushBackSupportingGridRepresentation(class AbstractGridRepresentation * supportingGridRep);
208 
212  virtual unsigned int getSupportingGridRepresentationCount() const = 0;
213 
217  class AbstractGridRepresentation* getSupportingGridRepresentation(unsigned int index) const;
218 
222  virtual std::string getSupportingGridRepresentationUuid(unsigned int index) const = 0;
223 
227  virtual std::string getSupportingGridRepresentationTitle(unsigned int index) const = 0;
228 
232  virtual std::string getSupportingGridRepresentationContentType(unsigned int index) const = 0;
233 
234  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
235 
241  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
242 
246  unsigned int getPatchCount() const {return 1;}
247 
248  private:
249 
250  std::vector<epc::Relationship> getAllEpcRelationships() const;
251  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
252  };
253 }
GridConnectionSetRepresentation(gsoap_resqml2_0_1::eml__DataObjectReference *partialObject)
Definition: GridConnectionSetRepresentation.h:47
GridConnectionSetRepresentation(class AbstractFeatureInterpretation *interp)
Definition: GridConnectionSetRepresentation.h:53
virtual ~GridConnectionSetRepresentation()
Definition: GridConnectionSetRepresentation.h:68
GridConnectionSetRepresentation(gsoap_resqml2_0_1::_resqml2__GridConnectionSetRepresentation *fromGsoap)
Definition: GridConnectionSetRepresentation.h:58
Definition: AbstractHdfProxy.h:44
unsigned int getPatchCount() const
Definition: GridConnectionSetRepresentation.h:246
Definition: AbstractGridRepresentation.h:47
Definition: EpcDocument.h:155
Definition: AbstractRepresentation.h:40
Definition: GridConnectionSetRepresentation.h:40
Definition: EpcDocument.h:61
Definition: AbstractFeatureInterpretation.h:45