src/energyplus/ReverseTranslator/ReverseTranslateSurfacePropertyOtherSideConditionsModel.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/SurfacePropertyOtherSideConditionsModel.hpp" | ||
| 9 | |||
| 10 | #include <utilities/idd/SurfaceProperty_OtherSideConditionsModel_FieldEnums.hxx> | ||
| 11 | #include <utilities/idd/IddEnums.hxx> | ||
| 12 | |||
| 13 | using namespace openstudio::model; | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | |||
| 17 | namespace energyplus { | ||
| 18 | |||
| 19 | 2 | boost::optional<ModelObject> ReverseTranslator::translateSurfacePropertyOtherSideConditionsModel(const WorkspaceObject& workspaceObject) { | |
| 20 | |||
| 21 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::SurfacePropertyOtherSideConditionsModel modelObject(m_model); |
| 22 | |||
| 23 | // Name | ||
| 24 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (boost::optional<std::string> name_ = workspaceObject.name()) { |
| 25 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | modelObject.setName(name_.get()); |
| 26 | 2 | } | |
| 27 | |||
| 28 | // Type of Modeling: Optional String | ||
| 29 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | if (boost::optional<std::string> typeofModeling_ = workspaceObject.getString(SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling)) { |
| 30 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | modelObject.setTypeOfModeling(typeofModeling_.get()); |
| 31 | 2 | } | |
| 32 | |||
| 33 |
1/1✓ Branch 1 taken 2 times.
|
4 | return modelObject; |
| 34 | 2 | } // End of translate function | |
| 35 | |||
| 36 | } // end namespace energyplus | ||
| 37 | } // end namespace openstudio | ||
| 38 |