GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 1 / 2
Functions: 100.0% 1 / 1 / 2
Branches: -% 0 / 1 / 1

src/model/ShadingSurface_Impl.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_SHADINGSURFACE_IMPL_HPP
7 #define MODEL_SHADINGSURFACE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "PlanarSurface_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class ShadingSurfaceGroup;
16 class Schedule;
17 class ShadingSurface;
18 class DaylightingDeviceShelf;
19
20 namespace detail {
21
22 /** ShadingSurface_Impl is a PlanarSurface_Impl that is the implementation class for ShadingSurface.*/
23 class MODEL_API ShadingSurface_Impl : public PlanarSurface_Impl
24 {
25
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 ShadingSurface_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
31
32 ShadingSurface_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
33
34 ShadingSurface_Impl(const ShadingSurface_Impl& other, Model_Impl* model, bool keepHandle);
35
36 3839 virtual ~ShadingSurface_Impl() override = default;
37
38 //@}
39 /** @name Virtual Methods */
40 //@{
41
42 // return the parent object in the hierarchy
43 virtual boost::optional<ParentObject> parent() const override;
44
45 // return any children objects in the hierarchy
46 virtual std::vector<ModelObject> children() const override;
47
48 /// set the parent, child may have to call methods on the parent
49 virtual bool setParent(ParentObject& newParent) override;
50
51 virtual const std::vector<std::string>& outputVariableNames() const override;
52
53 virtual IddObjectType iddObjectType() const override;
54
55 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
56
57 /// should subtract this surface from parent's gross area for net area
58 virtual bool subtractFromGrossArea() const override;
59
60 /// get the construction object and search distance
61 virtual boost::optional<std::pair<ConstructionBase, int>> constructionWithSearchDistance() const override;
62
63 /// Returns true if the construction is not directly referenced by this surface .
64 virtual bool isConstructionDefaulted() const override;
65
66 /// set the construction object
67 virtual bool setConstruction(const ConstructionBase& construction) override;
68
69 /// Resets the construction object.
70 virtual void resetConstruction() override;
71
72 /// Returns the containing PlanarSurfaceGroup if available.
73 virtual boost::optional<PlanarSurfaceGroup> planarSurfaceGroup() const override;
74
75 /// Returns the containing Space if available.
76 virtual boost::optional<Space> space() const override;
77
78 //@}
79 /** @name Getters */
80 //@{
81
82 /// get the shading group
83 boost::optional<ShadingSurfaceGroup> shadingSurfaceGroup() const;
84
85 // get the transmittance schedule
86 boost::optional<Schedule> transmittanceSchedule() const;
87
88 boost::optional<double> numberofVertices() const;
89
90 bool isNumberofVerticesDefaulted() const;
91
92 bool isNumberofVerticesAutocalculated() const;
93
94 //@}
95 /** @name Setters */
96 //@{
97
98 /// set the exterior shading group
99 bool setShadingSurfaceGroup(const ShadingSurfaceGroup& shadingSurfaceGroup);
100
101 void resetShadingSurfaceGroup();
102
103 /// set the transmittance schedule
104 bool setTransmittanceSchedule(Schedule& transmittanceSchedule);
105
106 /// reset the transmittance schedule
107 void resetTransmittanceSchedule();
108
109 bool setNumberofVertices(boost::optional<double> numberofVertices);
110
111 bool setNumberofVertices(double numberofVertices);
112
113 void resetNumberofVertices();
114
115 void autocalculateNumberofVertices();
116
117 //@}
118
119 boost::optional<DaylightingDeviceShelf> daylightingDeviceShelf() const;
120
121 protected:
122 private:
123 − REGISTER_LOGGER("openstudio.model.ShadingSurface");
124
125 boost::optional<ModelObject> shadingSurfaceGroupAsModelObject() const;
126 boost::optional<ModelObject> transmittanceScheduleAsModelObject() const;
127
128 bool setShadingSurfaceGroupAsModelObject(const boost::optional<ModelObject>& modelObject);
129 bool setTransmittanceScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
130 };
131
132 } // namespace detail
133
134 } // namespace model
135 } // namespace openstudio
136
137 #endif // MODEL_SHADINGSURFACE_IMPL_HPP
138