src/model/DefaultSubSurfaceConstructions.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 "DefaultSubSurfaceConstructions.hpp" | ||
| 7 | #include "DefaultSubSurfaceConstructions_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "Model_Impl.hpp" | ||
| 11 | #include "ConstructionBase.hpp" | ||
| 12 | #include "ConstructionBase_Impl.hpp" | ||
| 13 | |||
| 14 | #include <utilities/idd/OS_DefaultSubSurfaceConstructions_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 | 514 | DefaultSubSurfaceConstructions_Impl::DefaultSubSurfaceConstructions_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 25 | 514 | : ResourceObject_Impl(idfObject, model, keepHandle) { | |
| 26 |
4/6✓ Branch 1 taken 514 times.
✓ Branch 4 taken 514 times.
✓ Branch 7 taken 514 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 514 times.
✗ Branch 13 not taken.
|
514 | OS_ASSERT(idfObject.iddObject().type() == DefaultSubSurfaceConstructions::iddObjectType()); |
| 27 | 514 | } | |
| 28 | |||
| 29 | 155 | DefaultSubSurfaceConstructions_Impl::DefaultSubSurfaceConstructions_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 30 | 155 | bool keepHandle) | |
| 31 | 155 | : ResourceObject_Impl(other, model, keepHandle) { | |
| 32 |
4/6✓ Branch 1 taken 155 times.
✓ Branch 4 taken 155 times.
✓ Branch 7 taken 155 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 155 times.
✗ Branch 13 not taken.
|
155 | OS_ASSERT(other.iddObject().type() == DefaultSubSurfaceConstructions::iddObjectType()); |
| 33 | 155 | } | |
| 34 | |||
| 35 | 259 | DefaultSubSurfaceConstructions_Impl::DefaultSubSurfaceConstructions_Impl(const DefaultSubSurfaceConstructions_Impl& other, Model_Impl* model, | |
| 36 | 259 | bool keepHandle) | |
| 37 | 259 | : ResourceObject_Impl(other, model, keepHandle) {} | |
| 38 | |||
| 39 | 2 | const std::vector<std::string>& DefaultSubSurfaceConstructions_Impl::outputVariableNames() const { | |
| 40 |
3/4✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | static const std::vector<std::string> result; |
| 41 | 2 | return result; | |
| 42 | } | ||
| 43 | |||
| 44 | 2 | IddObjectType DefaultSubSurfaceConstructions_Impl::iddObjectType() const { | |
| 45 | 2 | return DefaultSubSurfaceConstructions::iddObjectType(); | |
| 46 | } | ||
| 47 | |||
| 48 | 1639 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::fixedWindowConstruction() const { | |
| 49 |
2/2✓ Branch 1 taken 1639 times.
✓ Branch 4 taken 1639 times.
|
1639 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::FixedWindowConstructionName); |
| 50 | } | ||
| 51 | |||
| 52 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::operableWindowConstruction() const { | |
| 53 |
2/2✓ Branch 1 taken 312 times.
✓ Branch 4 taken 312 times.
|
312 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::OperableWindowConstructionName); |
| 54 | } | ||
| 55 | |||
| 56 | 487 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::doorConstruction() const { | |
| 57 |
2/2✓ Branch 1 taken 487 times.
✓ Branch 4 taken 487 times.
|
487 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::DoorConstructionName); |
| 58 | } | ||
| 59 | |||
| 60 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::glassDoorConstruction() const { | |
| 61 |
2/2✓ Branch 1 taken 312 times.
✓ Branch 4 taken 312 times.
|
312 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::GlassDoorConstructionName); |
| 62 | } | ||
| 63 | |||
| 64 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::overheadDoorConstruction() const { | |
| 65 |
2/2✓ Branch 1 taken 312 times.
✓ Branch 4 taken 312 times.
|
312 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::OverheadDoorConstructionName); |
| 66 | } | ||
| 67 | |||
| 68 | 318 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::skylightConstruction() const { | |
| 69 |
2/2✓ Branch 1 taken 318 times.
✓ Branch 4 taken 318 times.
|
318 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_DefaultSubSurfaceConstructionsFields::SkylightConstructionName); |
| 70 | } | ||
| 71 | |||
| 72 | 310 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::tubularDaylightDomeConstruction() const { | |
| 73 |
1/1✓ Branch 1 taken 310 times.
|
620 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>( |
| 74 |
1/1✓ Branch 1 taken 310 times.
|
620 | OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDomeConstructionName); |
| 75 | } | ||
| 76 | |||
| 77 | 310 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions_Impl::tubularDaylightDiffuserConstruction() const { | |
| 78 |
1/1✓ Branch 1 taken 310 times.
|
620 | return getObject<ModelObject>().getModelObjectTarget<ConstructionBase>( |
| 79 |
1/1✓ Branch 1 taken 310 times.
|
620 | OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDiffuserConstructionName); |
| 80 | } | ||
| 81 | |||
| 82 | 349 | bool DefaultSubSurfaceConstructions_Impl::setFixedWindowConstruction(const ConstructionBase& construction) { | |
| 83 |
2/2✓ Branch 1 taken 349 times.
✓ Branch 4 taken 349 times.
|
349 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::FixedWindowConstructionName, construction.handle()); |
| 84 | } | ||
| 85 | |||
| 86 | 3 | void DefaultSubSurfaceConstructions_Impl::resetFixedWindowConstruction() { | |
| 87 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | setString(OS_DefaultSubSurfaceConstructionsFields::FixedWindowConstructionName, ""); |
| 88 | 3 | } | |
| 89 | |||
| 90 | 339 | bool DefaultSubSurfaceConstructions_Impl::setOperableWindowConstruction(const ConstructionBase& construction) { | |
| 91 |
2/2✓ Branch 1 taken 339 times.
✓ Branch 4 taken 339 times.
|
339 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::OperableWindowConstructionName, construction.handle()); |
| 92 | } | ||
| 93 | |||
| 94 | 1 | void DefaultSubSurfaceConstructions_Impl::resetOperableWindowConstruction() { | |
| 95 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | setString(OS_DefaultSubSurfaceConstructionsFields::OperableWindowConstructionName, ""); |
| 96 | 1 | } | |
| 97 | |||
| 98 | 343 | bool DefaultSubSurfaceConstructions_Impl::setDoorConstruction(const ConstructionBase& construction) { | |
| 99 |
2/2✓ Branch 1 taken 343 times.
✓ Branch 4 taken 343 times.
|
343 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::DoorConstructionName, construction.handle()); |
| 100 | } | ||
| 101 | |||
| 102 | 3 | void DefaultSubSurfaceConstructions_Impl::resetDoorConstruction() { | |
| 103 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | setString(OS_DefaultSubSurfaceConstructionsFields::DoorConstructionName, ""); |
| 104 | 3 | } | |
| 105 | |||
| 106 | 340 | bool DefaultSubSurfaceConstructions_Impl::setGlassDoorConstruction(const ConstructionBase& construction) { | |
| 107 |
2/2✓ Branch 1 taken 340 times.
✓ Branch 4 taken 340 times.
|
340 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::GlassDoorConstructionName, construction.handle()); |
| 108 | } | ||
| 109 | |||
| 110 | 1 | void DefaultSubSurfaceConstructions_Impl::resetGlassDoorConstruction() { | |
| 111 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | setString(OS_DefaultSubSurfaceConstructionsFields::GlassDoorConstructionName, ""); |
| 112 | 1 | } | |
| 113 | |||
| 114 | 339 | bool DefaultSubSurfaceConstructions_Impl::setOverheadDoorConstruction(const ConstructionBase& construction) { | |
| 115 |
2/2✓ Branch 1 taken 339 times.
✓ Branch 4 taken 339 times.
|
339 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::OverheadDoorConstructionName, construction.handle()); |
| 116 | } | ||
| 117 | |||
| 118 | 1 | void DefaultSubSurfaceConstructions_Impl::resetOverheadDoorConstruction() { | |
| 119 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | setString(OS_DefaultSubSurfaceConstructionsFields::OverheadDoorConstructionName, ""); |
| 120 | 1 | } | |
| 121 | |||
| 122 | 340 | bool DefaultSubSurfaceConstructions_Impl::setSkylightConstruction(const ConstructionBase& construction) { | |
| 123 |
2/2✓ Branch 1 taken 340 times.
✓ Branch 4 taken 340 times.
|
340 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::SkylightConstructionName, construction.handle()); |
| 124 | } | ||
| 125 | |||
| 126 | 3 | void DefaultSubSurfaceConstructions_Impl::resetSkylightConstruction() { | |
| 127 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | setString(OS_DefaultSubSurfaceConstructionsFields::SkylightConstructionName, ""); |
| 128 | 3 | } | |
| 129 | |||
| 130 | 338 | bool DefaultSubSurfaceConstructions_Impl::setTubularDaylightDomeConstruction(const ConstructionBase& construction) { | |
| 131 |
2/2✓ Branch 1 taken 338 times.
✓ Branch 4 taken 338 times.
|
338 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDomeConstructionName, construction.handle()); |
| 132 | } | ||
| 133 | |||
| 134 | 1 | void DefaultSubSurfaceConstructions_Impl::resetTubularDaylightDomeConstruction() { | |
| 135 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | setString(OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDomeConstructionName, ""); |
| 136 | 1 | } | |
| 137 | |||
| 138 | 338 | bool DefaultSubSurfaceConstructions_Impl::setTubularDaylightDiffuserConstruction(const ConstructionBase& construction) { | |
| 139 |
2/2✓ Branch 1 taken 338 times.
✓ Branch 4 taken 338 times.
|
338 | return setPointer(OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDiffuserConstructionName, construction.handle()); |
| 140 | } | ||
| 141 | |||
| 142 | 1 | void DefaultSubSurfaceConstructions_Impl::resetTubularDaylightDiffuserConstruction() { | |
| 143 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | setString(OS_DefaultSubSurfaceConstructionsFields::TubularDaylightDiffuserConstructionName, ""); |
| 144 | 1 | } | |
| 145 | |||
| 146 | ✗ | void DefaultSubSurfaceConstructions_Impl::merge(const DefaultSubSurfaceConstructions& other) { | |
| 147 | ✗ | boost::optional<ConstructionBase> construction; | |
| 148 | |||
| 149 | ✗ | if (!(this->fixedWindowConstruction())) { | |
| 150 | ✗ | construction = other.fixedWindowConstruction(); | |
| 151 | ✗ | if (construction) { | |
| 152 | ✗ | this->setFixedWindowConstruction(*construction); | |
| 153 | } | ||
| 154 | } | ||
| 155 | |||
| 156 | ✗ | if (!(this->operableWindowConstruction())) { | |
| 157 | ✗ | construction = other.operableWindowConstruction(); | |
| 158 | ✗ | if (construction) { | |
| 159 | ✗ | this->setOperableWindowConstruction(*construction); | |
| 160 | } | ||
| 161 | } | ||
| 162 | |||
| 163 | ✗ | if (!(this->doorConstruction())) { | |
| 164 | ✗ | construction = other.doorConstruction(); | |
| 165 | ✗ | if (construction) { | |
| 166 | ✗ | this->setDoorConstruction(*construction); | |
| 167 | } | ||
| 168 | } | ||
| 169 | |||
| 170 | ✗ | if (!(this->glassDoorConstruction())) { | |
| 171 | ✗ | construction = other.glassDoorConstruction(); | |
| 172 | ✗ | if (construction) { | |
| 173 | ✗ | this->setGlassDoorConstruction(*construction); | |
| 174 | } | ||
| 175 | } | ||
| 176 | |||
| 177 | ✗ | if (!(this->overheadDoorConstruction())) { | |
| 178 | ✗ | construction = other.overheadDoorConstruction(); | |
| 179 | ✗ | if (construction) { | |
| 180 | ✗ | this->setOverheadDoorConstruction(*construction); | |
| 181 | } | ||
| 182 | } | ||
| 183 | |||
| 184 | ✗ | if (!(this->skylightConstruction())) { | |
| 185 | ✗ | construction = other.skylightConstruction(); | |
| 186 | ✗ | if (construction) { | |
| 187 | ✗ | this->setSkylightConstruction(*construction); | |
| 188 | } | ||
| 189 | } | ||
| 190 | |||
| 191 | ✗ | if (!(this->tubularDaylightDomeConstruction())) { | |
| 192 | ✗ | construction = other.tubularDaylightDomeConstruction(); | |
| 193 | ✗ | if (construction) { | |
| 194 | ✗ | this->setTubularDaylightDomeConstruction(*construction); | |
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | ✗ | if (!(this->tubularDaylightDiffuserConstruction())) { | |
| 199 | ✗ | construction = other.tubularDaylightDiffuserConstruction(); | |
| 200 | ✗ | if (construction) { | |
| 201 | ✗ | this->setTubularDaylightDiffuserConstruction(*construction); | |
| 202 | } | ||
| 203 | } | ||
| 204 | ✗ | } | |
| 205 | |||
| 206 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::fixedWindowConstructionAsModelObject() const { | |
| 207 | ✗ | OptionalModelObject result; | |
| 208 | ✗ | OptionalConstructionBase intermediate = fixedWindowConstruction(); | |
| 209 | ✗ | if (intermediate) { | |
| 210 | ✗ | result = *intermediate; | |
| 211 | } | ||
| 212 | ✗ | return result; | |
| 213 | ✗ | } | |
| 214 | |||
| 215 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::operableWindowConstructionAsModelObject() const { | |
| 216 | ✗ | OptionalModelObject result; | |
| 217 | ✗ | OptionalConstructionBase intermediate = operableWindowConstruction(); | |
| 218 | ✗ | if (intermediate) { | |
| 219 | ✗ | result = *intermediate; | |
| 220 | } | ||
| 221 | ✗ | return result; | |
| 222 | ✗ | } | |
| 223 | |||
| 224 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::doorConstructionAsModelObject() const { | |
| 225 | ✗ | OptionalModelObject result; | |
| 226 | ✗ | OptionalConstructionBase intermediate = doorConstruction(); | |
| 227 | ✗ | if (intermediate) { | |
| 228 | ✗ | result = *intermediate; | |
| 229 | } | ||
| 230 | ✗ | return result; | |
| 231 | ✗ | } | |
| 232 | |||
| 233 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::glassDoorConstructionAsModelObject() const { | |
| 234 | ✗ | OptionalModelObject result; | |
| 235 | ✗ | OptionalConstructionBase intermediate = glassDoorConstruction(); | |
| 236 | ✗ | if (intermediate) { | |
| 237 | ✗ | result = *intermediate; | |
| 238 | } | ||
| 239 | ✗ | return result; | |
| 240 | ✗ | } | |
| 241 | |||
| 242 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::overheadDoorConstructionAsModelObject() const { | |
| 243 | ✗ | OptionalModelObject result; | |
| 244 | ✗ | OptionalConstructionBase intermediate = overheadDoorConstruction(); | |
| 245 | ✗ | if (intermediate) { | |
| 246 | ✗ | result = *intermediate; | |
| 247 | } | ||
| 248 | ✗ | return result; | |
| 249 | ✗ | } | |
| 250 | |||
| 251 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::skylightConstructionAsModelObject() const { | |
| 252 | ✗ | OptionalModelObject result; | |
| 253 | ✗ | OptionalConstructionBase intermediate = skylightConstruction(); | |
| 254 | ✗ | if (intermediate) { | |
| 255 | ✗ | result = *intermediate; | |
| 256 | } | ||
| 257 | ✗ | return result; | |
| 258 | ✗ | } | |
| 259 | |||
| 260 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::tubularDaylightDomeConstructionAsModelObject() const { | |
| 261 | ✗ | OptionalModelObject result; | |
| 262 | ✗ | OptionalConstructionBase intermediate = tubularDaylightDomeConstruction(); | |
| 263 | ✗ | if (intermediate) { | |
| 264 | ✗ | result = *intermediate; | |
| 265 | } | ||
| 266 | ✗ | return result; | |
| 267 | ✗ | } | |
| 268 | |||
| 269 | ✗ | boost::optional<ModelObject> DefaultSubSurfaceConstructions_Impl::tubularDaylightDiffuserConstructionAsModelObject() const { | |
| 270 | ✗ | OptionalModelObject result; | |
| 271 | ✗ | OptionalConstructionBase intermediate = tubularDaylightDiffuserConstruction(); | |
| 272 | ✗ | if (intermediate) { | |
| 273 | ✗ | result = *intermediate; | |
| 274 | } | ||
| 275 | ✗ | return result; | |
| 276 | ✗ | } | |
| 277 | |||
| 278 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setFixedWindowConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 279 | ✗ | if (modelObject) { | |
| 280 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 281 | ✗ | if (intermediate) { | |
| 282 | ✗ | return setFixedWindowConstruction(*intermediate); | |
| 283 | } else { | ||
| 284 | ✗ | return false; | |
| 285 | } | ||
| 286 | ✗ | } else { | |
| 287 | ✗ | resetFixedWindowConstruction(); | |
| 288 | } | ||
| 289 | ✗ | return true; | |
| 290 | } | ||
| 291 | |||
| 292 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setOperableWindowConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 293 | ✗ | if (modelObject) { | |
| 294 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 295 | ✗ | if (intermediate) { | |
| 296 | ✗ | return setOperableWindowConstruction(*intermediate); | |
| 297 | } else { | ||
| 298 | ✗ | return false; | |
| 299 | } | ||
| 300 | ✗ | } else { | |
| 301 | ✗ | resetOperableWindowConstruction(); | |
| 302 | } | ||
| 303 | ✗ | return true; | |
| 304 | } | ||
| 305 | |||
| 306 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setDoorConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 307 | ✗ | if (modelObject) { | |
| 308 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 309 | ✗ | if (intermediate) { | |
| 310 | ✗ | return setDoorConstruction(*intermediate); | |
| 311 | } else { | ||
| 312 | ✗ | return false; | |
| 313 | } | ||
| 314 | ✗ | } else { | |
| 315 | ✗ | resetDoorConstruction(); | |
| 316 | } | ||
| 317 | ✗ | return true; | |
| 318 | } | ||
| 319 | |||
| 320 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setGlassDoorConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 321 | ✗ | if (modelObject) { | |
| 322 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 323 | ✗ | if (intermediate) { | |
| 324 | ✗ | return setGlassDoorConstruction(*intermediate); | |
| 325 | } else { | ||
| 326 | ✗ | return false; | |
| 327 | } | ||
| 328 | ✗ | } else { | |
| 329 | ✗ | resetGlassDoorConstruction(); | |
| 330 | } | ||
| 331 | ✗ | return true; | |
| 332 | } | ||
| 333 | |||
| 334 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setOverheadDoorConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 335 | ✗ | if (modelObject) { | |
| 336 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 337 | ✗ | if (intermediate) { | |
| 338 | ✗ | return setOverheadDoorConstruction(*intermediate); | |
| 339 | } else { | ||
| 340 | ✗ | return false; | |
| 341 | } | ||
| 342 | ✗ | } else { | |
| 343 | ✗ | resetOverheadDoorConstruction(); | |
| 344 | } | ||
| 345 | ✗ | return true; | |
| 346 | } | ||
| 347 | |||
| 348 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setSkylightConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 349 | ✗ | if (modelObject) { | |
| 350 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 351 | ✗ | if (intermediate) { | |
| 352 | ✗ | return setSkylightConstruction(*intermediate); | |
| 353 | } else { | ||
| 354 | ✗ | return false; | |
| 355 | } | ||
| 356 | ✗ | } else { | |
| 357 | ✗ | resetSkylightConstruction(); | |
| 358 | } | ||
| 359 | ✗ | return true; | |
| 360 | } | ||
| 361 | |||
| 362 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setTubularDaylightDomeConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 363 | ✗ | if (modelObject) { | |
| 364 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 365 | ✗ | if (intermediate) { | |
| 366 | ✗ | return setTubularDaylightDomeConstruction(*intermediate); | |
| 367 | } else { | ||
| 368 | ✗ | return false; | |
| 369 | } | ||
| 370 | ✗ | } else { | |
| 371 | ✗ | resetTubularDaylightDomeConstruction(); | |
| 372 | } | ||
| 373 | ✗ | return true; | |
| 374 | } | ||
| 375 | |||
| 376 | ✗ | bool DefaultSubSurfaceConstructions_Impl::setTubularDaylightDiffuserConstructionAsModelObject(boost::optional<ModelObject> modelObject) { | |
| 377 | ✗ | if (modelObject) { | |
| 378 | ✗ | OptionalConstructionBase intermediate = modelObject->optionalCast<ConstructionBase>(); | |
| 379 | ✗ | if (intermediate) { | |
| 380 | ✗ | return setTubularDaylightDiffuserConstruction(*intermediate); | |
| 381 | } else { | ||
| 382 | ✗ | return false; | |
| 383 | } | ||
| 384 | ✗ | } else { | |
| 385 | ✗ | resetTubularDaylightDiffuserConstruction(); | |
| 386 | } | ||
| 387 | ✗ | return true; | |
| 388 | } | ||
| 389 | |||
| 390 | } // namespace detail | ||
| 391 | |||
| 392 | 357 | DefaultSubSurfaceConstructions::DefaultSubSurfaceConstructions(const Model& model) | |
| 393 | 357 | : ResourceObject(DefaultSubSurfaceConstructions::iddObjectType(), model) { | |
| 394 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 357 times.
✗ Branch 5 not taken.
|
357 | OS_ASSERT(getImpl<detail::DefaultSubSurfaceConstructions_Impl>()); |
| 395 | 357 | } | |
| 396 | |||
| 397 | 8762 | IddObjectType DefaultSubSurfaceConstructions::iddObjectType() { | |
| 398 |
1/1✓ Branch 1 taken 8762 times.
|
8762 | IddObjectType result(IddObjectType::OS_DefaultSubSurfaceConstructions); |
| 399 | 8762 | return result; | |
| 400 | } | ||
| 401 | |||
| 402 | 1639 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::fixedWindowConstruction() const { | |
| 403 |
1/1✓ Branch 3 taken 1639 times.
|
1639 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->fixedWindowConstruction(); |
| 404 | } | ||
| 405 | |||
| 406 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::operableWindowConstruction() const { | |
| 407 |
1/1✓ Branch 3 taken 312 times.
|
312 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->operableWindowConstruction(); |
| 408 | } | ||
| 409 | |||
| 410 | 487 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::doorConstruction() const { | |
| 411 |
1/1✓ Branch 3 taken 487 times.
|
487 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->doorConstruction(); |
| 412 | } | ||
| 413 | |||
| 414 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::glassDoorConstruction() const { | |
| 415 |
1/1✓ Branch 3 taken 312 times.
|
312 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->glassDoorConstruction(); |
| 416 | } | ||
| 417 | |||
| 418 | 312 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::overheadDoorConstruction() const { | |
| 419 |
1/1✓ Branch 3 taken 312 times.
|
312 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->overheadDoorConstruction(); |
| 420 | } | ||
| 421 | |||
| 422 | 318 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::skylightConstruction() const { | |
| 423 |
1/1✓ Branch 3 taken 318 times.
|
318 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->skylightConstruction(); |
| 424 | } | ||
| 425 | |||
| 426 | 310 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::tubularDaylightDomeConstruction() const { | |
| 427 |
1/1✓ Branch 3 taken 310 times.
|
310 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->tubularDaylightDomeConstruction(); |
| 428 | } | ||
| 429 | |||
| 430 | 310 | boost::optional<ConstructionBase> DefaultSubSurfaceConstructions::tubularDaylightDiffuserConstruction() const { | |
| 431 |
1/1✓ Branch 3 taken 310 times.
|
310 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->tubularDaylightDiffuserConstruction(); |
| 432 | } | ||
| 433 | |||
| 434 | 349 | bool DefaultSubSurfaceConstructions::setFixedWindowConstruction(const ConstructionBase& construction) { | |
| 435 |
1/1✓ Branch 3 taken 349 times.
|
349 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setFixedWindowConstruction(construction); |
| 436 | } | ||
| 437 | |||
| 438 | 3 | void DefaultSubSurfaceConstructions::resetFixedWindowConstruction() { | |
| 439 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetFixedWindowConstruction(); |
| 440 | 3 | } | |
| 441 | |||
| 442 | 339 | bool DefaultSubSurfaceConstructions::setOperableWindowConstruction(const ConstructionBase& construction) { | |
| 443 |
1/1✓ Branch 3 taken 339 times.
|
339 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setOperableWindowConstruction(construction); |
| 444 | } | ||
| 445 | |||
| 446 | 1 | void DefaultSubSurfaceConstructions::resetOperableWindowConstruction() { | |
| 447 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetOperableWindowConstruction(); |
| 448 | 1 | } | |
| 449 | |||
| 450 | 343 | bool DefaultSubSurfaceConstructions::setDoorConstruction(const ConstructionBase& construction) { | |
| 451 |
1/1✓ Branch 3 taken 343 times.
|
343 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setDoorConstruction(construction); |
| 452 | } | ||
| 453 | |||
| 454 | 3 | void DefaultSubSurfaceConstructions::resetDoorConstruction() { | |
| 455 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetDoorConstruction(); |
| 456 | 3 | } | |
| 457 | |||
| 458 | 340 | bool DefaultSubSurfaceConstructions::setGlassDoorConstruction(const ConstructionBase& construction) { | |
| 459 |
1/1✓ Branch 3 taken 340 times.
|
340 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setGlassDoorConstruction(construction); |
| 460 | } | ||
| 461 | |||
| 462 | 1 | void DefaultSubSurfaceConstructions::resetGlassDoorConstruction() { | |
| 463 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetGlassDoorConstruction(); |
| 464 | 1 | } | |
| 465 | |||
| 466 | 339 | bool DefaultSubSurfaceConstructions::setOverheadDoorConstruction(const ConstructionBase& construction) { | |
| 467 |
1/1✓ Branch 3 taken 339 times.
|
339 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setOverheadDoorConstruction(construction); |
| 468 | } | ||
| 469 | |||
| 470 | 1 | void DefaultSubSurfaceConstructions::resetOverheadDoorConstruction() { | |
| 471 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetOverheadDoorConstruction(); |
| 472 | 1 | } | |
| 473 | |||
| 474 | 340 | bool DefaultSubSurfaceConstructions::setSkylightConstruction(const ConstructionBase& construction) { | |
| 475 |
1/1✓ Branch 3 taken 340 times.
|
340 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setSkylightConstruction(construction); |
| 476 | } | ||
| 477 | |||
| 478 | 3 | void DefaultSubSurfaceConstructions::resetSkylightConstruction() { | |
| 479 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetSkylightConstruction(); |
| 480 | 3 | } | |
| 481 | |||
| 482 | 338 | bool DefaultSubSurfaceConstructions::setTubularDaylightDomeConstruction(const ConstructionBase& construction) { | |
| 483 |
1/1✓ Branch 3 taken 338 times.
|
338 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setTubularDaylightDomeConstruction(construction); |
| 484 | } | ||
| 485 | |||
| 486 | 1 | void DefaultSubSurfaceConstructions::resetTubularDaylightDomeConstruction() { | |
| 487 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetTubularDaylightDomeConstruction(); |
| 488 | 1 | } | |
| 489 | |||
| 490 | 338 | bool DefaultSubSurfaceConstructions::setTubularDaylightDiffuserConstruction(const ConstructionBase& construction) { | |
| 491 |
1/1✓ Branch 3 taken 338 times.
|
338 | return getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->setTubularDaylightDiffuserConstruction(construction); |
| 492 | } | ||
| 493 | |||
| 494 | 1 | void DefaultSubSurfaceConstructions::resetTubularDaylightDiffuserConstruction() { | |
| 495 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->resetTubularDaylightDiffuserConstruction(); |
| 496 | 1 | } | |
| 497 | |||
| 498 | ✗ | void DefaultSubSurfaceConstructions::merge(const DefaultSubSurfaceConstructions& other) { | |
| 499 | ✗ | getImpl<detail::DefaultSubSurfaceConstructions_Impl>()->merge(other); | |
| 500 | ✗ | } | |
| 501 | |||
| 502 | /// @cond | ||
| 503 | 1975 | DefaultSubSurfaceConstructions::DefaultSubSurfaceConstructions(std::shared_ptr<detail::DefaultSubSurfaceConstructions_Impl> impl) | |
| 504 |
1/1✓ Branch 3 taken 1975 times.
|
1975 | : ResourceObject(std::move(impl)) {} |
| 505 | /// @endcond | ||
| 506 | |||
| 507 | } // namespace model | ||
| 508 | } // namespace openstudio | ||
| 509 |