• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LOG_AND_THROW函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LOG_AND_THROW函数的典型用法代码示例。如果您正苦于以下问题:C++ LOG_AND_THROW函数的具体用法?C++ LOG_AND_THROW怎么用?C++ LOG_AND_THROW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LOG_AND_THROW函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: optionalCoolingCapacityModifierCurveFunctionofFlowFraction

 Curve CoilCoolingDXVariableRefrigerantFlow_Impl::coolingCapacityModifierCurveFunctionofFlowFraction() const {
   boost::optional<Curve> value = optionalCoolingCapacityModifierCurveFunctionofFlowFraction();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Cooling Capacity Modifier Curve Functionof Flow Fraction attached.");
   }
   return value.get();
 }
开发者ID:CUEBoxer,项目名称:OpenStudio,代码行数:7,代码来源:CoilCoolingDXVariableRefrigerantFlow.cpp


示例2: getDouble

 double RefractionExtinctionGlazing_Impl::thermalTransmittance() const {
   OptionalDouble od = getDouble(OS_WindowMaterial_Glazing_RefractionExtinctionMethodFields::InfraredTransmittanceatNormalIncidence,true);
   if (!od) {
     LOG_AND_THROW("Thermal transmittance not yet defined for " << briefDescription() << ".");
   }
   return *od;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:7,代码来源:RefractionExtinctionGlazing.cpp


示例3: optionalDefrostSchedule

 Schedule RefrigerationAirChiller_Impl::defrostSchedule() const {
   boost::optional<Schedule> value = optionalDefrostSchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Defrost Schedule attached.");
   }
   return value.get();
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:7,代码来源:RefrigerationAirChiller.cpp


示例4: optionalHeatExchanger

 AirToAirComponent CoilSystemCoolingWaterHeatExchangerAssisted_Impl::heatExchanger() const {
   boost::optional<AirToAirComponent> value = optionalHeatExchanger();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Heat Exchanger attached.");
   }
   return value.get();
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:7,代码来源:CoilSystemCoolingWaterHeatExchangerAssisted.cpp


示例5: optionalApplicabilitySchedule

 Schedule AvailabilityManagerNightVentilation_Impl::applicabilitySchedule() const {
   boost::optional<Schedule> value = optionalApplicabilitySchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Applicability Schedule attached.");
   }
   return value.get();
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:7,代码来源:AvailabilityManagerNightVentilation.cpp


示例6: LOG_AND_THROW

Quantity& Quantity::operator+=(const Quantity& rQuantity) {

  if (this == &rQuantity) {
    m_value *= 2.0;
    return *this;
  }

  if (m_units != rQuantity.m_units) {
    LOG_AND_THROW("Cannot add quantities with different units.");
  }

  if (scale() != rQuantity.scale()) {
    Quantity wRQuantity(rQuantity);
    wRQuantity.setScale(scale().exponent);
    m_value += wRQuantity.value();
  }
  else {
    m_value += rQuantity.value();
  }

  if (isTemperature() && rQuantity.isTemperature()) {
    if (!isAbsolute() && rQuantity.isAbsolute()) {
      setAsAbsolute();
    }
  }

  return *this;
}
开发者ID:airguider,项目名称:OpenStudio,代码行数:28,代码来源:Quantity.cpp


示例7: LOG_AND_THROW

void OSDoubleEdit2::completeBind() {

  // only let one of autosize/autocalculate
  if ((m_isAutosized && m_isAutocalculated) || 
      (m_isAutosized && m_autocalculate) || 
      (m_isAutocalculated && m_autosize)) 
  {
    LOG_AND_THROW("A field can only be autosized or autocalculated, it cannot be both.");
  }

  setEnabled(true);

  bool isConnected = false;
  isConnected = connect( this, SIGNAL(editingFinished()), this, SLOT(onEditingFinished()) );
  OS_ASSERT(isConnected);

  isConnected = connect( m_modelObject->getImpl<openstudio::model::detail::ModelObject_Impl>().get(),SIGNAL(onChange()),
                         this,SLOT(onModelObjectChange()) );
  OS_ASSERT(isConnected);

  isConnected = connect( m_modelObject->getImpl<openstudio::model::detail::ModelObject_Impl>().get(),SIGNAL(onRemoveFromWorkspace(Handle)),
                         this,SLOT(onModelObjectRemove(Handle)) );
  OS_ASSERT(isConnected);

  refreshTextAndLabel();
}
开发者ID:airguider,项目名称:OpenStudio,代码行数:26,代码来源:OSDoubleEdit.cpp


示例8: StraightComponent

AirTerminalSingleDuctParallelPIUReheat::AirTerminalSingleDuctParallelPIUReheat( const Model& model,
                                                                                Schedule & schedule,
                                                                                HVACComponent & fan,
                                                                                HVACComponent & reheatCoil )
  : StraightComponent(AirTerminalSingleDuctParallelPIUReheat::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::AirTerminalSingleDuctParallelPIUReheat_Impl>());

  bool test = setAvailabilitySchedule(schedule);
  if (!test) {
    remove();
    LOG_AND_THROW("Could not construct " << briefDescription() << ", because could not set its "
        << "availability schedule to " << schedule.briefDescription() << ".");
  }

  setFan(fan);

  setReheatCoil(reheatCoil);

  autosizeMaximumHotWaterorSteamFlowRate();

  setMinimumHotWaterorSteamFlowRate(0.0);

  setConvergenceTolerance(0.001);

  autosizeMaximumPrimaryAirFlowRate();

  autosizeMaximumSecondaryAirFlowRate();

  autosizeMinimumPrimaryAirFlowFraction();

  autosizeFanOnFlowFraction();
}
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:33,代码来源:AirTerminalSingleDuctParallelPIUReheat.cpp


