| 420 | } |
| 421 | |
| 422 | boost::optional<CoilCoolingDXMultiSpeed> CoilCoolingDXMultiSpeedStageData_Impl::parentCoil() const { |
| 423 | auto coils = getObject<ModelObject>().getModelObjectSources<CoilCoolingDXMultiSpeed>(CoilCoolingDXMultiSpeed::iddObjectType()); |
| 424 | auto count = coils.size(); |
| 425 | if (count == 1) { |
| 426 | return coils[0]; |
| 427 | } else if (count > 1) { |
| 428 | LOG(Error, briefDescription() << " is referenced by more than one CoilCoolingDXMultiSpeed, returning the first"); |
| 429 | return coils[0]; |
| 430 | } |
| 431 | return boost::none; |
| 432 | } |
| 433 | |
| 434 | boost::optional<std::tuple<int, CoilCoolingDXMultiSpeed>> CoilCoolingDXMultiSpeedStageData_Impl::stageIndexAndParentCoil() const { |
| 435 | |