src/energyplus/ForwardTranslator/ForwardTranslateSiteGroundReflectance.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 "../ForwardTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/SiteGroundReflectance.hpp" | ||
| 9 | #include "../../model/SiteGroundReflectance_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/Site_GroundReflectance_FieldEnums.hxx> | ||
| 12 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 13 | #include <utilities/idd/IddEnums.hxx> | ||
| 14 | |||
| 15 | using namespace openstudio::model; | ||
| 16 | |||
| 17 | using namespace std; | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | |||
| 21 | namespace energyplus { | ||
| 22 | |||
| 23 | 1 | boost::optional<IdfObject> ForwardTranslator::translateSiteGroundReflectance(SiteGroundReflectance& modelObject) { | |
| 24 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(openstudio::IddObjectType::Site_GroundReflectance); |
| 25 | |||
| 26 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 27 | |||
| 28 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isJanuaryGroundReflectanceDefaulted()) { |
| 29 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::JanuaryGroundReflectance, modelObject.januaryGroundReflectance()); |
| 30 | } | ||
| 31 | |||
| 32 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isFebruaryGroundReflectanceDefaulted()) { |
| 33 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::FebruaryGroundReflectance, modelObject.februaryGroundReflectance()); |
| 34 | } | ||
| 35 | |||
| 36 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isMarchGroundReflectanceDefaulted()) { |
| 37 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::MarchGroundReflectance, modelObject.marchGroundReflectance()); |
| 38 | } | ||
| 39 | |||
| 40 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isAprilGroundReflectanceDefaulted()) { |
| 41 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::AprilGroundReflectance, modelObject.aprilGroundReflectance()); |
| 42 | } | ||
| 43 | |||
| 44 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isMayGroundReflectanceDefaulted()) { |
| 45 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::MayGroundReflectance, modelObject.mayGroundReflectance()); |
| 46 | } | ||
| 47 | |||
| 48 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isJuneGroundReflectanceDefaulted()) { |
| 49 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::JuneGroundReflectance, modelObject.juneGroundReflectance()); |
| 50 | } | ||
| 51 | |||
| 52 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isJulyGroundReflectanceDefaulted()) { |
| 53 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::JulyGroundReflectance, modelObject.julyGroundReflectance()); |
| 54 | } | ||
| 55 | |||
| 56 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isAugustGroundReflectanceDefaulted()) { |
| 57 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::AugustGroundReflectance, modelObject.augustGroundReflectance()); |
| 58 | } | ||
| 59 | |||
| 60 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isSeptemberGroundReflectanceDefaulted()) { |
| 61 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::SeptemberGroundReflectance, modelObject.septemberGroundReflectance()); |
| 62 | } | ||
| 63 | |||
| 64 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isOctoberGroundReflectanceDefaulted()) { |
| 65 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::OctoberGroundReflectance, modelObject.octoberGroundReflectance()); |
| 66 | } | ||
| 67 | |||
| 68 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isNovemberGroundReflectanceDefaulted()) { |
| 69 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::NovemberGroundReflectance, modelObject.novemberGroundReflectance()); |
| 70 | } | ||
| 71 | |||
| 72 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
1 | if (!modelObject.isDecemberGroundReflectanceDefaulted()) { |
| 73 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | idfObject.setDouble(Site_GroundReflectanceFields::DecemberGroundReflectance, modelObject.decemberGroundReflectance()); |
| 74 | } | ||
| 75 | |||
| 76 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 77 | 1 | } | |
| 78 | |||
| 79 | } // namespace energyplus | ||
| 80 | |||
| 81 | } // namespace openstudio | ||
| 82 |