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/ExteriorLoadInstance_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_EXTERIORLOADINSTANCE_IMPL_HPP
7 #define MODEL_EXTERIORLOADINSTANCE_IMPL_HPP
8
9 #include "ModelObject_Impl.hpp"
10
11 namespace openstudio {
12 namespace model {
13
14 // forward declaration
15 class ExteriorLoadDefinition;
16 class ExteriorLoadInstance;
17
18 namespace detail {
19
20 class MODEL_API ExteriorLoadInstance_Impl : public ModelObject_Impl
21 {
22
23 public:
24 // Construct completely new object.
25 ExteriorLoadInstance_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
26
27 // Construct from existing workspace object (typically when Model is being constructed
28 // from Workspace).
29 ExteriorLoadInstance_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 // Clone copy constructor.
32 ExteriorLoadInstance_Impl(const ExteriorLoadInstance_Impl& other, Model_Impl* model, bool keepHandle);
33
34 71 virtual ~ExteriorLoadInstance_Impl() override = default;
35
36 /** Returns the definition of this instance. */
37 ExteriorLoadDefinition definition() const;
38
39 /** Sets the definition of this instance. */
40 virtual bool setDefinition(const ExteriorLoadDefinition& definition) = 0;
41
42 /** Ensures that no other instances share this instances definition. */
43 void makeUnique();
44
45 virtual double multiplier() const = 0;
46
47 virtual bool isMultiplierDefaulted() const = 0;
48
49 int quantity() const;
50
51 protected:
52 friend class openstudio::model::ExteriorLoadInstance;
53
54 // index of the definition name
55 virtual int definitionIndex() const = 0;
56
57 private:
58 − REGISTER_LOGGER("openstudio.model.ExteriorLoadInstance");
59
60 boost::optional<ModelObject> definitionAsModelObject() const;
61
62 bool setDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject);
63 };
64
65 } // namespace detail
66
67 } // namespace model
68 } // namespace openstudio
69
70 #endif // MODEL_EXTERIORLOADINSTANCE_IMPL_HPP
71