MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / setMechanicalSubcooler

Method setMechanicalSubcooler

src/model/RefrigerationSystem.cpp:668–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666 }
667
668 bool RefrigerationSystem_Impl::setMechanicalSubcooler(const boost::optional<RefrigerationSubcoolerMechanical>& refrigerationSubcoolerMechanical) {
669 bool result(false);
670 if (refrigerationSubcoolerMechanical) {
671 // Enforce unicity
672 if (boost::optional<RefrigerationSystem> currentSystem = refrigerationSubcoolerMechanical->system()) {
673 LOG(Warn, refrigerationSubcoolerMechanical->briefDescription()
674 << " was removed from its existing RefrigerationSystem named '" << currentSystem->nameString() << "'.");
675 currentSystem->resetMechanicalSubcooler();
676 }
677 result = setPointer(OS_Refrigeration_SystemFields::MechanicalSubcoolerName, refrigerationSubcoolerMechanical.get().handle());
678 } else {
679 resetMechanicalSubcooler();
680 result = true;
681 }
682 return result;
683 }
684
685 void RefrigerationSystem_Impl::resetMechanicalSubcooler() {
686 bool result = setString(OS_Refrigeration_SystemFields::MechanicalSubcoolerName, "");

Callers 2

cloneMethod · 0.80
TEST_FFunction · 0.80

Calls 6

briefDescriptionMethod · 0.80
nameStringMethod · 0.80
systemMethod · 0.45
handleMethod · 0.45
getMethod · 0.45

Tested by 1

TEST_FFunction · 0.64