21 #include "PvtSpecification.h"
32 #define GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(vectorName, attributeName, attributeDatatype)\
33 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, const attributeDatatype& value);\
34 DLL_IMPORT_OR_EXPORT bool has##vectorName##attributeName(unsigned int index) const {\
35 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet != nullptr &&\
36 static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName.size() > index &&\
37 static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName[index]->attributeName != nullptr;\
39 DLL_IMPORT_OR_EXPORT attributeDatatype get##vectorName##attributeName(unsigned int index) const {\
40 if (!has##vectorName##attributeName(index)) { throw std::out_of_range("The index is out of range"); }\
41 return *static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName[index]->attributeName;\
51 #define GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(vectorName, attributeName, uomDatatype)\
52 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom);\
53 DLL_IMPORT_OR_EXPORT double has##vectorName##attributeName(unsigned int index) const {\
54 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet != nullptr &&\
55 static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName.size() > index &&\
56 static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName[index]->attributeName != nullptr;\
58 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const {\
59 if (!has##vectorName##attributeName(index)) { throw std::out_of_range("The index is out of range"); }\
60 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName[index]->attributeName->__item;\
62 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const {\
63 if (!has##vectorName##attributeName(index)) { throw std::out_of_range("The index is out of range"); }\
64 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*>(gsoapProxy)->ComponentPropertySet->vectorName[index]->attributeName->uom;\
67 namespace PRODML2_1_NS
89 DLL_IMPORT_OR_EXPORT
bool hasMixingRule()
const {
return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->MixingRule !=
nullptr; }
98 DLL_IMPORT_OR_EXPORT gsoap_eml2_2::prodml21__MixingRule
getMixingRule()
const {
99 if (!hasMixingRule()) {
throw std::invalid_argument(
"There is no mixing rule to get"); }
100 return *
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->MixingRule;
108 DLL_IMPORT_OR_EXPORT
void setMixingRule(gsoap_eml2_2::prodml21__MixingRule mixingRule);
118 if (
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->BinaryInteractionCoefficientSet ==
nullptr) {
122 size_t count =
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->BinaryInteractionCoefficientSet->BinaryInteractionCoefficient.size();
123 if (count > (std::numeric_limits<unsigned int>::max)()) {
124 throw std::out_of_range(
"There are too much coefficient");
126 return static_cast<unsigned int>(count);
140 if (index >= getBinaryInteractionCoefficientCount()) {
141 throw std::out_of_range(
"The index is out of range");
144 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->BinaryInteractionCoefficientSet->BinaryInteractionCoefficient[index]->fluidComponent1Reference;
158 if (index >= getBinaryInteractionCoefficientCount()) {
159 throw std::out_of_range(
"The index is out of range");
162 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->BinaryInteractionCoefficientSet->BinaryInteractionCoefficient[index]->fluidComponent2Reference !=
nullptr;
176 if (!hasBinaryInteractionCoefficientFluidComponent2Reference(index)) {
177 throw std::out_of_range(
"There is no FluidComponent2Reference at this index");
180 return *
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->BinaryInteractionCoefficientSet->BinaryInteractionCoefficient[index]->fluidComponent2Reference;
200 if (
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->ComponentPropertySet ==
nullptr) {
204 size_t count =
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->ComponentPropertySet->FluidComponentProperty.size();
205 if (count > (std::numeric_limits<unsigned int>::max)()) {
206 throw std::out_of_range(
"There are too much component property");
208 return static_cast<unsigned int>(count);
228 if (
static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->ComponentPropertySet ==
nullptr ||
229 static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->ComponentPropertySet->FluidComponentProperty.size() <= index) {
230 throw std::out_of_range(
"The FluidComponentProperty at this index does not exist");
233 return static_cast<gsoap_eml2_2::prodml21__AbstractCompositionalModel*
>(gsoapProxy)->ComponentPropertySet->FluidComponentProperty[index]->fluidComponentReference;
236 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, AcentricFactor,
double)
237 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, OmegaA,
double)
238 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, OmegaB,
double)
239 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, VolumeShiftParameter,
double)
240 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, Parachor,
double)
241 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_OPTIONAL_ATTRIBUTE(FluidComponentProperty, Remark, std::string)
243 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, CriticalPressure, std::string)
244 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, CriticalTemperature, gsoap_eml2_2::eml22__ThermodynamicTemperatureUom)
245 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, ReferenceTemperatureZJ, gsoap_eml2_2::eml22__ThermodynamicTemperatureUom)
246 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, CriticalViscosity, gsoap_eml2_2::eml22__DynamicViscosityUom)
247 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, CompactVolume, std::string)
248 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, CriticalVolume, gsoap_eml2_2::eml22__MolarVolumeUom)
249 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, PartialMolarVolume, gsoap_eml2_2::eml22__MolarVolumeUom)
250 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, MassDensity, std::string)
251 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, PartialMolarDensity, std::string)
252 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, ReferenceDensityZJ, std::string)
253 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, ReferenceGravityZJ, gsoap_eml2_2::eml22__APIGravityUom)
254 GETTER_AND_SETTER_FLUID_COMPONENT_PROPERTY_MEASURE_ATTRIBUTE(FluidComponentProperty, ViscousCompressibility, gsoap_eml2_2::eml22__ReciprocalPressureUom)
Definition: CompositionalSpecification.h:71
void pushBackFluidComponentProperty(const std::string &fluidComponentReference)
bool hasBinaryInteractionCoefficientFluidComponent2Reference(unsigned int index) const
Definition: CompositionalSpecification.h:156
unsigned int getFluidComponentPropertyCount() const
Definition: CompositionalSpecification.h:199
virtual ~CompositionalSpecification()=default
bool hasMixingRule() const
Definition: CompositionalSpecification.h:89
std::string getBinaryInteractionCoefficientFluidComponent2Reference(unsigned int index) const
Definition: CompositionalSpecification.h:174
gsoap_eml2_2::prodml21__MixingRule getMixingRule() const
Definition: CompositionalSpecification.h:98
CompositionalSpecification(gsoap_eml2_2::prodml21__AbstractCompositionalModel *fromGsoap)
Definition: CompositionalSpecification.h:79
std::string getFluidComponentPropertyFluidComponentReference(unsigned int index) const
Definition: CompositionalSpecification.h:227
void setMixingRule(gsoap_eml2_2::prodml21__MixingRule mixingRule)
unsigned int getBinaryInteractionCoefficientCount() const
Definition: CompositionalSpecification.h:117
std::string getBinaryInteractionCoefficientFluidComponent1Reference(unsigned int index) const
Definition: CompositionalSpecification.h:138
void pushBackBinaryInteractionCoefficient(double value, const std::string &fluidComponent1Reference, const std::string &fluidComponent2Reference="")
Definition: PvtSpecification.h:42