| 504 | } |
| 505 | |
| 506 | bool RefrigerationSystem_Impl::addHighStageCompressor(const RefrigerationCompressor& refrigerationHighStageCompressor) { |
| 507 | // Enforce unicity |
| 508 | if (boost::optional<RefrigerationSystem> currentSystem = refrigerationHighStageCompressor.system()) { |
| 509 | LOG(Warn, refrigerationHighStageCompressor.briefDescription() |
| 510 | << " was removed from its existing RefrigerationSystem (High Stage) named '" << currentSystem->nameString() << "'."); |
| 511 | currentSystem->removeCompressor(refrigerationHighStageCompressor); |
| 512 | } |
| 513 | boost::optional<ModelObjectList> modelObjectList = highStageCompressorList(); |
| 514 | return addTemplate<RefrigerationCompressor>(refrigerationHighStageCompressor, modelObjectList); |
| 515 | } |
| 516 | |
| 517 | void RefrigerationSystem_Impl::removeHighStageCompressor(const RefrigerationCompressor& refrigerationHighStageCompressor) { |
| 518 | boost::optional<ModelObjectList> modelObjectList = highStageCompressorList(); |