| 584 | } |
| 585 | |
| 586 | void ModelMerger::mergeThermalZone(ThermalZone& currentThermalZone, const ThermalZone& newThermalZone) { |
| 587 | if (m_newMergedHandles.find(newThermalZone.handle()) != m_newMergedHandles.end()) { |
| 588 | // already merged |
| 589 | return; |
| 590 | } |
| 591 | m_newMergedHandles.insert(newThermalZone.handle()); |
| 592 | |
| 593 | currentThermalZone.setName(newThermalZone.nameString()); |
| 594 | |
| 595 | // rendering color |
| 596 | boost::optional<RenderingColor> newColor = newThermalZone.renderingColor(); |
| 597 | if (newColor) { |
| 598 | boost::optional<RenderingColor> currentColor = currentThermalZone.renderingColor(); |
| 599 | if (currentColor) { |
| 600 | currentColor->setRenderingRedValue(newColor->renderingRedValue()); |
| 601 | currentColor->setRenderingGreenValue(newColor->renderingGreenValue()); |
| 602 | currentColor->setRenderingBlueValue(newColor->renderingBlueValue()); |
| 603 | currentColor->setRenderingAlphaValue(newColor->renderingAlphaValue()); |
| 604 | } else { |
| 605 | currentColor = RenderingColor::fromColorString(newColor->colorString(), currentThermalZone.model()); |
| 606 | OS_ASSERT(currentColor); |
| 607 | currentThermalZone.setRenderingColor(*currentColor); |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | // multiplier |
| 612 | if (newThermalZone.isMultiplierDefaulted()) { |
| 613 | // DLM: TODO: add option as this might have been intentionally reset on other model |
| 614 | //currentThermalZone.resetMultiplier(); |
| 615 | } else { |
| 616 | currentThermalZone.setMultiplier(newThermalZone.multiplier()); |
| 617 | } |
| 618 | |
| 619 | // ceilingHeight |
| 620 | if (newThermalZone.isCeilingHeightDefaulted() || newThermalZone.isCeilingHeightAutocalculated()) { |
| 621 | // DLM: TODO: add option as this might have been intentionally reset on other model |
| 622 | //currentThermalZone.resetCeilingHeight(); |
| 623 | } else { |
| 624 | currentThermalZone.setCeilingHeight(newThermalZone.ceilingHeight()); |
| 625 | } |
| 626 | |
| 627 | // volume |
| 628 | if (newThermalZone.isVolumeDefaulted() || newThermalZone.isVolumeAutocalculated()) { |
| 629 | // DLM: TODO: add option as this might have been intentionally reset on other model |
| 630 | //currentThermalZone.resetVolume(); |
| 631 | } else { |
| 632 | currentThermalZone.setVolume(newThermalZone.volume()); |
| 633 | } |
| 634 | |
| 635 | // DLM: TODO zoneInsideConvectionAlgorithm |
| 636 | // DLM: TODO zoneOutsideConvectionAlgorithm |
| 637 | // DLM: TODO zoneConditioningEquipmentListName ? |
| 638 | // DLM: TODO thermostat |
| 639 | // DLM: TODO zoneControlHumidistat |
| 640 | // DLM: TODO zoneControlContaminantController |
| 641 | // DLM: TODO sizingZone |
| 642 | } |
| 643 |
nothing calls this directly
no test coverage detected