本文整理汇总了C++中boost::optional::get方法的典型用法代码示例。如果您正苦于以下问题:C++ optional::get方法的具体用法?C++ optional::get怎么用?C++ optional::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::optional
的用法示例。
在下文中一共展示了optional::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setNumberofThreadsAllowed
bool ProgramControl_Impl::setNumberofThreadsAllowed(boost::optional<int> numberofThreadsAllowed) {
bool result(false);
if (numberofThreadsAllowed) {
result = setInt(OS_ProgramControlFields::NumberofThreadsAllowed, numberofThreadsAllowed.get());
}
else {
resetNumberofThreadsAllowed();
result = true;
}
return result;
}
示例2: setViscosityCoefficientA
bool Gas_Impl::setViscosityCoefficientA(boost::optional<double> viscosityCoefficientA) {
bool result(false);
if (viscosityCoefficientA) {
result = setDouble(OS_WindowMaterial_GasFields::ViscosityCoefficientA, viscosityCoefficientA.get());
}
else {
resetViscosityCoefficientA();
result = true;
}
return result;
}
示例3: setConstruction
bool PipeIndoor_Impl::setConstruction(const boost::optional<Construction>& construction) {
bool result(false);
if (construction) {
result = setPointer(OS_Pipe_IndoorFields::Construction, construction.get().handle());
}
else {
resetConstruction();
result = true;
}
return result;
}
示例4: setOutdoorAirInletNode
bool FluidCoolerSingleSpeed_Impl::setOutdoorAirInletNode(const boost::optional<Node>& node) {
bool result(false);
if (node) {
result = setPointer(OS_FluidCooler_SingleSpeedFields::OutdoorAirInletNode, node.get().handle());
}
else {
resetOutdoorAirInletNode();
result = true;
}
return result;
}
示例5: setConductivityCoefficientB
void Gas_Impl::setConductivityCoefficientB(boost::optional<double> conductivityCoefficientB) {
bool result(false);
if (conductivityCoefficientB) {
result = setDouble(OS_WindowMaterial_GasFields::ConductivityCoefficientB, conductivityCoefficientB.get());
}
else {
resetConductivityCoefficientB();
result = true;
}
OS_ASSERT(result);
}
示例6: setAmbientTemperatureZone
bool PipeIndoor_Impl::setAmbientTemperatureZone(const boost::optional<ThermalZone>& thermalZone) {
bool result(false);
if (thermalZone) {
result = setPointer(OS_Pipe_IndoorFields::AmbientTemperatureZone, thermalZone.get().handle());
}
else {
resetAmbientTemperatureZone();
result = true;
}
return result;
}
示例7: setHeatingSource
bool CoilHeatingDesuperheater_Impl::setHeatingSource(const boost::optional<ModelObject>& modelObject) {
bool result(false);
if (modelObject) {
result = setPointer(OS_Coil_Heating_DesuperheaterFields::HeatingSourceName, modelObject.get().handle());
}
else {
resetHeatingSource();
result = true;
}
return result;
}
示例8: setMaximumFlowRate
bool FanConstantVolume_Impl::setMaximumFlowRate(boost::optional<double> maximumFlowRate) {
bool result(false);
if (maximumFlowRate) {
result = setDouble(OS_Fan_ConstantVolumeFields::MaximumFlowRate, maximumFlowRate.get());
}
else {
resetMaximumFlowRate();
result = true;
}
return result;
}
示例9: setRatedFanPower
bool HumidifierSteamElectric_Impl::setRatedFanPower(boost::optional<double> ratedFanPower) {
bool result(false);
if (ratedFanPower) {
result = setDouble(OS_Humidifier_Steam_ElectricFields::RatedFanPower, ratedFanPower.get());
}
else {
resetRatedFanPower();
result = true;
}
return result;
}
示例10: setStandbyPower
bool HumidifierSteamElectric_Impl::setStandbyPower(boost::optional<double> standbyPower) {
bool result(false);
if (standbyPower) {
result = setDouble(OS_Humidifier_Steam_ElectricFields::StandbyPower, standbyPower.get());
}
else {
resetStandbyPower();
result = true;
}
return result;
}
示例11: setMechanicalSubcooler
bool RefrigerationSystem_Impl::setMechanicalSubcooler(const boost::optional<RefrigerationSubcoolerMechanical>& refrigerationSubcoolerMechanical) {
bool result(false);
if (refrigerationSubcoolerMechanical) {
result = setPointer(OS_Refrigeration_SystemFields::MechanicalSubcoolerName, refrigerationSubcoolerMechanical.get().handle());
}
else {
resetMechanicalSubcooler();
result = true;
}
return result;
}
示例12: setSuctionPipingZone
bool RefrigerationSystem_Impl::setSuctionPipingZone(const boost::optional<ThermalZone>& thermalZone) {
bool result(false);
if (thermalZone) {
result = setPointer(OS_Refrigeration_SystemFields::SuctionPipingZoneName, thermalZone.get().handle());
}
else {
resetSuctionPipingZone();
result = true;
}
return result;
}
示例13: preconditions_hold_take_
value_type preconditions_hold_take_() {
if(LASERCAKE_NO_THREADS) {
caller_error_if(!contents_, "'take' from an empty m_var in single-threaded mode blocks.");
}
value_type result = contents_.get();
contents_.reset();
#if !LASERCAKE_NO_THREADS
writers_wait_on_.notify_one();
#endif
return result;
}
示例14: setThermalResistance
bool AirGap_Impl::setThermalResistance(boost::optional<double> thermalResistance) {
bool result(false);
if (thermalResistance) {
result = setDouble(OS_Material_AirGapFields::ThermalResistance, thermalResistance.get());
}
else {
resetThermalResistance();
result = true;
}
return result;
}
示例15: setViscosityCoefficientC
void Gas_Impl::setViscosityCoefficientC(boost::optional<double> viscosityCoefficientC) {
bool result(false);
if (viscosityCoefficientC) {
result = setDouble(OS_WindowMaterial_GasFields::ViscosityCoefficientC, viscosityCoefficientC.get());
}
else {
resetViscosityCoefficientC();
result = true;
}
OS_ASSERT(result);
}