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/ExteriorLoadDefinition.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_EXTERIORLOADDEFINITION_HPP
7 #define MODEL_EXTERIORLOADDEFINITION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ResourceObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class ExteriorLoadInstance;
16
17 namespace detail {
18 class ExteriorLoadDefinition_Impl;
19 }
20
21 /** ExteriorLoadDefinition is an abstract class derived from ResourceObject. \link ExteriorLoadDefinition
22 * ExteriorLoadDefinitions \endlink describe internal loads in a generic way that can be used by
23 * multiple \link ExteriorLoadInstance ExteriorLoadInstances \endlink. */
24 class MODEL_API ExteriorLoadDefinition : public ResourceObject
25 {
26 public:
27 137 virtual ~ExteriorLoadDefinition() override = default;
28 // Default the copy and move operators because the virtual dtor is explicit
29 13 ExteriorLoadDefinition(const ExteriorLoadDefinition& other) = default;
30 47 ExteriorLoadDefinition(ExteriorLoadDefinition&& other) = default;
31 ✗ ExteriorLoadDefinition& operator=(const ExteriorLoadDefinition&) = default;
32 ✗ ExteriorLoadDefinition& operator=(ExteriorLoadDefinition&&) = default;
33
34 /** Returns all instances (ExteriorLoad) of this definition. */
35 std::vector<ExteriorLoadInstance> instances() const;
36
37 /** Returns the number of instances of this exterior load definition.
38 ExteriorLoad multipliers are included in the result **/
39 int quantity() const;
40
41 protected:
42 /** @name Constructors and Destructors */
43 //@{
44
45 /// Constructs a new ExteriorLoadDefinition object in the model.
46 ExteriorLoadDefinition(IddObjectType type, const Model& model);
47
48 //@}
49
50 /// @cond
51
52 using ImplType = detail::ExteriorLoadDefinition_Impl;
53
54 friend class Model;
55 friend class openstudio::IdfObject;
56 friend class detail::ExteriorLoadDefinition_Impl;
57
58 explicit ExteriorLoadDefinition(std::shared_ptr<detail::ExteriorLoadDefinition_Impl> impl);
59
60 private:
61 REGISTER_LOGGER("openstudio.model.ExteriorLoadDefinition");
62
63 /// @endcond
64 };
65
66 /** \relates ExteriorLoadDefinition */
67 using OptionalExteriorLoadDefinition = boost::optional<ExteriorLoadDefinition>;
68
69 /** \relates ExteriorLoadDefinition */
70 using ExteriorLoadDefinitionVector = std::vector<ExteriorLoadDefinition>;
71
72 } // namespace model
73 } // namespace openstudio
74
75 #endif // MODEL_EXTERIORLOADDEFINITION_HPP
76