GCC Code Coverage Report


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

src/model/Construction.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_CONSTRUCTION_HPP
7 #define MODEL_CONSTRUCTION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "LayeredConstruction.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16 class Construction_Impl;
17 }
18
19 /** Construction is a LayeredConstruction that wraps the EnergyPlus IDD object 'Construction'.
20 * A Construction consists of a number of material layers, each of which should belong to the
21 * same base class: OpaqueMaterial, FenestrationMaterial, or ModelPartitionMaterial. In addition
22 * the layers must satisfy some restrictions in order to form a valid EnergyPlus construction,
23 * see the documentation for LayeredConstruction. */
24 class MODEL_API Construction : public LayeredConstruction
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 explicit Construction(const Model& model);
31
32 explicit Construction(const std::vector<OpaqueMaterial>& opaqueMaterials);
33
34 explicit Construction(const std::vector<FenestrationMaterial>& fenestrationMaterials);
35
36 explicit Construction(const ModelPartitionMaterial& modelPartitionMaterial);
37
38 5667 virtual ~Construction() override = default;
39 // Default the copy and move operators because the virtual dtor is explicit
40 202 Construction(const Construction& other) = default;
41 1169 Construction(Construction&& other) = default;
42 3 Construction& operator=(const Construction&) = default;
43 2 Construction& operator=(Construction&&) = default;
44
45 //@}
46 /** @name Static Methods */
47 //@{
48
49 static IddObjectType iddObjectType();
50
51 //@}
52
53 /** Searches the model for a layered construction with layers which are the reverse of this one. Returns that construction
54 * if found, creates one if not. */
55 Construction reverseConstruction() const;
56
57 protected:
58 /// @cond
59 using ImplType = detail::Construction_Impl;
60
61 friend class Model;
62 friend class openstudio::IdfObject;
63 friend class openstudio::detail::IdfObject_Impl;
64 friend class detail::Construction_Impl;
65
66 explicit Construction(std::shared_ptr<detail::Construction_Impl> impl);
67
68 /// @endcond
69 private:
70 − REGISTER_LOGGER("openstudio.model.Construction");
71 };
72
73 /** \relates Construction */
74 using OptionalConstruction = boost::optional<Construction>;
75
76 /** \relates Construction */
77 using ConstructionVector = std::vector<Construction>;
78
79 } // namespace model
80 } // namespace openstudio
81
82 #endif // MODEL_CONSTRUCTION_HPP
83