Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
FluidSystem.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 "../common/AbstractObject.h"
22 
23 #include "../MacroDefinitions.h"
24 
25 namespace RESQML2_NS
26 {
28  class RockFluidOrganizationInterpretation;
29 }
30 
38 #define GETTER_FLUID_COMPONENT_ATTRIBUTE(componentName, attributeName, attributeDatatype)\
39  DLL_IMPORT_OR_EXPORT attributeDatatype get##componentName##attributeName() const {\
40  if (static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName == nullptr) { throw std::logic_error("The component does not exist"); }\
41  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName;\
42  }
43 
51 #define GETTER_AND_SETTER_FLUID_COMPONENT_OPTIONAL_ATTRIBUTE(componentName, attributeName, attributeDatatype)\
52  DLL_IMPORT_OR_EXPORT void set##componentName##attributeName(const attributeDatatype& value);\
53  DLL_IMPORT_OR_EXPORT bool has##componentName##attributeName() const {\
54  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName != nullptr &&\
55  static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName != nullptr;\
56  }\
57  DLL_IMPORT_OR_EXPORT attributeDatatype get##componentName##attributeName() const {\
58  if (!has##componentName##attributeName()) { throw std::logic_error("This attribute in this component attribute does not exist"); }\
59  return *static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName;\
60  }
61 
69 #define GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(componentName, attributeName, uomDatatype)\
70  DLL_IMPORT_OR_EXPORT void set##componentName##attributeName(double value, uomDatatype uom);\
71  DLL_IMPORT_OR_EXPORT bool has##componentName##attributeName() const {\
72  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName != nullptr &&\
73  static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName != nullptr;\
74  }\
75  DLL_IMPORT_OR_EXPORT double get##componentName##attributeName##Value() const {\
76  if (!has##componentName##attributeName()) { throw std::logic_error("This attribute in this component attribute does not exist"); }\
77  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName->__item;\
78  }\
79  DLL_IMPORT_OR_EXPORT uomDatatype get##componentName##attributeName##Uom() const {\
80  if (!has##componentName##attributeName()) { throw std::logic_error("This attribute in this component attribute does not exist"); }\
81  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName->attributeName->uom;\
82  }
83 
89 #define GETTER_AND_SETTER_FLUID_COMPONENT_COMMON_ATTRIBUTES(componentName)\
90  DLL_IMPORT_OR_EXPORT bool has##componentName() const {\
91  return static_cast<gsoap_eml2_2::prodml21__FluidSystem*>(gsoapProxy2_2)->componentName != nullptr;\
92  }\
93  GETTER_FLUID_COMPONENT_ATTRIBUTE(componentName, uid, std::string)\
94  GETTER_AND_SETTER_FLUID_COMPONENT_OPTIONAL_ATTRIBUTE(componentName, Remark, std::string)\
95  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(componentName, MassFraction, gsoap_eml2_2::eml22__MassPerMassUom)\
96  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(componentName, MoleFraction, gsoap_eml2_2::eml22__AmountOfSubstancePerAmountOfSubstanceUom)
97 
98 
99 namespace PRODML2_1_NS
100 {
102  class FluidSystem : public COMMON_NS::AbstractObject
103  {
104  public:
105 
113  DLL_IMPORT_OR_EXPORT FluidSystem(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
114 
133  FluidSystem(COMMON_NS::DataObjectRepository * repo,
134  const std::string & guid,
135  const std::string & title,
136  double temperatureValue, gsoap_eml2_2::eml22__ThermodynamicTemperatureUom temperatureUom,
137  double pressureValue, gsoap_eml2_2::eml22__PressureUom pressureUom,
138  gsoap_eml2_2::prodml21__ReservoirFluidKind reservoirFluidKind,
139  double gasOilRatio, gsoap_eml2_2::eml22__VolumePerVolumeUom gasOilRatioUom);
140 
156  FluidSystem(COMMON_NS::DataObjectRepository * repo,
157  const std::string & guid,
158  const std::string & title,
159  gsoap_eml2_2::eml22__ReferenceCondition referenceCondition,
160  gsoap_eml2_2::prodml21__ReservoirFluidKind reservoirFluidKind,
161  double gasOilRatio, gsoap_eml2_2::eml22__VolumePerVolumeUom gasOilRatioUom);
162 
168  FluidSystem(gsoap_eml2_2::prodml21__FluidSystem* fromGsoap):AbstractObject(fromGsoap) {}
169 
171  ~FluidSystem() = default;
172 
173  GETTER_SETTER_ATTRIBUTE(gsoap_eml2_2::prodml21__FluidSystem, gsoapProxy2_2, ReservoirFluidKind, gsoap_eml2_2::prodml21__ReservoirFluidKind)
174 
175  GETTER_SETTER_OPTIONAL_ATTRIBUTE(gsoap_eml2_2::prodml21__FluidSystem, gsoapProxy2_2, PhasesPresent, gsoap_eml2_2::prodml21__PhasePresent)
176  GETTER_SETTER_OPTIONAL_ATTRIBUTE(gsoap_eml2_2::prodml21__FluidSystem, gsoapProxy2_2, ReservoirLifeCycleState, gsoap_eml2_2::prodml21__ReservoirLifeCycleState)
177  GETTER_SETTER_OPTIONAL_ATTRIBUTE(gsoap_eml2_2::prodml21__FluidSystem, gsoapProxy2_2, Remark, std::string)
178 
179 
184  DLL_IMPORT_OR_EXPORT double getStandardTemperatureValue() const;
185 
191  DLL_IMPORT_OR_EXPORT gsoap_eml2_2::eml22__ThermodynamicTemperatureUom getStandardTemperatureUom() const;
192 
198  DLL_IMPORT_OR_EXPORT double getStandardPressureValue() const;
199 
205  DLL_IMPORT_OR_EXPORT gsoap_eml2_2::eml22__PressureUom getStandardPressureUom() const;
206 
212  DLL_IMPORT_OR_EXPORT double getSolutionGORValue() const;
213 
219  DLL_IMPORT_OR_EXPORT gsoap_eml2_2::eml22__VolumePerVolumeUom getSolutionGORUom() const;
220 
224  DLL_IMPORT_OR_EXPORT void setSaturationPressure(double value, gsoap_eml2_2::eml22__PressureUom pressureUom, gsoap_eml2_2::prodml21__SaturationPointKind saturationPointKind);
225 
231  DLL_IMPORT_OR_EXPORT bool hasSaturationPressureValue() const;
232 
238  DLL_IMPORT_OR_EXPORT double getSaturationPressureValue() const;
239 
245  DLL_IMPORT_OR_EXPORT gsoap_eml2_2::eml22__PressureUom getSaturationPressureUom() const;
246 
252  DLL_IMPORT_OR_EXPORT gsoap_eml2_2::prodml21__SaturationPointKind getSaturationPressurePointKind() const;
253 
257  GETTER_AND_SETTER_FLUID_COMPONENT_COMMON_ATTRIBUTES(FormationWater)
258  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(FormationWater, Salinity, gsoap_eml2_2::eml22__MassPerMassUom)
259  GETTER_AND_SETTER_FLUID_COMPONENT_OPTIONAL_ATTRIBUTE(FormationWater, SpecificGravity, double)
260 
264  GETTER_AND_SETTER_FLUID_COMPONENT_COMMON_ATTRIBUTES(StockTankOil)
265  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, APIGravity, gsoap_eml2_2::eml22__APIGravityUom)
266  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, MolecularWeight, gsoap_eml2_2::eml22__MolecularWeightUom)
267  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, GrossEnergyContentPerUnitMass, gsoap_eml2_2::eml22__EnergyPerMassUom)
268  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, NetEnergyContentPerUnitMass, gsoap_eml2_2::eml22__EnergyPerMassUom)
269  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, GrossEnergyContentPerUnitVolume, gsoap_eml2_2::eml22__EnergyPerVolumeUom)
270  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(StockTankOil, NetEnergyContentPerUnitVolume, gsoap_eml2_2::eml22__EnergyPerVolumeUom)
271 
275  GETTER_AND_SETTER_FLUID_COMPONENT_COMMON_ATTRIBUTES(NaturalGas)
276  GETTER_AND_SETTER_FLUID_COMPONENT_OPTIONAL_ATTRIBUTE(NaturalGas, GasGravity, double)
277  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(NaturalGas, MolecularWeight, gsoap_eml2_2::eml22__MolecularWeightUom)
278  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(NaturalGas, GrossEnergyContentPerUnitMass, gsoap_eml2_2::eml22__EnergyPerMassUom)
279  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(NaturalGas, NetEnergyContentPerUnitMass, gsoap_eml2_2::eml22__EnergyPerMassUom)
280  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(NaturalGas, GrossEnergyContentPerUnitVolume, gsoap_eml2_2::eml22__EnergyPerVolumeUom)
281  GETTER_AND_SETTER_FLUID_COMPONENT_MEASURE_ATTRIBUTE(NaturalGas, NetEnergyContentPerUnitVolume, gsoap_eml2_2::eml22__EnergyPerVolumeUom)
282 
288  DLL_IMPORT_OR_EXPORT void setRockFluidOrganization(RESQML2_NS::RockFluidOrganizationInterpretation* rockFluidOrg);
289 
295  COMMON_NS::DataObjectReference getRockFluidOrganizationDor() const;
296 
302  DLL_IMPORT_OR_EXPORT RESQML2_NS::RockFluidOrganizationInterpretation* getRockFluidOrganization() const;
303 
309  DLL_IMPORT_OR_EXPORT std::vector<class FluidCharacterization *> getFluidCharacterizationSet() const;
310 
316  DLL_IMPORT_OR_EXPORT uint64_t getFluidCharacterizationCount() const;
317 
328  DLL_IMPORT_OR_EXPORT class FluidCharacterization * getFluidCharacterization(uint64_t index) const;
329 
335  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
336 
342  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
343 
347  DLL_IMPORT_OR_EXPORT static const char* XML_NS;
348 
352  DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
353 
356  };
357 }
Definition: FluidCharacterization.h:110
Definition: FluidSystem.h:103
FluidSystem(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, gsoap_eml2_2::eml22__ReferenceCondition referenceCondition, gsoap_eml2_2::prodml21__ReservoirFluidKind reservoirFluidKind, double gasOilRatio, gsoap_eml2_2::eml22__VolumePerVolumeUom gasOilRatioUom)
Creates an instance of this class in a gsoap context.
std::string getXmlNamespace() const final
Definition: FluidSystem.h:352
FluidSystem(gsoap_eml2_2::prodml21__FluidSystem *fromGsoap)
Definition: FluidSystem.h:168
void loadTargetRelationships() final
static const char * XML_NS
Definition: FluidSystem.h:347
FluidSystem(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: FluidSystem.h:113
FluidSystem(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, double temperatureValue, gsoap_eml2_2::eml22__ThermodynamicTemperatureUom temperatureUom, double pressureValue, gsoap_eml2_2::eml22__PressureUom pressureUom, gsoap_eml2_2::prodml21__ReservoirFluidKind reservoirFluidKind, double gasOilRatio, gsoap_eml2_2::eml22__VolumePerVolumeUom gasOilRatioUom)
Creates an instance of this class in a gsoap context.