GCC Code Coverage Report


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

src/model/Site.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_SITE_HPP
7 #define MODEL_SITE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ParentObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 // forward declarations
16 class ClimateZones;
17 class WeatherFile;
18 class SiteGroundReflectance;
19 class SiteGroundTemperatureBuildingSurface;
20 class SiteGroundTemperatureDeep;
21 class SiteGroundTemperatureShallow;
22 class SiteGroundTemperatureFCfactorMethod;
23 class SiteWaterMainsTemperature;
24 class Facility;
25 class ShadingSurfaceGroup;
26
27 namespace detail {
28
29 class Site_Impl;
30
31 } // namespace detail
32
33 /** Site is a ParentObject that wraps the OpenStudio IDD object 'OS_Site'. */
34 class MODEL_API Site : public ParentObject
35 {
36 public:
37 /** @name Constructors and Destructors */
38 //@{
39
40 632 virtual ~Site() override = default;
41 // Default the copy and move operators because the virtual dtor is explicit
42 39 Site(const Site& other) = default;
43 115 Site(Site&& other) = default;
44 ✗ Site& operator=(const Site&) = default;
45 ✗ Site& operator=(Site&&) = default;
46
47 //@}
48 /** @name Static Methods */
49 //@{
50
51 static IddObjectType iddObjectType();
52
53 static std::vector<std::string> validTerrainValues();
54
55 //@}
56 /** @name Getters */
57 //@{
58
59 double latitude() const;
60
61 bool isLatitudeDefaulted() const;
62
63 double longitude() const;
64
65 bool isLongitudeDefaulted() const;
66
67 double timeZone() const;
68
69 bool isTimeZoneDefaulted() const;
70
71 double elevation() const;
72
73 bool isElevationDefaulted() const;
74
75 std::string terrain() const;
76
77 bool isTerrainDefaulted() const;
78
79 bool keepSiteLocationInformation() const;
80
81 bool isKeepSiteLocationInformationDefaulted() const;
82
83 //@}
84 /** @name Setters */
85 //@{
86
87 bool setLatitude(double latitude);
88
89 void resetLatitude();
90
91 bool setLongitude(double longitude);
92
93 void resetLongitude();
94
95 bool setTimeZone(double timeZone);
96
97 void resetTimeZone();
98
99 bool setElevation(double elevation);
100
101 void resetElevation();
102
103 bool setTerrain(const std::string& terrain);
104
105 void resetTerrain();
106
107 bool setKeepSiteLocationInformation(bool keepSiteLocationInformation);
108
109 void resetKeepSiteLocationInformation();
110
111 //@}
112
113 /** Unique WeatherFile object parented by Site. */
114 boost::optional<WeatherFile> weatherFile() const;
115
116 /** Unique SiteGroundReflectance object parented by Site. */
117 boost::optional<SiteGroundReflectance> siteGroundReflectance() const;
118
119 /** Unique SiteGroundTemperatureBuildingSurface object parented by Site. */
120 boost::optional<SiteGroundTemperatureBuildingSurface> siteGroundTemperatureBuildingSurface() const;
121
122 /** Unique SiteGroundTemperatureDeep object parented by Site. */
123 boost::optional<SiteGroundTemperatureDeep> siteGroundTemperatureDeep() const;
124
125 /** Unique SiteGroundTemperatureShallow object parented by Site. */
126 boost::optional<SiteGroundTemperatureShallow> siteGroundTemperatureShallow() const;
127
128 /** Unique SiteGroundTemperatureFCfactorMethod object parented by Site. */
129 boost::optional<SiteGroundTemperatureFCfactorMethod> siteGroundTemperatureFCfactorMethod() const;
130
131 /** Unique SiteWaterMainsTemperature object parented by Site. */
132 boost::optional<SiteWaterMainsTemperature> siteWaterMainsTemperature() const;
133
134 /** Unique ClimateZones object parented by Site. */
135 boost::optional<ClimateZones> climateZones() const;
136
137 /** ShadingSurfaceGroup objects of type Site. */
138 std::vector<ShadingSurfaceGroup> shadingSurfaceGroups() const;
139
140 /** The value of the active climate zone in the ClimateZones object. May be empty. */
141 //std::string activeClimateZoneValue() const;
142
143 /** Set the value of the active climate zone. */
144 //bool setActiveClimateZoneValue(const std::string& value);
145
146 /** The institution name of the active climate zone in the ClimateZones object. May be empty. */
147 //std::string activeClimateZoneInstitution() const;
148
149 /** Set the active climate zone institution to institution. */
150 //bool setActiveClimateZoneInstitution(const std::string& institution);
151
152 protected:
153 /// @cond
154 using ImplType = detail::Site_Impl;
155
156 friend class Model;
157 friend class openstudio::IdfObject;
158
159 explicit Site(std::shared_ptr<detail::Site_Impl> impl);
160
161 explicit Site(Model& model);
162
163 /// @endcond
164 private:
165 REGISTER_LOGGER("openstudio.model.Site");
166 };
167
168 /** \relates Site*/
169 using OptionalSite = boost::optional<Site>;
170
171 /** \relates Site*/
172 using SiteVector = std::vector<Site>;
173
174 } // namespace model
175 } // namespace openstudio
176
177 #endif // MODEL_SITE_HPP
178