src/model/FFactorGroundFloorConstruction.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 "FFactorGroundFloorConstruction.hpp" | ||
| 7 | #include "FFactorGroundFloorConstruction_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Material.hpp" | ||
| 10 | #include "Material_Impl.hpp" | ||
| 11 | #include "ModelExtensibleGroup.hpp" | ||
| 12 | |||
| 13 | #include <utilities/idd/OS_Construction_FfactorGroundFloor_FieldEnums.hxx> | ||
| 14 | #include <utilities/idd/IddEnums.hxx> | ||
| 15 | |||
| 16 | #include "../utilities/core/Assert.hpp" | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | namespace model { | ||
| 20 | |||
| 21 | namespace detail { | ||
| 22 | |||
| 23 | 2 | FFactorGroundFloorConstruction_Impl::FFactorGroundFloorConstruction_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 24 | 2 | : ConstructionBase_Impl(idfObject, model, keepHandle) { | |
| 25 |
4/6✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
|
2 | OS_ASSERT(idfObject.iddObject().type() == FFactorGroundFloorConstruction::iddObjectType()); |
| 26 | 2 | } | |
| 27 | |||
| 28 | ✗ | FFactorGroundFloorConstruction_Impl::FFactorGroundFloorConstruction_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 29 | ✗ | bool keepHandle) | |
| 30 | ✗ | : ConstructionBase_Impl(other, model, keepHandle) { | |
| 31 | ✗ | OS_ASSERT(other.iddObject().type() == FFactorGroundFloorConstruction::iddObjectType()); | |
| 32 | ✗ | } | |
| 33 | |||
| 34 | 3 | FFactorGroundFloorConstruction_Impl::FFactorGroundFloorConstruction_Impl(const FFactorGroundFloorConstruction_Impl& other, Model_Impl* model, | |
| 35 | 3 | bool keepHandle) | |
| 36 | 3 | : ConstructionBase_Impl(other, model, keepHandle) {} | |
| 37 | |||
| 38 | ✗ | const std::vector<std::string>& FFactorGroundFloorConstruction_Impl::outputVariableNames() const { | |
| 39 | ✗ | static const std::vector<std::string> result; | |
| 40 | ✗ | return result; | |
| 41 | } | ||
| 42 | |||
| 43 | ✗ | IddObjectType FFactorGroundFloorConstruction_Impl::iddObjectType() const { | |
| 44 | ✗ | return FFactorGroundFloorConstruction::iddObjectType(); | |
| 45 | } | ||
| 46 | |||
| 47 | ✗ | bool FFactorGroundFloorConstruction_Impl::isOpaque() const { | |
| 48 | ✗ | return true; | |
| 49 | } | ||
| 50 | |||
| 51 | ✗ | bool FFactorGroundFloorConstruction_Impl::isFenestration() const { | |
| 52 | ✗ | return false; | |
| 53 | } | ||
| 54 | |||
| 55 | ✗ | bool FFactorGroundFloorConstruction_Impl::isSolarDiffusing() const { | |
| 56 | ✗ | return false; | |
| 57 | } | ||
| 58 | |||
| 59 | ✗ | bool FFactorGroundFloorConstruction_Impl::isModelPartition() const { | |
| 60 | ✗ | return false; | |
| 61 | } | ||
| 62 | |||
| 63 | ✗ | int FFactorGroundFloorConstruction_Impl::renderingColorIndex() const { | |
| 64 | ✗ | return OS_Construction_FfactorGroundFloorFields::SurfaceRenderingName; | |
| 65 | } | ||
| 66 | |||
| 67 | ✗ | double FFactorGroundFloorConstruction_Impl::fFactor() const { | |
| 68 | ✗ | boost::optional<double> value = getDouble(OS_Construction_FfactorGroundFloorFields::FFactor, true); | |
| 69 | ✗ | OS_ASSERT(value); | |
| 70 | ✗ | return value.get(); | |
| 71 | } | ||
| 72 | |||
| 73 | 3 | bool FFactorGroundFloorConstruction_Impl::setFFactor(double fFactor) { | |
| 74 | 3 | bool result = setDouble(OS_Construction_FfactorGroundFloorFields::FFactor, fFactor); | |
| 75 | 3 | return result; | |
| 76 | } | ||
| 77 | |||
| 78 | ✗ | double FFactorGroundFloorConstruction_Impl::area() const { | |
| 79 | ✗ | boost::optional<double> value = getDouble(OS_Construction_FfactorGroundFloorFields::Area, true); | |
| 80 | ✗ | OS_ASSERT(value); | |
| 81 | ✗ | return value.get(); | |
| 82 | } | ||
| 83 | |||
| 84 | 3 | bool FFactorGroundFloorConstruction_Impl::setArea(double area) { | |
| 85 | 3 | bool result = setDouble(OS_Construction_FfactorGroundFloorFields::Area, area); | |
| 86 | 3 | return result; | |
| 87 | } | ||
| 88 | |||
| 89 | ✗ | double FFactorGroundFloorConstruction_Impl::perimeterExposed() const { | |
| 90 | ✗ | boost::optional<double> value = getDouble(OS_Construction_FfactorGroundFloorFields::PerimeterExposed, true); | |
| 91 | ✗ | OS_ASSERT(value); | |
| 92 | ✗ | return value.get(); | |
| 93 | } | ||
| 94 | |||
| 95 | 3 | bool FFactorGroundFloorConstruction_Impl::setPerimeterExposed(double perimeterExposed) { | |
| 96 | 3 | bool result = setDouble(OS_Construction_FfactorGroundFloorFields::PerimeterExposed, perimeterExposed); | |
| 97 | 3 | return result; | |
| 98 | } | ||
| 99 | |||
| 100 | } // namespace detail | ||
| 101 | |||
| 102 | 2 | FFactorGroundFloorConstruction::FFactorGroundFloorConstruction(const Model& model, double fFactor, double area, double perimeterExposed) | |
| 103 | 2 | : ConstructionBase(FFactorGroundFloorConstruction::iddObjectType(), model) { | |
| 104 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 5 not taken.
|
2 | OS_ASSERT(getImpl<detail::FFactorGroundFloorConstruction_Impl>()); |
| 105 | |||
| 106 |
1/1✓ Branch 1 taken 2 times.
|
2 | setFFactor(fFactor); |
| 107 |
1/1✓ Branch 1 taken 2 times.
|
2 | setArea(area); |
| 108 |
1/1✓ Branch 1 taken 2 times.
|
2 | setPerimeterExposed(perimeterExposed); |
| 109 | 2 | } | |
| 110 | |||
| 111 | 7605 | IddObjectType FFactorGroundFloorConstruction::iddObjectType() { | |
| 112 |
1/1✓ Branch 1 taken 7605 times.
|
7605 | IddObjectType result(IddObjectType::OS_Construction_FfactorGroundFloor); |
| 113 | 7605 | return result; | |
| 114 | } | ||
| 115 | |||
| 116 | ✗ | double FFactorGroundFloorConstruction::fFactor() const { | |
| 117 | ✗ | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->fFactor(); | |
| 118 | } | ||
| 119 | |||
| 120 | 3 | bool FFactorGroundFloorConstruction::setFFactor(double fFactor) { | |
| 121 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->setFFactor(fFactor); |
| 122 | } | ||
| 123 | |||
| 124 | ✗ | double FFactorGroundFloorConstruction::area() const { | |
| 125 | ✗ | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->area(); | |
| 126 | } | ||
| 127 | |||
| 128 | 3 | bool FFactorGroundFloorConstruction::setArea(double area) { | |
| 129 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->setArea(area); |
| 130 | } | ||
| 131 | |||
| 132 | ✗ | double FFactorGroundFloorConstruction::perimeterExposed() const { | |
| 133 | ✗ | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->perimeterExposed(); | |
| 134 | } | ||
| 135 | |||
| 136 | 3 | bool FFactorGroundFloorConstruction::setPerimeterExposed(double perimeterExposed) { | |
| 137 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::FFactorGroundFloorConstruction_Impl>()->setPerimeterExposed(perimeterExposed); |
| 138 | } | ||
| 139 | |||
| 140 | /// @cond | ||
| 141 | 7 | FFactorGroundFloorConstruction::FFactorGroundFloorConstruction(std::shared_ptr<detail::FFactorGroundFloorConstruction_Impl> impl) | |
| 142 |
1/1✓ Branch 3 taken 7 times.
|
7 | : ConstructionBase(std::move(impl)) {} |
| 143 | /// @endcond | ||
| 144 | |||
| 145 | } // namespace model | ||
| 146 | } // namespace openstudio | ||
| 147 |