GCC Code Coverage Report


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

src/model/BuildingUnit_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_BUILDINGUNIT_IMPL_HPP
7 #define MODEL_BUILDINGUNIT_IMPL_HPP
8
9 #include "ModelObject_Impl.hpp"
10
11 namespace openstudio {
12 namespace model {
13
14 class Space;
15 class RenderingColor;
16 class BuildingUnit;
17
18 namespace detail {
19
20 class MODEL_API BuildingUnit_Impl : public ModelObject_Impl
21 {
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 BuildingUnit_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 BuildingUnit_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
29
30 BuildingUnit_Impl(const BuildingUnit_Impl& other, Model_Impl* model, bool keepHandle);
31
32 30 virtual ~BuildingUnit_Impl() override = default;
33
34 //@}
35
36 virtual const std::vector<std::string>& outputVariableNames() const override;
37
38 virtual IddObjectType iddObjectType() const override;
39
40 /** @name Getters */
41 //@{
42
43 boost::optional<RenderingColor> renderingColor() const;
44
45 std::string buildingUnitType() const;
46
47 std::vector<Space> spaces() const;
48
49 std::vector<std::string> featureNames() const;
50
51 boost::optional<std::string> getFeatureDataType(const std::string& name) const;
52
53 boost::optional<std::string> getFeatureAsString(const std::string& name) const;
54
55 boost::optional<double> getFeatureAsDouble(const std::string& name) const;
56
57 boost::optional<int> getFeatureAsInteger(const std::string& name) const;
58
59 boost::optional<bool> getFeatureAsBoolean(const std::string& name) const;
60
61 std::vector<std::string> suggestedFeatures() const;
62
63 //@}
64
65 /** @name Setters */
66 //@{
67
68 bool setRenderingColor(const RenderingColor& renderingColor);
69
70 void resetRenderingColor();
71
72 bool setBuildingUnitType(const std::string& buildingUnitType);
73
74 void resetBuildingUnitType();
75
76 bool setFeature(const std::string& name, const std::string& value);
77
78 bool setFeature(const std::string& name, const char* value);
79
80 bool setFeature(const std::string& name, double value);
81
82 bool setFeature(const std::string& name, int value);
83
84 bool setFeature(const std::string& name, bool value);
85
86 bool resetFeature(const std::string& name);
87
88 //@}
89
90 protected:
91 private:
92 REGISTER_LOGGER("openstudio.model.BuildingUnit")
93 };
94
95 } // namespace detail
96 } // namespace model
97 } // namespace openstudio
98
99 #endif //MODEL_BUILDINGUNIT_IMPL_HPP
100