src/model/DefaultConstructionSet.hpp
| 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 | #ifndef MODEL_DEFAULTCONSTRUCTIONSET_HPP | ||
| 7 | #define MODEL_DEFAULTCONSTRUCTIONSET_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ResourceObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class PlanarSurface; | ||
| 16 | class ConstructionBase; | ||
| 17 | class DefaultSubSurfaceConstructions; | ||
| 18 | class DefaultSurfaceConstructions; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | class DefaultConstructionSet_Impl; | ||
| 23 | |||
| 24 | } // namespace detail | ||
| 25 | |||
| 26 | /** DefaultConstructionSet is a ResourceObject that wraps the OpenStudio IDD object 'OS_DefaultConstructionSet'. */ | ||
| 27 | class MODEL_API DefaultConstructionSet : public ResourceObject | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | /** @name Constructors and Destructors */ | ||
| 31 | //@{ | ||
| 32 | |||
| 33 | explicit DefaultConstructionSet(const Model& model); | ||
| 34 | |||
| 35 | 95576 | virtual ~DefaultConstructionSet() override = default; | |
| 36 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 37 | 653 | DefaultConstructionSet(const DefaultConstructionSet& other) = default; | |
| 38 | 70569 | DefaultConstructionSet(DefaultConstructionSet&& other) = default; | |
| 39 | ✗ | DefaultConstructionSet& operator=(const DefaultConstructionSet&) = default; | |
| 40 | 55 | DefaultConstructionSet& operator=(DefaultConstructionSet&&) = default; | |
| 41 | |||
| 42 | //@} | ||
| 43 | /** @name Static Methods */ | ||
| 44 | //@{ | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | //@} | ||
| 49 | /** @name Getters */ | ||
| 50 | //@{ | ||
| 51 | |||
| 52 | boost::optional<DefaultSurfaceConstructions> defaultExteriorSurfaceConstructions() const; | ||
| 53 | |||
| 54 | boost::optional<DefaultSurfaceConstructions> defaultInteriorSurfaceConstructions() const; | ||
| 55 | |||
| 56 | boost::optional<DefaultSurfaceConstructions> defaultGroundContactSurfaceConstructions() const; | ||
| 57 | |||
| 58 | boost::optional<DefaultSubSurfaceConstructions> defaultExteriorSubSurfaceConstructions() const; | ||
| 59 | |||
| 60 | boost::optional<DefaultSubSurfaceConstructions> defaultInteriorSubSurfaceConstructions() const; | ||
| 61 | |||
| 62 | boost::optional<ConstructionBase> interiorPartitionConstruction() const; | ||
| 63 | |||
| 64 | boost::optional<ConstructionBase> spaceShadingConstruction() const; | ||
| 65 | |||
| 66 | boost::optional<ConstructionBase> buildingShadingConstruction() const; | ||
| 67 | |||
| 68 | boost::optional<ConstructionBase> siteShadingConstruction() const; | ||
| 69 | |||
| 70 | boost::optional<ConstructionBase> adiabaticSurfaceConstruction() const; | ||
| 71 | |||
| 72 | //@} | ||
| 73 | /** @name Setters */ | ||
| 74 | //@{ | ||
| 75 | |||
| 76 | bool setDefaultExteriorSurfaceConstructions(const DefaultSurfaceConstructions& defaultSurfaceConstructions); | ||
| 77 | |||
| 78 | void resetDefaultExteriorSurfaceConstructions(); | ||
| 79 | |||
| 80 | bool setDefaultInteriorSurfaceConstructions(const DefaultSurfaceConstructions& defaultSurfaceConstructions); | ||
| 81 | |||
| 82 | void resetDefaultInteriorSurfaceConstructions(); | ||
| 83 | |||
| 84 | bool setDefaultGroundContactSurfaceConstructions(const DefaultSurfaceConstructions& defaultSurfaceConstructions); | ||
| 85 | |||
| 86 | void resetDefaultGroundContactSurfaceConstructions(); | ||
| 87 | |||
| 88 | bool setDefaultExteriorSubSurfaceConstructions(const DefaultSubSurfaceConstructions& defaultSubSurfaceConstructions); | ||
| 89 | |||
| 90 | void resetDefaultExteriorSubSurfaceConstructions(); | ||
| 91 | |||
| 92 | bool setDefaultInteriorSubSurfaceConstructions(const DefaultSubSurfaceConstructions& defaultSubSurfaceConstructions); | ||
| 93 | |||
| 94 | void resetDefaultInteriorSubSurfaceConstructions(); | ||
| 95 | |||
| 96 | bool setInteriorPartitionConstruction(const ConstructionBase& construction); | ||
| 97 | |||
| 98 | void resetInteriorPartitionConstruction(); | ||
| 99 | |||
| 100 | bool setSpaceShadingConstruction(const ConstructionBase& construction); | ||
| 101 | |||
| 102 | void resetSpaceShadingConstruction(); | ||
| 103 | |||
| 104 | bool setBuildingShadingConstruction(const ConstructionBase& construction); | ||
| 105 | |||
| 106 | void resetBuildingShadingConstruction(); | ||
| 107 | |||
| 108 | bool setSiteShadingConstruction(const ConstructionBase& construction); | ||
| 109 | |||
| 110 | void resetSiteShadingConstruction(); | ||
| 111 | |||
| 112 | bool setAdiabaticSurfaceConstruction(const ConstructionBase& construction); | ||
| 113 | |||
| 114 | void resetAdiabaticSurfaceConstruction(); | ||
| 115 | |||
| 116 | //@} | ||
| 117 | |||
| 118 | /// Returns the default construction for this planar surface if available. | ||
| 119 | boost::optional<ConstructionBase> getDefaultConstruction(const PlanarSurface& planarSurface) const; | ||
| 120 | |||
| 121 | /// Merge this object with other one, keep fields from this object if set otherwise set to value from other. | ||
| 122 | void merge(const DefaultConstructionSet& other); | ||
| 123 | |||
| 124 | protected: | ||
| 125 | /// @cond | ||
| 126 | using ImplType = detail::DefaultConstructionSet_Impl; | ||
| 127 | |||
| 128 | friend class Model; | ||
| 129 | friend class openstudio::IdfObject; | ||
| 130 | |||
| 131 | explicit DefaultConstructionSet(std::shared_ptr<detail::DefaultConstructionSet_Impl> impl); | ||
| 132 | |||
| 133 | /// @endcond | ||
| 134 | private: | ||
| 135 | REGISTER_LOGGER("openstudio.model.DefaultConstructionSet"); | ||
| 136 | }; | ||
| 137 | |||
| 138 | /** \relates DefaultConstructionSet*/ | ||
| 139 | using OptionalDefaultConstructionSet = boost::optional<DefaultConstructionSet>; | ||
| 140 | |||
| 141 | /** \relates DefaultConstructionSet*/ | ||
| 142 | using DefaultConstructionSetVector = std::vector<DefaultConstructionSet>; | ||
| 143 | |||
| 144 | } // namespace model | ||
| 145 | } // namespace openstudio | ||
| 146 | |||
| 147 | #endif // MODEL_DEFAULTCONSTRUCTIONSET_HPP | ||
| 148 |