GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 80.0% 4 / 0 / 5
Functions: 80.0% 4 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/BuildingStory.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_BUILDINGSTORY_HPP
7 #define MODEL_BUILDINGSTORY_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 class BoundingBox;
15
16 namespace model {
17
18 class SpaceType;
19 class DefaultConstructionSet;
20 class DefaultScheduleSet;
21 class DefaultScheduleType;
22 class Space;
23 class RenderingColor;
24
25 namespace detail {
26
27 class BuildingStory_Impl;
28
29 } // namespace detail
30
31 /** BuildingStory is a ModelObject that wraps the OpenStudio IDD object 'OS_BuildingStory'. */
32 class MODEL_API BuildingStory : public ModelObject
33 {
34 public:
35 /** @name Constructors and Destructors */
36 //@{
37
38 explicit BuildingStory(const Model& model);
39
40 236548 virtual ~BuildingStory() override = default;
41 // Default the copy and move operators because the virtual dtor is explicit
42 8562 BuildingStory(const BuildingStory& other) = default;
43 164217 BuildingStory(BuildingStory&& other) = default;
44 ✗ BuildingStory& operator=(const BuildingStory&) = default;
45 676 BuildingStory& operator=(BuildingStory&&) = default;
46
47 //@}
48
49 static IddObjectType iddObjectType();
50
51 /** @name Getters */
52 //@{
53
54 boost::optional<double> nominalZCoordinate() const;
55
56 boost::optional<double> nominalFloortoFloorHeight() const;
57
58 boost::optional<double> nominalFloortoCeilingHeight() const;
59
60 /** Get the BoundingBox in building coordinates. */
61 openstudio::BoundingBox boundingBoxBuildingCoordinates() const;
62
63 /** Get the BoundingBox in site coordinates. */
64 openstudio::BoundingBox boundingBoxSiteCoordinates() const;
65
66 //@}
67 /** @name Setters */
68 //@{
69
70 bool setNominalZCoordinate(double nominalZCoordinate);
71 void resetNominalZCoordinate();
72
73 bool setNominalFloortoFloorHeight(double nominalFloortoFloorHeight);
74 void resetNominalFloortoFloorHeight();
75
76 bool setNominalFloortoCeilingHeight(double nominalFloortoCeilingHeight);
77 void resetNominalFloortoCeilingHeight();
78
79 //@}
80
81 /// Gets all spaces on this building story.
82 std::vector<Space> spaces() const;
83
84 /// Returns the default construction set that this space references directly.
85 boost::optional<DefaultConstructionSet> defaultConstructionSet() const;
86
87 /// Sets the default construction set for this space directly.
88 bool setDefaultConstructionSet(const DefaultConstructionSet& defaultConstructionSet);
89
90 /// Resets the default construction set for this space.
91 void resetDefaultConstructionSet();
92
93 /// Returns the default schedule set that this space references directly.
94 boost::optional<DefaultScheduleSet> defaultScheduleSet() const;
95
96 /// Sets the default schedule set for this space directly.
97 bool setDefaultScheduleSet(const DefaultScheduleSet& defaultScheduleSet);
98
99 /// Resets the default schedule set for this space.
100 void resetDefaultScheduleSet();
101
102 /// Returns the default schedule set for the specified type if available by searching (in order):
103 /// This object
104 /// The building's default schedule set
105 /// The building's space type's default schedule set
106 boost::optional<Schedule> getDefaultSchedule(const DefaultScheduleType& defaultScheduleType) const;
107
108 /// Returns the rendering color.
109 boost::optional<RenderingColor> renderingColor() const;
110
111 /// Sets the rendering color.
112 bool setRenderingColor(const RenderingColor& renderingColor);
113
114 /// Resets the rendering color.
115 void resetRenderingColor();
116
117 protected:
118 /// @cond
119 using ImplType = detail::BuildingStory_Impl;
120
121 friend class Model;
122 friend class openstudio::IdfObject;
123
124 explicit BuildingStory(std::shared_ptr<detail::BuildingStory_Impl> impl);
125
126 /// @endcond
127 private:
128 REGISTER_LOGGER("openstudio.model.BuildingStory");
129 };
130
131 /** \relates BuildingStory*/
132 using OptionalBuildingStory = boost::optional<BuildingStory>;
133
134 /** \relates BuildingStory*/
135 using BuildingStoryVector = std::vector<BuildingStory>;
136
137 } // namespace model
138 } // namespace openstudio
139
140 #endif // MODEL_BUILDINGSTORY_HPP
141