示例9: LOG_AND_THROW

std::string OSArgument::valueAsString() const
{
  if (!hasValue()) {
    LOG_AND_THROW("Argument " << name() << " has no value.");
  }
  return printQVariant(m_value);
}
开发者ID:Rahjou,项目名称:OpenStudio,代码行数:7,代码来源:OSArgument.cpp


示例10: optionalChillerHeaterModulesControlSchedule

 Schedule CentralHeatPumpSystemModule_Impl::chillerHeaterModulesControlSchedule() const {
   boost::optional<Schedule> value = optionalChillerHeaterModulesControlSchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Chiller Heater Modules Control Schedule attached.");
   }
   return value.get();
 }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:7,代码来源:CentralHeatPumpSystemModule.cpp


示例11: ZoneHVACComponent

ZoneHVACLowTemperatureRadiantElectric::ZoneHVACLowTemperatureRadiantElectric(const Model& model, Schedule & availabilitySchedule, Schedule & heatingTemperatureSchedule)
  : ZoneHVACComponent(ZoneHVACLowTemperatureRadiantElectric::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACLowTemperatureRadiantElectric_Impl>());


  bool ok = setAvailabilitySchedule(availabilitySchedule);
     
  if (!ok) 
  {
    //remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                << availabilitySchedule.briefDescription() << ".");
  }
  
  ok = setHeatingSetpointTemperatureSchedule(heatingTemperatureSchedule);
     
  if (!ok) 
  {
    //remove();
    //LOG_AND_THROW("Unable to set " << briefDescription() << "'s heating temperature schedule to "
    //            << schedule.briefDescription() << ".");
  }
  
  resetRadiantSurfaceType();
  autosizeMaximumElectricalPowertoPanel();
  setTemperatureControlType("MeanAirTemperature");
  setHeatingThrottlingRange(2.0);
  //setString(OS_ZoneHVAC_LowTemperatureRadiant_ElectricFields::HeatingSetpointTemperatureScheduleName,"");
  
}
开发者ID:chlimit,项目名称:OpenStudio,代码行数:31,代码来源:ZoneHVACLowTemperatureRadiantElectric.cpp


示例12: optionalChillerHeaterModulesPerformanceComponent

 ChillerHeaterPerformanceElectricEIR CentralHeatPumpSystemModule_Impl::chillerHeaterModulesPerformanceComponent() const {
   boost::optional<ChillerHeaterPerformanceElectricEIR> value = optionalChillerHeaterModulesPerformanceComponent();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Chiller Heater Modules Performance Component attached.");
   }
   return value.get();
 }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:7,代码来源:CentralHeatPumpSystemModule.cpp


