当前位置: 首页>>代码示例>>C++>>正文


C++ optional::get方法代码示例

本文整理汇总了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;
 }
开发者ID:Rahjou,项目名称:OpenStudio,代码行数:11,代码来源:ProgramControl.cpp

示例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;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:11,代码来源:Gas.cpp

示例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;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:11,代码来源:PipeIndoor.cpp

示例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;
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:11,代码来源:FluidCoolerSingleSpeed.cpp

示例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);
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:11,代码来源:Gas.cpp

示例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;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:11,代码来源:PipeIndoor.cpp

示例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;
}
开发者ID:BIMDataHub,项目名称:OpenStudio-IFC-Importer,代码行数:11,代码来源:CoilHeatingDesuperheater.cpp

示例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;
 }
开发者ID:CraigCasey,项目名称:OpenStudio,代码行数:11,代码来源:FanConstantVolume.cpp

示例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;
 }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:11,代码来源:HumidifierSteamElectric.cpp

示例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;
 }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:11,代码来源:HumidifierSteamElectric.cpp

示例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;
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:11,代码来源:RefrigerationSystem.cpp

示例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;
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:11,代码来源:RefrigerationSystem.cpp

示例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;
  }
开发者ID:Lasercake,项目名称:Lasercake,代码行数:11,代码来源:concurrency_utils.hpp

示例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;
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:11,代码来源:AirGap.cpp

示例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);
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:11,代码来源:Gas.cpp


注:本文中的boost::optional::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。