src/model/ZoneCapacitanceMultiplierResearchSpecial.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 "ZoneCapacitanceMultiplierResearchSpecial.hpp" | ||
| 7 | #include "ZoneCapacitanceMultiplierResearchSpecial_Impl.hpp" | ||
| 8 | #include "SimulationControl.hpp" | ||
| 9 | #include "SimulationControl_Impl.hpp" | ||
| 10 | |||
| 11 | #include "Model.hpp" | ||
| 12 | #include "Model_Impl.hpp" | ||
| 13 | |||
| 14 | #include <utilities/idd/OS_ZoneCapacitanceMultiplier_ResearchSpecial_FieldEnums.hxx> | ||
| 15 | #include <utilities/idd/IddEnums.hxx> | ||
| 16 | |||
| 17 | #include "../utilities/core/Assert.hpp" | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | namespace model { | ||
| 21 | |||
| 22 | namespace detail { | ||
| 23 | |||
| 24 | 20 | ZoneCapacitanceMultiplierResearchSpecial_Impl::ZoneCapacitanceMultiplierResearchSpecial_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 25 | 20 | bool keepHandle) | |
| 26 | 20 | : ModelObject_Impl(idfObject, model, keepHandle) { | |
| 27 |
4/6✓ Branch 1 taken 20 times.
✓ Branch 4 taken 20 times.
✓ Branch 7 taken 20 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 20 times.
✗ Branch 13 not taken.
|
20 | OS_ASSERT(idfObject.iddObject().type() == ZoneCapacitanceMultiplierResearchSpecial::iddObjectType()); |
| 28 | 20 | } | |
| 29 | |||
| 30 | 14 | ZoneCapacitanceMultiplierResearchSpecial_Impl::ZoneCapacitanceMultiplierResearchSpecial_Impl( | |
| 31 | 14 | const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 32 | 14 | : ModelObject_Impl(other, model, keepHandle) { | |
| 33 |
4/6✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 14 times.
✗ Branch 13 not taken.
|
14 | OS_ASSERT(other.iddObject().type() == ZoneCapacitanceMultiplierResearchSpecial::iddObjectType()); |
| 34 | 14 | } | |
| 35 | |||
| 36 | 49 | ZoneCapacitanceMultiplierResearchSpecial_Impl::ZoneCapacitanceMultiplierResearchSpecial_Impl( | |
| 37 | 49 | const ZoneCapacitanceMultiplierResearchSpecial_Impl& other, Model_Impl* model, bool keepHandle) | |
| 38 | 49 | : ModelObject_Impl(other, model, keepHandle) {} | |
| 39 | |||
| 40 | ✗ | const std::vector<std::string>& ZoneCapacitanceMultiplierResearchSpecial_Impl::outputVariableNames() const { | |
| 41 | ✗ | static const std::vector<std::string> result; | |
| 42 | ✗ | return result; | |
| 43 | } | ||
| 44 | |||
| 45 | ✗ | IddObjectType ZoneCapacitanceMultiplierResearchSpecial_Impl::iddObjectType() const { | |
| 46 | ✗ | return ZoneCapacitanceMultiplierResearchSpecial::iddObjectType(); | |
| 47 | } | ||
| 48 | |||
| 49 | // return the parent object in the hierarchy | ||
| 50 | 2 | boost::optional<ParentObject> ZoneCapacitanceMultiplierResearchSpecial_Impl::parent() const { | |
| 51 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | boost::optional<ParentObject> result(model().getUniqueModelObject<SimulationControl>()); |
| 52 | 2 | return result; | |
| 53 | } | ||
| 54 | |||
| 55 | // set the parent, child may have to call methods on the parent | ||
| 56 | ✗ | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::setParent(ParentObject& newParent) { | |
| 57 | ✗ | if (newParent.optionalCast<SimulationControl>() && (newParent.model() == model())) { | |
| 58 | ✗ | return true; | |
| 59 | } | ||
| 60 | ✗ | return false; | |
| 61 | } | ||
| 62 | |||
| 63 | 4 | double ZoneCapacitanceMultiplierResearchSpecial_Impl::temperatureCapacityMultiplier() const { | |
| 64 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::TemperatureCapacityMultiplier, true); |
| 65 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 66 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 67 | } | ||
| 68 | |||
| 69 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::isTemperatureCapacityMultiplierDefaulted() const { | |
| 70 | 14 | return isEmpty(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::TemperatureCapacityMultiplier); | |
| 71 | } | ||
| 72 | |||
| 73 | 4 | double ZoneCapacitanceMultiplierResearchSpecial_Impl::humidityCapacityMultiplier() const { | |
| 74 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::HumidityCapacityMultiplier, true); |
| 75 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 76 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 77 | } | ||
| 78 | |||
| 79 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::isHumidityCapacityMultiplierDefaulted() const { | |
| 80 | 14 | return isEmpty(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::HumidityCapacityMultiplier); | |
| 81 | } | ||
| 82 | |||
| 83 | 4 | double ZoneCapacitanceMultiplierResearchSpecial_Impl::carbonDioxideCapacityMultiplier() const { | |
| 84 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> value = getDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::CarbonDioxideCapacityMultiplier, true); |
| 85 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(value); |
| 86 |
1/1✓ Branch 1 taken 4 times.
|
8 | return value.get(); |
| 87 | } | ||
| 88 | |||
| 89 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::isCarbonDioxideCapacityMultiplierDefaulted() const { | |
| 90 | 14 | return isEmpty(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::CarbonDioxideCapacityMultiplier); | |
| 91 | } | ||
| 92 | |||
| 93 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::setTemperatureCapacityMultiplier(double temperatureCapacityMultiplier) { | |
| 94 | 2 | bool result = setDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::TemperatureCapacityMultiplier, temperatureCapacityMultiplier); | |
| 95 | 2 | return result; | |
| 96 | } | ||
| 97 | |||
| 98 | 1 | void ZoneCapacitanceMultiplierResearchSpecial_Impl::resetTemperatureCapacityMultiplier() { | |
| 99 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::TemperatureCapacityMultiplier, ""); |
| 100 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 101 | 1 | } | |
| 102 | |||
| 103 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::setHumidityCapacityMultiplier(double humidityCapacityMultiplier) { | |
| 104 | 2 | bool result = setDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::HumidityCapacityMultiplier, humidityCapacityMultiplier); | |
| 105 | 2 | return result; | |
| 106 | } | ||
| 107 | |||
| 108 | 1 | void ZoneCapacitanceMultiplierResearchSpecial_Impl::resetHumidityCapacityMultiplier() { | |
| 109 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::HumidityCapacityMultiplier, ""); |
| 110 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 111 | 1 | } | |
| 112 | |||
| 113 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial_Impl::setCarbonDioxideCapacityMultiplier(double carbonDioxideCapacityMultiplier) { | |
| 114 | 2 | bool result = setDouble(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::CarbonDioxideCapacityMultiplier, carbonDioxideCapacityMultiplier); | |
| 115 | 2 | return result; | |
| 116 | } | ||
| 117 | |||
| 118 | 1 | void ZoneCapacitanceMultiplierResearchSpecial_Impl::resetCarbonDioxideCapacityMultiplier() { | |
| 119 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_ZoneCapacitanceMultiplier_ResearchSpecialFields::CarbonDioxideCapacityMultiplier, ""); |
| 120 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 121 | 1 | } | |
| 122 | |||
| 123 | } // namespace detail | ||
| 124 | |||
| 125 | 8533 | IddObjectType ZoneCapacitanceMultiplierResearchSpecial::iddObjectType() { | |
| 126 |
1/1✓ Branch 1 taken 8533 times.
|
8533 | return {IddObjectType::OS_ZoneCapacitanceMultiplier_ResearchSpecial}; |
| 127 | } | ||
| 128 | |||
| 129 | 4 | double ZoneCapacitanceMultiplierResearchSpecial::temperatureCapacityMultiplier() const { | |
| 130 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->temperatureCapacityMultiplier(); |
| 131 | } | ||
| 132 | |||
| 133 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial::isTemperatureCapacityMultiplierDefaulted() const { | |
| 134 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->isTemperatureCapacityMultiplierDefaulted(); |
| 135 | } | ||
| 136 | |||
| 137 | 4 | double ZoneCapacitanceMultiplierResearchSpecial::humidityCapacityMultiplier() const { | |
| 138 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->humidityCapacityMultiplier(); |
| 139 | } | ||
| 140 | |||
| 141 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial::isHumidityCapacityMultiplierDefaulted() const { | |
| 142 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->isHumidityCapacityMultiplierDefaulted(); |
| 143 | } | ||
| 144 | |||
| 145 | 4 | double ZoneCapacitanceMultiplierResearchSpecial::carbonDioxideCapacityMultiplier() const { | |
| 146 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->carbonDioxideCapacityMultiplier(); |
| 147 | } | ||
| 148 | |||
| 149 | 14 | bool ZoneCapacitanceMultiplierResearchSpecial::isCarbonDioxideCapacityMultiplierDefaulted() const { | |
| 150 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->isCarbonDioxideCapacityMultiplierDefaulted(); |
| 151 | } | ||
| 152 | |||
| 153 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial::setTemperatureCapacityMultiplier(double temperatureCapacityMultiplier) { | |
| 154 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->setTemperatureCapacityMultiplier(temperatureCapacityMultiplier); |
| 155 | } | ||
| 156 | |||
| 157 | 1 | void ZoneCapacitanceMultiplierResearchSpecial::resetTemperatureCapacityMultiplier() { | |
| 158 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->resetTemperatureCapacityMultiplier(); |
| 159 | 1 | } | |
| 160 | |||
| 161 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial::setHumidityCapacityMultiplier(double humidityCapacityMultiplier) { | |
| 162 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->setHumidityCapacityMultiplier(humidityCapacityMultiplier); |
| 163 | } | ||
| 164 | |||
| 165 | 1 | void ZoneCapacitanceMultiplierResearchSpecial::resetHumidityCapacityMultiplier() { | |
| 166 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->resetHumidityCapacityMultiplier(); |
| 167 | 1 | } | |
| 168 | |||
| 169 | 2 | bool ZoneCapacitanceMultiplierResearchSpecial::setCarbonDioxideCapacityMultiplier(double carbonDioxideCapacityMultiplier) { | |
| 170 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->setCarbonDioxideCapacityMultiplier(carbonDioxideCapacityMultiplier); |
| 171 | } | ||
| 172 | |||
| 173 | 1 | void ZoneCapacitanceMultiplierResearchSpecial::resetCarbonDioxideCapacityMultiplier() { | |
| 174 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()->resetCarbonDioxideCapacityMultiplier(); |
| 175 | 1 | } | |
| 176 | |||
| 177 | /// @cond | ||
| 178 | 28 | ZoneCapacitanceMultiplierResearchSpecial::ZoneCapacitanceMultiplierResearchSpecial( | |
| 179 | 28 | std::shared_ptr<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl> impl) | |
| 180 |
1/1✓ Branch 3 taken 28 times.
|
28 | : ModelObject(std::move(impl)) {} |
| 181 | 6 | ZoneCapacitanceMultiplierResearchSpecial::ZoneCapacitanceMultiplierResearchSpecial(Model& model) | |
| 182 | 6 | : ModelObject(ZoneCapacitanceMultiplierResearchSpecial::iddObjectType(), model) { | |
| 183 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
|
6 | OS_ASSERT(getImpl<detail::ZoneCapacitanceMultiplierResearchSpecial_Impl>()); |
| 184 | 6 | } | |
| 185 | |||
| 186 | /// @endcond | ||
| 187 | |||
| 188 | } // namespace model | ||
| 189 | } // namespace openstudio | ||
| 190 |