src/model/ExteriorFuelEquipmentDefinition.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 "ExteriorFuelEquipmentDefinition.hpp" | ||
| 7 | #include "ExteriorFuelEquipmentDefinition_Impl.hpp" | ||
| 8 | |||
| 9 | #include <utilities/idd/OS_Exterior_FuelEquipment_Definition_FieldEnums.hxx> | ||
| 10 | #include <utilities/idd/IddEnums.hxx> | ||
| 11 | |||
| 12 | #include "../utilities/core/Assert.hpp" | ||
| 13 | |||
| 14 | namespace openstudio { | ||
| 15 | namespace model { | ||
| 16 | |||
| 17 | namespace detail { | ||
| 18 | |||
| 19 | 16 | ExteriorFuelEquipmentDefinition_Impl::ExteriorFuelEquipmentDefinition_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 20 | 16 | : ExteriorLoadDefinition_Impl(idfObject, model, keepHandle) { | |
| 21 |
4/6✓ Branch 1 taken 16 times.
✓ Branch 4 taken 16 times.
✓ Branch 7 taken 16 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 16 times.
✗ Branch 13 not taken.
|
16 | OS_ASSERT(idfObject.iddObject().type() == ExteriorFuelEquipmentDefinition::iddObjectType()); |
| 22 | 16 | } | |
| 23 | |||
| 24 | 5 | ExteriorFuelEquipmentDefinition_Impl::ExteriorFuelEquipmentDefinition_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 25 | 5 | Model_Impl* model, bool keepHandle) | |
| 26 | 5 | : ExteriorLoadDefinition_Impl(other, model, keepHandle) { | |
| 27 |
4/6✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 5 times.
✗ Branch 13 not taken.
|
5 | OS_ASSERT(other.iddObject().type() == ExteriorFuelEquipmentDefinition::iddObjectType()); |
| 28 | 5 | } | |
| 29 | |||
| 30 | 5 | ExteriorFuelEquipmentDefinition_Impl::ExteriorFuelEquipmentDefinition_Impl(const ExteriorFuelEquipmentDefinition_Impl& other, Model_Impl* model, | |
| 31 | 5 | bool keepHandle) | |
| 32 | 5 | : ExteriorLoadDefinition_Impl(other, model, keepHandle) {} | |
| 33 | |||
| 34 | // TODO: remove | ||
| 35 | ✗ | const std::vector<std::string>& ExteriorFuelEquipmentDefinition_Impl::outputVariableNames() const { | |
| 36 | ✗ | static const std::vector<std::string> result; | |
| 37 | ✗ | return result; | |
| 38 | } | ||
| 39 | |||
| 40 | ✗ | IddObjectType ExteriorFuelEquipmentDefinition_Impl::iddObjectType() const { | |
| 41 | ✗ | return ExteriorFuelEquipmentDefinition::iddObjectType(); | |
| 42 | } | ||
| 43 | |||
| 44 | 4 | double ExteriorFuelEquipmentDefinition_Impl::designLevel() const { | |
| 45 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_Exterior_FuelEquipment_DefinitionFields::DesignLevel, true); |
| 46 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 47 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 48 | } | ||
| 49 | |||
| 50 | 15 | bool ExteriorFuelEquipmentDefinition_Impl::setDesignLevel(double designLevel) { | |
| 51 | 15 | bool result = setDouble(OS_Exterior_FuelEquipment_DefinitionFields::DesignLevel, designLevel); | |
| 52 | 15 | return result; | |
| 53 | } | ||
| 54 | |||
| 55 | } // namespace detail | ||
| 56 | |||
| 57 | 11 | ExteriorFuelEquipmentDefinition::ExteriorFuelEquipmentDefinition(const Model& model) | |
| 58 | 11 | : ExteriorLoadDefinition(ExteriorFuelEquipmentDefinition::iddObjectType(), model) { | |
| 59 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 11 times.
✗ Branch 5 not taken.
|
11 | OS_ASSERT(getImpl<detail::ExteriorFuelEquipmentDefinition_Impl>()); |
| 60 | |||
| 61 |
1/1✓ Branch 1 taken 11 times.
|
11 | bool ok = setDesignLevel(0.0); |
| 62 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 11 times.
✗ Branch 3 not taken.
|
11 | OS_ASSERT(ok); |
| 63 | 11 | } | |
| 64 | |||
| 65 | 7639 | IddObjectType ExteriorFuelEquipmentDefinition::iddObjectType() { | |
| 66 |
1/1✓ Branch 1 taken 7639 times.
|
7639 | IddObjectType result(IddObjectType::OS_Exterior_FuelEquipment_Definition); |
| 67 | 7639 | return result; | |
| 68 | } | ||
| 69 | |||
| 70 | 4 | double ExteriorFuelEquipmentDefinition::designLevel() const { | |
| 71 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ExteriorFuelEquipmentDefinition_Impl>()->designLevel(); |
| 72 | } | ||
| 73 | |||
| 74 | 15 | bool ExteriorFuelEquipmentDefinition::setDesignLevel(double designLevel) { | |
| 75 |
1/1✓ Branch 3 taken 15 times.
|
15 | return getImpl<detail::ExteriorFuelEquipmentDefinition_Impl>()->setDesignLevel(designLevel); |
| 76 | } | ||
| 77 | |||
| 78 | /// @cond | ||
| 79 | 10 | ExteriorFuelEquipmentDefinition::ExteriorFuelEquipmentDefinition(std::shared_ptr<detail::ExteriorFuelEquipmentDefinition_Impl> impl) | |
| 80 |
1/1✓ Branch 3 taken 10 times.
|
10 | : ExteriorLoadDefinition(std::move(impl)) {} |
| 81 | /// @endcond | ||
| 82 | |||
| 83 | } // namespace model | ||
| 84 | } // namespace openstudio | ||
| 85 |