Fesapi  2.0.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/SubRepresentation.h"
22 
23 namespace RESQML2_2_NS
24 {
26  class SubRepresentation final : public RESQML2_NS::SubRepresentation
27  {
28  public:
29 
37  DLL_IMPORT_OR_EXPORT SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject):
38  RESQML2_NS::SubRepresentation(partialObject) {}
39 
48  SubRepresentation(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title);
49 
60  SubRepresentation(RESQML2_NS::AbstractFeatureInterpretation* interp,
61  const std::string & guid, const std::string & title);
62 
68  SubRepresentation(gsoap_eml2_3::_resqml22__SubRepresentation* fromGsoap) : RESQML2_NS::SubRepresentation(fromGsoap) {}
69 
71  ~SubRepresentation() = default;
72 
73  COMMON_NS::DataObjectReference getHdfProxyDor() const final;
74 
75  DLL_IMPORT_OR_EXPORT RESQML2_NS::AbstractRepresentation::indexableElement getElementKindOfPatch(unsigned int patchIndex, unsigned int elementIndicesIndex) const final;
76 
77  DLL_IMPORT_OR_EXPORT uint64_t getElementCountOfPatch(unsigned int patchIndex) const final;
78 
79  DLL_IMPORT_OR_EXPORT void getElementIndicesOfPatch(unsigned int patchIndex, unsigned int elementIndicesIndex, uint64_t * elementIndices) const final;
80 
81  DLL_IMPORT_OR_EXPORT void getSupportingRepresentationIndicesOfPatch(unsigned int patchIndex, short * supportingRepresentationIndices) const final;
82 
83  DLL_IMPORT_OR_EXPORT bool areElementIndicesPairwise(unsigned int patchIndex) const final;
84 
85  DLL_IMPORT_OR_EXPORT bool areElementIndicesBasedOnLattice(unsigned int patchIndex, unsigned int elementIndicesIndex = 0) const final;
86 
87  DLL_IMPORT_OR_EXPORT int64_t getLatticeElementIndicesStartValue(unsigned int patchIndex, unsigned int elementIndicesIndex = 0) const;
88  DLL_IMPORT_OR_EXPORT unsigned int getLatticeElementIndicesDimensionCount(unsigned int patchIndex, unsigned int elementIndicesIndex = 0) const final;
89  DLL_IMPORT_OR_EXPORT int64_t getLatticeElementIndicesOffsetValue(unsigned int latticeDimensionIndex, unsigned int patchIndex, unsigned int elementIndicesIndex = 0) const final;
90  DLL_IMPORT_OR_EXPORT uint64_t getLatticeElementIndicesOffsetCount(unsigned int latticeDimensionIndex, unsigned int patchIndex, unsigned int elementIndicesIndex = 0) const final;
91 
92  using RESQML2_NS::SubRepresentation::pushBackSubRepresentationPatch;
93 
94  DLL_IMPORT_OR_EXPORT void pushBackSubRepresentationPatch(gsoap_eml2_3::resqml22__IndexableElement elementKind, uint64_t originIndex,
95  unsigned int elementCountInSlowestDimension,
96  unsigned int elementCountInMiddleDimension,
97  unsigned int elementCountInFastestDimension) final;
98 
99  DLL_IMPORT_OR_EXPORT void pushBackSubRepresentationPatch(gsoap_eml2_3::resqml22__IndexableElement elementKind0, gsoap_eml2_3::resqml22__IndexableElement elementKind1,
100  uint64_t elementCount,
101  uint64_t * elementIndices0, uint64_t * elementIndices1,
102  EML2_NS::AbstractHdfProxy* proxy) final;
103 
104  DLL_IMPORT_OR_EXPORT void pushBackRefToExistingDataset(gsoap_eml2_3::resqml22__IndexableElement elementKind, uint64_t elementCount, const std::string & elementDataset,
105  int64_t nullValue, EML2_NS::AbstractHdfProxy * proxy, const std::string & supportingRepDataset = "") final;
106 
107  DLL_IMPORT_OR_EXPORT unsigned int getPatchCount() const final;
108 
109  DLL_IMPORT_OR_EXPORT unsigned int getSupportingRepresentationCount() const final;
110 
111  COMMON_NS::DataObjectReference getSupportingRepresentationDor(unsigned int index) const final;
112 
116  DLL_IMPORT_OR_EXPORT static const char* XML_NS;
117 
121  DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
122 
123  private:
124 
132  void init(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title);
133 
139  gsoap_eml2_3::_resqml22__SubRepresentation* getSpecializedGsoapProxy() const;
140 
144  gsoap_eml2_3::resqml22__SubRepresentationPatch* getSubRepresentationPatch(unsigned int index) const;
145 
152  void pushBackXmlSupportingRepresentation(RESQML2_NS::AbstractRepresentation const * supportingRep);
153  };
154 }
indexableElement
Definition: AbstractRepresentation.h:36
Definition: SubRepresentation.h:27
SubRepresentation(gsoap_eml2_3::_resqml22__SubRepresentation *fromGsoap)
Definition: SubRepresentation.h:68
SubRepresentation(resqml2::AbstractFeatureInterpretation *interp, const std::string &guid, const std::string &title)
Creates an instance of this class in a gsoap context. This instance must be linked to an interpretati...
SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: SubRepresentation.h:37
common::DataObjectReference getHdfProxyDor() const final
Gets the data object reference of the HDF proxy which is used for storing the numerical values of thi...
SubRepresentation(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)