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

Method addCompressor

src/model/RefrigerationSystem.cpp:487–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485 }
486
487 bool RefrigerationSystem_Impl::addCompressor(const RefrigerationCompressor& refrigerationCompressor) {
488 // Enforce unicity
489 if (boost::optional<RefrigerationSystem> currentSystem = refrigerationCompressor.system()) {
490 LOG(Warn, refrigerationCompressor.briefDescription()
491 << " was removed from its existing RefrigerationSystem (non High Stage) named '" << currentSystem->nameString() << "'.");
492 currentSystem->removeCompressor(refrigerationCompressor);
493 }
494
495 return compressorList().addModelObject(refrigerationCompressor);
496 }
497
498 void RefrigerationSystem_Impl::removeCompressor(const RefrigerationCompressor& refrigerationCompressor) {
499 compressorList().removeModelObject(refrigerationCompressor);

Callers 1

TEST_FFunction · 0.80

Calls 5

briefDescriptionMethod · 0.80
nameStringMethod · 0.80
removeCompressorMethod · 0.80
addModelObjectMethod · 0.80
systemMethod · 0.45

Tested by 1

TEST_FFunction · 0.64