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/SubRepresentation.h"
37 
38 namespace resqml2_0_1
39 {
40  class DLL_IMPORT_OR_EXPORT SubRepresentation : public resqml2::SubRepresentation
41  {
42  private:
43  /*
44  * @param soapContext The soap context where the underlying gsoap proxy will be created.
45  * @param guid The guid to set to this instance.
46  * @param title A title for the instance to init.
47  */
48  void init(soap* soapContext, const std::string & guid, const std::string & title);
49 
50  gsoap_resqml2_0_1::_resqml2__SubRepresentation* getSpecializedGsoapProxy() const;
51 
55  gsoap_resqml2_0_1::resqml2__SubRepresentationPatch* getSubRepresentationPatch(const unsigned int & index) const;
56 
61  void pushBackXmlSupportingRepresentation(resqml2::AbstractRepresentation * supportingRep);
62 
63  class DiscreteProperty* getSupportingRepresentationIndicesDiscretePropOfPatch(const unsigned int & patchIndex) const;
64 
65  public:
66 
70  SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject):
71  resqml2::SubRepresentation(partialObject) {}
72 
79  SubRepresentation(soap* soapContext, const std::string & guid, const std::string & title);
80 
88  const std::string & guid, const std::string & title);
89 
93  SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation* fromGsoap) : resqml2::SubRepresentation(fromGsoap) {}
94 
99 
100  std::string getHdfProxyUuid() const;
101 
105  resqml2::AbstractRepresentation::indexableElement getElementKindOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex) const;
106 
110  ULONG64 getElementCountOfPatch(const unsigned int & patchIndex) const;
111 
117  void getElementIndicesOfPatch(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex, ULONG64 * elementIndices) const;
118 
123  void getSupportingRepresentationIndicesOfPatch(const unsigned int & patchIndex, short * supportingRepresentationIndices) const;
124 
128  bool areElementIndicesPairwise(const unsigned int & patchIndex) const;
129 
134  bool areElementIndicesBasedOnLattice(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const;
135 
136  LONG64 getLatticeElementIndicesStartValue(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const;
137  unsigned int getLatticeElementIndicesDimensionCount(const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const;
138  LONG64 getLatticeElementIndicesOffsetValue(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const;
139  ULONG64 getLatticeElementIndicesOffsetCount(const unsigned int & latticeDimensionIndex, const unsigned int & patchIndex, const unsigned int & elementIndicesIndex = 0) const;
140 
148  void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & originIndex,
149  const unsigned int & elementCountInSlowestDimension,
150  const unsigned int & elementCountInMiddleDimension,
151  const unsigned int & elementCountInFastestDimension);
152 
161  void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, ULONG64 * elementIndices, common::AbstractHdfProxy* proxy, short * supportingRepIndices = nullptr);
162 
172  void pushBackSubRepresentationPatch(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind0, const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind1,
173  const ULONG64 & elementCount,
174  ULONG64 * elementIndices0, ULONG64 * elementIndices1,
175  common::AbstractHdfProxy* proxy);
176 
187  void pushBackRefToExistingDataset(const gsoap_resqml2_0_1::resqml2__IndexableElements & elementKind, const ULONG64 & elementCount, const std::string & elementDataset,
188  const LONG64 & nullValue, common::AbstractHdfProxy * proxy, const std::string & supportingRepDataset = "");
189 
190  unsigned int getPatchCount() const;
191 
195  unsigned int getSupportingRepresentationCount() const;
196 
200  gsoap_resqml2_0_1::eml20__DataObjectReference* getSupportingRepresentationDor(unsigned int index) const;
201  };
202 }
~SubRepresentation()
Definition: SubRepresentation.h:98
Definition: SubRepresentation.h:40
Definition: EpcDocument.h:78
Definition: AbstractRepresentation.h:44
Definition: EpcDocument.h:62
SubRepresentation(gsoap_resqml2_0_1::_resqml2__SubRepresentation *fromGsoap)
Definition: SubRepresentation.h:93
Definition: SubRepresentation.h:40
Definition: AbstractHdfProxy.h:45
Definition: DiscreteProperty.h:44
Definition: AbstractFeatureInterpretation.h:45
SubRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: SubRepresentation.h:70