| 700 | } |
| 701 | |
| 702 | boost::optional<RefrigerationSystem> RefrigerationSecondarySystem_Impl::system() const { |
| 703 | boost::optional<RefrigerationSystem> result; |
| 704 | |
| 705 | auto refrigerationSecondarySystem = this->getObject<RefrigerationSecondarySystem>(); |
| 706 | for (const RefrigerationSystem& refrigerationSystem : this->model().getConcreteModelObjects<RefrigerationSystem>()) { |
| 707 | RefrigerationSecondarySystemVector refrigerationSecondarySystems = refrigerationSystem.secondarySystemLoads(); |
| 708 | if (!refrigerationSecondarySystems.empty() |
| 709 | && std::find(refrigerationSecondarySystems.begin(), refrigerationSecondarySystems.end(), refrigerationSecondarySystem) |
| 710 | != refrigerationSecondarySystems.end()) { |
| 711 | result = refrigerationSystem; |
| 712 | break; |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | return result; |
| 717 | } |
| 718 | |
| 719 | void RefrigerationSecondarySystem_Impl::removeFromSystem() { |
| 720 | if (boost::optional<RefrigerationSystem> refrigerationSystem = this->system()) { |
no test coverage detected