src/energyplus/ReverseTranslator/ReverseTranslateOutputControlResilienceSummaries.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ReverseTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/OutputControlResilienceSummaries.hpp" | ||
| 9 | #include "../../model/OutputControlResilienceSummaries_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/OutputControl_ResilienceSummaries_FieldEnums.hxx> | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | using namespace openstudio::model; | ||
| 15 | |||
| 16 | namespace openstudio { | ||
| 17 | |||
| 18 | namespace energyplus { | ||
| 19 | |||
| 20 | 3 | boost::optional<ModelObject> ReverseTranslator::translateOutputControlResilienceSummaries(const WorkspaceObject& workspaceObject) { | |
| 21 | 3 | boost::optional<ModelObject> result; | |
| 22 | |||
| 23 | 3 | if (boost::optional<std::string> heatIndexAlgorithm_ = | |
| 24 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
|
6 | workspaceObject.getString(OutputControl_ResilienceSummariesFields::HeatIndexAlgorithm, false, true)) { |
| 25 | // This is a Unique ModelObject | ||
| 26 |
1/1✓ Branch 1 taken 2 times.
|
2 | auto modelObject = m_model.getUniqueModelObject<OutputControlResilienceSummaries>(); |
| 27 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | modelObject.setHeatIndexAlgorithm(*heatIndexAlgorithm_); |
| 28 |
1/1✓ Branch 1 taken 2 times.
|
2 | result = modelObject; |
| 29 | 5 | } | |
| 30 | |||
| 31 | 3 | return result; | |
| 32 | ✗ | } | |
| 33 | |||
| 34 | } // end namespace energyplus | ||
| 35 | } // end namespace openstudio | ||
| 36 |