本文整理汇总了C++中ModelObject::get方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::get方法的具体用法?C++ ModelObject::get怎么用?C++ ModelObject::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelObject
的用法示例。
在下文中一共展示了ModelObject::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: idfObject
boost::optional<IdfObject> ForwardTranslator::translateCoilHeatingDXSingleSpeedWithoutUnitary( CoilHeatingDXSingleSpeed & modelObject )
{
boost::optional<std::string> s;
boost::optional<double> value;
IdfObject idfObject(IddObjectType::Coil_Heating_DX_SingleSpeed);
m_idfObjects.push_back(idfObject);
// Name
s = modelObject.name();
if( s )
{
idfObject.setName(*s);
}
// AvailabilityScheduleName
if( boost::optional<Schedule> schedule = modelObject.availabilitySchedule() )
{
if( boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get()) )
{
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::AvailabilityScheduleName,_schedule->name().get());
}
}
// AirInletNodeName
boost::optional<std::string> airInletNodeName;
if( boost::optional<ModelObject> mo = modelObject.inletModelObject() )
{
if( boost::optional<Node> node = mo->optionalCast<Node>() )
{
if( (s = node->name()) )
{
airInletNodeName = s;
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::AirInletNodeName,s.get());
}
}
}
// AirOutletNodeName
boost::optional<std::string> airOutletNodeName;
if( boost::optional<ModelObject> mo = modelObject.outletModelObject() )
{
if( boost::optional<Node> node = mo->optionalCast<Node>() )
{
if( (s = node->name()) )
{
airOutletNodeName = s;
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::AirOutletNodeName,s.get());
}
}
}
// RatedTotalHeatingCapacity
if( modelObject.isRatedTotalHeatingCapacityAutosized() )
{
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity,"Autosize");
}
else if( (value = modelObject.ratedTotalHeatingCapacity()) )
{
idfObject.setDouble(Coil_Heating_DX_SingleSpeedFields::RatedTotalHeatingCapacity,value.get());
}
// RatedCOP
if( (value = modelObject.ratedCOP()) )
{
idfObject.setDouble(Coil_Heating_DX_SingleSpeedFields::RatedCOP,value.get());
}
// RatedAirFlowRate
if( modelObject.isRatedAirFlowRateAutosized() )
{
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate,"Autosize");
}
else if( (value = modelObject.ratedAirFlowRate()) )
{
idfObject.setDouble(Coil_Heating_DX_SingleSpeedFields::RatedAirFlowRate,value.get());
}
// TotalHeatingCapacityFunctionofTemperatureCurveName
ModelObject curve = modelObject.totalHeatingCapacityFunctionofTemperatureCurve();
if( boost::optional<IdfObject> _curve = translateAndMapModelObject(curve) )
{
idfObject.setString(Coil_Heating_DX_SingleSpeedFields::TotalHeatingCapacityFunctionofTemperatureCurveName,_curve->name().get());
}
// TotalHeatingCapacityFunctionofFlowFractionCurveName
//.........这里部分代码省略.........