src/model/SurfacePropertyOtherSideConditionsModel.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 "SurfacePropertyOtherSideConditionsModel.hpp" | ||
| 7 | #include "SurfacePropertyOtherSideConditionsModel_Impl.hpp" | ||
| 8 | |||
| 9 | #include <utilities/idd/IddFactory.hxx> | ||
| 10 | #include <utilities/idd/IddEnums.hxx> | ||
| 11 | #include <utilities/idd/OS_SurfaceProperty_OtherSideConditionsModel_FieldEnums.hxx> | ||
| 12 | |||
| 13 | #include "../utilities/core/Assert.hpp" | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | namespace model { | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | 13 | SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 21 | 13 | bool keepHandle) | |
| 22 | 13 | : ResourceObject_Impl(idfObject, model, keepHandle) { | |
| 23 |
4/6✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
✓ Branch 7 taken 13 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 13 times.
✗ Branch 13 not taken.
|
13 | OS_ASSERT(idfObject.iddObject().type() == SurfacePropertyOtherSideConditionsModel::iddObjectType()); |
| 24 | 13 | } | |
| 25 | |||
| 26 | ✗ | SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 27 | ✗ | Model_Impl* model, bool keepHandle) | |
| 28 | ✗ | : ResourceObject_Impl(other, model, keepHandle) { | |
| 29 | ✗ | OS_ASSERT(other.iddObject().type() == SurfacePropertyOtherSideConditionsModel::iddObjectType()); | |
| 30 | ✗ | } | |
| 31 | |||
| 32 | 3 | SurfacePropertyOtherSideConditionsModel_Impl::SurfacePropertyOtherSideConditionsModel_Impl( | |
| 33 | 3 | const SurfacePropertyOtherSideConditionsModel_Impl& other, Model_Impl* model, bool keepHandle) | |
| 34 | 3 | : ResourceObject_Impl(other, model, keepHandle) {} | |
| 35 | |||
| 36 | ✗ | const std::vector<std::string>& SurfacePropertyOtherSideConditionsModel_Impl::outputVariableNames() const { | |
| 37 | static const std::vector<std::string> result{"Surface Other Side Conditions Modeled Convection Air Temperature", | ||
| 38 | "Surface Other Side Conditions Modeled Convection Heat Transfer Coefficient", | ||
| 39 | "Surface Other Side Conditions Modeled Radiation Temperature", | ||
| 40 | ✗ | "Surface Other Side Conditions Modeled Radiation Heat Transfer Coefficient"}; | |
| 41 | ✗ | return result; | |
| 42 | ✗ | } | |
| 43 | |||
| 44 | ✗ | IddObjectType SurfacePropertyOtherSideConditionsModel_Impl::iddObjectType() const { | |
| 45 | ✗ | return SurfacePropertyOtherSideConditionsModel::iddObjectType(); | |
| 46 | } | ||
| 47 | |||
| 48 | 3 | std::string SurfacePropertyOtherSideConditionsModel_Impl::typeOfModeling() const { | |
| 49 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<std::string> value = getString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, true); |
| 50 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
|
3 | OS_ASSERT(value); |
| 51 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | return value.get(); |
| 52 | 3 | } | |
| 53 | |||
| 54 | ✗ | bool SurfacePropertyOtherSideConditionsModel_Impl::isTypeOfModelingDefaulted() const { | |
| 55 | ✗ | return isEmpty(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling); | |
| 56 | } | ||
| 57 | |||
| 58 | 6 | bool SurfacePropertyOtherSideConditionsModel_Impl::setTypeOfModeling(const std::string& typeOfModeling) { | |
| 59 | 6 | bool result = setString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, typeOfModeling); | |
| 60 | 6 | return result; | |
| 61 | } | ||
| 62 | |||
| 63 | ✗ | void SurfacePropertyOtherSideConditionsModel_Impl::resetTypeOfModeling() { | |
| 64 | ✗ | bool result = setString(OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling, ""); | |
| 65 | ✗ | OS_ASSERT(result); | |
| 66 | ✗ | } | |
| 67 | |||
| 68 | ✗ | std::vector<EMSActuatorNames> SurfacePropertyOtherSideConditionsModel_Impl::emsActuatorNames() const { | |
| 69 | std::vector<EMSActuatorNames> actuators{{"Other Side Boundary Conditions", "Convection Bulk Air Temperature"}, | ||
| 70 | {"Other Side Boundary Conditions", "Convection Heat Transfer Coefficient"}, | ||
| 71 | {"Other Side Boundary Conditions", "Radiation Effective Temperature"}, | ||
| 72 | ✗ | {"Other Side Boundary Conditions", "Radiation Linear Heat Transfer Coefficient"}}; | |
| 73 | ✗ | return actuators; | |
| 74 | ✗ | } | |
| 75 | |||
| 76 | ✗ | std::vector<std::string> SurfacePropertyOtherSideConditionsModel_Impl::emsInternalVariableNames() const { | |
| 77 | ✗ | std::vector<std::string> types; | |
| 78 | ✗ | return types; | |
| 79 | } | ||
| 80 | } // namespace detail | ||
| 81 | |||
| 82 | 13 | SurfacePropertyOtherSideConditionsModel::SurfacePropertyOtherSideConditionsModel(const Model& model) | |
| 83 | 13 | : ResourceObject(SurfacePropertyOtherSideConditionsModel::iddObjectType(), model) { | |
| 84 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 13 times.
✗ Branch 5 not taken.
|
13 | OS_ASSERT(getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()); |
| 85 | 13 | } | |
| 86 | |||
| 87 | 7626 | IddObjectType SurfacePropertyOtherSideConditionsModel::iddObjectType() { | |
| 88 |
1/1✓ Branch 1 taken 7626 times.
|
7626 | return {IddObjectType::OS_SurfaceProperty_OtherSideConditionsModel}; |
| 89 | } | ||
| 90 | |||
| 91 | ✗ | std::vector<std::string> SurfacePropertyOtherSideConditionsModel::typeOfModelingValues() { | |
| 92 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_SurfaceProperty_OtherSideConditionsModelFields::TypeofModeling); | |
| 93 | } | ||
| 94 | |||
| 95 | 3 | std::string SurfacePropertyOtherSideConditionsModel::typeOfModeling() const { | |
| 96 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->typeOfModeling(); |
| 97 | } | ||
| 98 | |||
| 99 | ✗ | bool SurfacePropertyOtherSideConditionsModel::isTypeOfModelingDefaulted() const { | |
| 100 | ✗ | return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->isTypeOfModelingDefaulted(); | |
| 101 | } | ||
| 102 | |||
| 103 | 6 | bool SurfacePropertyOtherSideConditionsModel::setTypeOfModeling(const std::string& typeOfModeling) { | |
| 104 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->setTypeOfModeling(typeOfModeling); |
| 105 | } | ||
| 106 | |||
| 107 | ✗ | void SurfacePropertyOtherSideConditionsModel::resetTypeOfModeling() { | |
| 108 | ✗ | getImpl<detail::SurfacePropertyOtherSideConditionsModel_Impl>()->resetTypeOfModeling(); | |
| 109 | ✗ | } | |
| 110 | |||
| 111 | /// @cond | ||
| 112 | 25 | SurfacePropertyOtherSideConditionsModel::SurfacePropertyOtherSideConditionsModel( | |
| 113 | 25 | std::shared_ptr<detail::SurfacePropertyOtherSideConditionsModel_Impl> impl) | |
| 114 |
1/1✓ Branch 3 taken 25 times.
|
25 | : ResourceObject(std::move(impl)) {} |
| 115 | /// @endcond | ||
| 116 | |||
| 117 | } // namespace model | ||
| 118 | } // namespace openstudio | ||
| 119 |