本文整理汇总了C++中OptionalDouble::get方法的典型用法代码示例。如果您正苦于以下问题:C++ OptionalDouble::get方法的具体用法?C++ OptionalDouble::get怎么用?C++ OptionalDouble::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OptionalDouble
的用法示例。
在下文中一共展示了OptionalDouble::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lightsDefinition
boost::optional<double> Lights_Impl::powerPerPerson() const {
OptionalDouble temp = lightsDefinition().wattsperPerson();
if (temp) {
return temp.get() * multiplier();
}
return temp;
}
示例2: electricEquipmentDefinition
boost::optional<double> ElectricEquipment_Impl::designLevel() const {
OptionalDouble result = electricEquipmentDefinition().designLevel();
if (result) {
return result.get() * multiplier();
}
return result;
}
示例3: setLoopDesignTemperatureDifference
bool SizingPlant_Impl::setLoopDesignTemperatureDifference(const Quantity& loopDesignTemperatureDifference) {
OptionalDouble value = getDoubleFromQuantity(OS_Sizing_PlantFields::LoopDesignTemperatureDifference,loopDesignTemperatureDifference);
if (!value) {
return false;
}
return setLoopDesignTemperatureDifference(value.get());
}
示例4: setSurfaceTemperatureUpperLimit
bool HeatBalanceAlgorithm_Impl::setSurfaceTemperatureUpperLimit(const Quantity& surfaceTemperatureUpperLimit) {
OptionalDouble value = getDoubleFromQuantity(OS_HeatBalanceAlgorithmFields::SurfaceTemperatureUpperLimit,surfaceTemperatureUpperLimit);
if (!value) {
return false;
}
return setSurfaceTemperatureUpperLimit(value.get());
}
示例5: setZoneAirDistributionEffectivenessinHeatingMode
bool DesignSpecificationZoneAirDistribution_Impl::setZoneAirDistributionEffectivenessinHeatingMode(const Quantity& zoneAirDistributionEffectivenessinHeatingMode) {
OptionalDouble value = getDoubleFromQuantity(OS_DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessinHeatingMode,zoneAirDistributionEffectivenessinHeatingMode);
if (!value) {
return false;
}
return setZoneAirDistributionEffectivenessinHeatingMode(value.get());
}
示例6: setToleranceforTimeCoolingSetpointNotMet
bool OutputControlReportingTolerances_Impl::setToleranceforTimeCoolingSetpointNotMet(const Quantity& toleranceforTimeCoolingSetpointNotMet) {
OptionalDouble value = getDoubleFromQuantity(OS_OutputControl_ReportingTolerancesFields::ToleranceforTimeCoolingSetpointNotMet,toleranceforTimeCoolingSetpointNotMet);
if (!value) {
return false;
}
return setToleranceforTimeCoolingSetpointNotMet(value.get());
}
示例7: setTubeSpacing
bool ConstructionWithInternalSource_Impl::setTubeSpacing(const Quantity& tubeSpacing) {
OptionalDouble value = getDoubleFromQuantity(OS_Construction_InternalSourceFields::TubeSpacing,tubeSpacing);
if (!value) {
return false;
}
return setTubeSpacing(value.get());
}
示例8: setVisibleAbsorptance
bool MasslessOpaqueMaterial_Impl::setVisibleAbsorptance(const Quantity& visibleAbsorptance) {
OptionalDouble value = getDoubleFromQuantity(OS_Material_NoMassFields::VisibleAbsorptance,visibleAbsorptance);
if (!value) {
return false;
}
return setVisibleAbsorptance(value.get());
}
示例9: setDensity
bool MasslessOpaqueMaterial_Impl::setDensity(const Quantity& density) {
OptionalDouble value = getDoubleFromQuantity(OS_MaterialFields::Density,density);
if (!value) {
return false;
}
return setDensity(value.get());
}
示例10: setWindCoefficient
bool SpaceInfiltrationEffectiveLeakageArea_Impl::setWindCoefficient(const Quantity& windCoefficient) {
OptionalDouble value = getDoubleFromQuantity(OS_SpaceInfiltration_EffectiveLeakageAreaFields::WindCoefficient,windCoefficient);
if (!value) {
return false;
}
return setWindCoefficient(value.get());
}
示例11: setThermalResistance
bool MasslessOpaqueMaterial_Impl::setThermalResistance(const Quantity& thermalResistance) {
OptionalDouble value = getDoubleFromQuantity(OS_Material_NoMassFields::ThermalResistance,thermalResistance);
if (!value) {
return false;
}
return setThermalResistance(value.get());
}
示例12: setEffectiveAirLeakageArea
bool SpaceInfiltrationEffectiveLeakageArea_Impl::setEffectiveAirLeakageArea(const Quantity& effectiveAirLeakageArea) {
OptionalDouble value = getDoubleFromQuantity(OS_SpaceInfiltration_EffectiveLeakageAreaFields::EffectiveAirLeakageArea,effectiveAirLeakageArea);
if (!value) {
return false;
}
return setEffectiveAirLeakageArea(value.get());
}
示例13: internalMassDefinition
boost::optional<double> InternalMass_Impl::surfaceAreaPerPerson() const {
OptionalDouble result = internalMassDefinition().surfaceAreaperPerson();
if (result) {
return result.get() * multiplier();
}
return result;
}
示例14: setTemperatureConvergenceToleranceValue
bool SimulationControl_Impl::setTemperatureConvergenceToleranceValue(const Quantity& temperatureConvergenceToleranceValue) {
OptionalDouble value = getDoubleFromQuantity(OS_SimulationControlFields::TemperatureConvergenceToleranceValue,temperatureConvergenceToleranceValue);
if (!value) {
return false;
}
return setTemperatureConvergenceToleranceValue(value.get());
}
示例15: setDirtCorrectionFactorforSolarandVisibleTransmittance
bool RefractionExtinctionGlazing_Impl::setDirtCorrectionFactorforSolarandVisibleTransmittance(const Quantity& dirtCorrectionFactorforSolarandVisibleTransmittance) {
OptionalDouble value = getDoubleFromQuantity(OS_WindowMaterial_Glazing_RefractionExtinctionMethodFields::DirtCorrectionFactorforSolarandVisibleTransmittance,dirtCorrectionFactorforSolarandVisibleTransmittance);
if (!value) {
return false;
}
return setDirtCorrectionFactorforSolarandVisibleTransmittance(value.get());
}