示例13: molecularWeight

 double GasMixture_Impl::getThermalConductivity(double temperature) const {
   double molecularWeight(0.0); // cumulative sum of fraction * molecular weight
   double result(0.0); // cumulative sum of conductivity * fraction * molecular weight
   for (unsigned i = 0, n = numGases(); i < n; ++i) {
     std::string type = getGasType(i);
     double fraction = getGasFraction(i);
     double weight(0.0);
     std::vector<double> coeffs;
     if (openstudio::istringEqual(type,"Air")) {
       weight = FenestrationMaterial::airMolecularWeight();
       coeffs = FenestrationMaterial::airThermalConductivityCoefficients();
     }
     else if (openstudio::istringEqual(type,"Argon")) {
       weight = FenestrationMaterial::argonMolecularWeight();
       coeffs = FenestrationMaterial::argonThermalConductivityCoefficients();
     }
     else if (openstudio::istringEqual(type,"Krypton")) {
       weight = FenestrationMaterial::kryptonMolecularWeight();
       coeffs = FenestrationMaterial::kryptonThermalConductivityCoefficients();
     }
     else if (openstudio::istringEqual(type,"Xenon")) {
       weight = FenestrationMaterial::xenonMolecularWeight();
       coeffs = FenestrationMaterial::xenonThermalConductivityCoefficients();
     }
     else {
       LOG_AND_THROW("Unknown gasType listed in " << briefDescription() << ".");
     }
     molecularWeight += weight*fraction;
     result += (coeffs[0] + (coeffs[1] * temperature) + (coeffs[2] * ::pow(temperature,2.0))) * fraction * weight;
   }
   result /= molecularWeight;
   return result;
 }
开发者ID:ORNL-BTRIC,项目名称:OpenStudio,代码行数:33,代码来源:GasMixture.cpp


示例14: optionalAvailabilitySchedule

 Schedule CoilCoolingDXVariableRefrigerantFlow_Impl::availabilitySchedule() const {
   boost::optional<Schedule> value = optionalAvailabilitySchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
   }
   return value.get();
 }
开发者ID:CUEBoxer,项目名称:OpenStudio,代码行数:7,代码来源:CoilCoolingDXVariableRefrigerantFlow.cpp


示例15: LOG_AND_THROW

 Schedule ZoneMixing_Impl::schedule() const {
   boost::optional<Schedule> value = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneMixingFields::ScheduleName);
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Schedule attached.");
   }
   return value.get();
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:7,代码来源:ZoneMixing.cpp


示例16: optionalAvailabilitySchedule

 Schedule ControllerMechanicalVentilation_Impl::availabilitySchedule() const {
   boost::optional<Schedule> value = optionalAvailabilitySchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
   }
   return value.get();
 }
开发者ID:ORNL-BTRIC,项目名称:OpenStudio,代码行数:7,代码来源:ControllerMechanicalVentilation.cpp


示例17: optionalFlowRateFractionSchedule

 Schedule LoadProfilePlant_Impl::flowRateFractionSchedule() const {
   boost::optional<Schedule> value = optionalFlowRateFractionSchedule();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Flow Rate Fraction Schedule attached.");
   }
   return value.get();
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:7,代码来源:LoadProfilePlant.cpp


示例18: getComponentObject

 ModelObject ComponentData_Impl::primaryComponentObject() const {
   OptionalModelObject omo = getComponentObject(0);
   if (!omo) {
     LOG_AND_THROW("ComponentData objects must always be able to return the primary object in the component.");
   }
   return *omo;
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:7,代码来源:ComponentData.cpp


示例19: optionalHeatingCOPFunctionofAirFlowFractionCurve

 Curve CoilWaterHeatingAirToWaterHeatPumpWrapped_Impl::heatingCOPFunctionofAirFlowFractionCurve() const {
   boost::optional<Curve> value = optionalHeatingCOPFunctionofAirFlowFractionCurve();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Heating COPFunctionof Air Flow Fraction Curve attached.");
   }
   return value.get();
 }
开发者ID:NREL,项目名称:OpenStudio,代码行数:7,代码来源:CoilWaterHeatingAirToWaterHeatPumpWrapped.cpp


示例20: optionalChargingCurve

 Curve ThermalStorageIceDetailed_Impl::chargingCurve() const {
   auto value = optionalChargingCurve();
   if (!value) {
     LOG_AND_THROW(briefDescription() << " does not have an Charging Curve attached.");
   }
   return value.get();
 }
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:7,代码来源:ThermalStorageIceDetailed.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LOG_API函数代码示例发布时间:2022-05-30
下一篇:
C++ LOG_ALWAYS_FATAL_IF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap