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/InternalMass_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_INTERNALMASS_IMPL_HPP
7 #define MODEL_INTERNALMASS_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class InternalMass;
16 class InternalMassDefinition;
17 class SurfacePropertyConvectionCoefficients;
18
19 namespace detail {
20
21 /** InternalMass_Impl is a SpaceLoadInstance_Impl that is the implementation class for InternalMass.*/
22 class MODEL_API InternalMass_Impl : public SpaceLoadInstance_Impl
23 {
24
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 InternalMass_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
30
31 InternalMass_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
32
33 InternalMass_Impl(const InternalMass_Impl& other, Model_Impl* model, bool keepHandle);
34
35 170 virtual ~InternalMass_Impl() override = default;
36
37 //@}
38 /** @name Virtual Methods */
39 //@{
40
41 virtual const std::vector<std::string>& outputVariableNames() const override;
42
43 virtual IddObjectType iddObjectType() const override;
44
45 virtual bool hardSize() override;
46
47 virtual bool hardApplySchedules() override;
48
49 virtual double multiplier() const override;
50
51 virtual bool isMultiplierDefaulted() const override;
52
53 virtual bool isAbsolute() const override;
54
55 virtual std::vector<IdfObject> remove() override;
56
57 //@}
58 /** @name Getters */
59 //@{
60
61 /** Gets the InternalMassDefinition object. */
62 InternalMassDefinition internalMassDefinition() const;
63
64 /** Returns the surface property convection coefficients */
65 boost::optional<SurfacePropertyConvectionCoefficients> surfacePropertyConvectionCoefficients() const;
66
67 //@}
68 /** @name Setters */
69 //@{
70
71 /** Sets the InternalMassDefinition object. */
72 bool setInternalMassDefinition(const InternalMassDefinition& definition);
73
74 /** Sets the definition of this instance. */
75 virtual bool setDefinition(const SpaceLoadDefinition& definition) override;
76
77 bool setMultiplier(double multiplier);
78
79 void resetMultiplier();
80
81 //@}
82 /** @name Other */
83 //@{
84
85 boost::optional<double> surfaceArea() const;
86
87 boost::optional<double> surfaceAreaPerFloorArea() const;
88
89 boost::optional<double> surfaceAreaPerPerson() const;
90
91 /** Returns the construction surface area represented by this instance, assuming floorArea (m^2)
92 * and numPeople. */
93 double getSurfaceArea(double floorArea, double numPeople) const;
94
95 /** Returns the m^2/m^2 of construction surface area per floor area represented by this
96 * instance, assuming floorArea (m^2) and numPeople. */
97 double getSurfaceAreaPerFloorArea(double floorArea, double numPeople) const;
98
99 /** Returns the m^2/person of construction surface area represented by this instance, assuming
100 * floorArea (m^2) and numPeople. */
101 double getSurfaceAreaPerPerson(double floorArea, double numPeople) const;
102
103 virtual ModelObject clone(Model model) const override;
104
105 //@}
106 protected:
107 // index of the space name
108 virtual int spaceIndex() const override;
109
110 // index of the definition name
111 virtual int definitionIndex() const override;
112
113 private:
114 − REGISTER_LOGGER("openstudio.model.InternalMass");
115
116 boost::optional<ModelObject> internalMassDefinitionAsModelObject() const;
117
118 bool setInternalMassDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject);
119 };
120
121 } // namespace detail
122
123 } // namespace model
124 } // namespace openstudio
125
126 #endif // MODEL_INTERNALMASS_IMPL_HPP
127