| 110 | } |
| 111 | |
| 112 | ModelObject AirLoopHVACUnitarySystem_Impl::clone(Model model) const { |
| 113 | // Mimic what StraightComponent_Impl::clone would do (we inherit ZoneHVACComponent here...) |
| 114 | auto modelObjectClone = ModelObject_Impl::clone(model).cast<AirLoopHVACUnitarySystem>(); // NOLINT(bugprone-parent-virtual-call) |
| 115 | modelObjectClone.setString(modelObjectClone.inletPort(), ""); |
| 116 | modelObjectClone.setString(modelObjectClone.outletPort(), ""); |
| 117 | |
| 118 | if (boost::optional<HVACComponent> supplyFan = this->supplyFan()) { |
| 119 | modelObjectClone.setSupplyFan(supplyFan->clone(model).cast<HVACComponent>()); |
| 120 | } |
| 121 | if (boost::optional<HVACComponent> coolingCoil = this->coolingCoil()) { |
| 122 | modelObjectClone.setCoolingCoil(coolingCoil->clone(model).cast<HVACComponent>()); |
| 123 | } |
| 124 | if (boost::optional<HVACComponent> heatingCoil = this->heatingCoil()) { |
| 125 | modelObjectClone.setHeatingCoil(heatingCoil->clone(model).cast<HVACComponent>()); |
| 126 | } |
| 127 | if (boost::optional<HVACComponent> supplementalHeatingCoil = this->supplementalHeatingCoil()) { |
| 128 | modelObjectClone.setSupplementalHeatingCoil(supplementalHeatingCoil->clone(model).cast<HVACComponent>()); |
| 129 | } |
| 130 | if (auto designSpec = designSpecificationMultispeedObject()) { |
| 131 | modelObjectClone.setDesignSpecificationMultispeedObject(designSpec->clone(model).cast<UnitarySystemPerformanceMultispeed>()); |
| 132 | } |
| 133 | |
| 134 | return std::move(modelObjectClone); |
| 135 | } |
| 136 | |
| 137 | std::vector<ModelObject> AirLoopHVACUnitarySystem_Impl::children() const { |
| 138 | std::vector<ModelObject> result; |
nothing calls this directly
no test coverage detected