| 212 | } |
| 213 | |
| 214 | boost::optional<RefrigerationSystem> RefrigerationCondenserCascade_Impl::heatRejectingSystem() const { |
| 215 | boost::optional<RefrigerationSystem> result; |
| 216 | |
| 217 | auto refrigerationCondenserCascade = this->getObject<RefrigerationCondenserCascade>(); |
| 218 | for (const RefrigerationSystem& refrigerationSystem : this->model().getConcreteModelObjects<RefrigerationSystem>()) { |
| 219 | if (auto cond = refrigerationSystem.refrigerationCondenser()) { |
| 220 | if (cond.get() == refrigerationCondenserCascade) { |
| 221 | result = refrigerationSystem; |
| 222 | break; |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | return result; |
| 227 | } |
| 228 | |
| 229 | void RefrigerationCondenserCascade_Impl::removeFromHeatRejectingSystem() { |
| 230 | if (boost::optional<RefrigerationSystem> refrigerationSystem = this->heatRejectingSystem()) { |