GCC Code Coverage Report


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

src/model/EnergyManagementSystemProgram.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_ENERGYMANAGEMENTSYSTEMPROGRAM_HPP
7 #define MODEL_ENERGYMANAGEMENTSYSTEMPROGRAM_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class EnergyManagementSystemMeteredOutputVariable;
16
17 namespace detail {
18
19 class EnergyManagementSystemProgram_Impl;
20
21 } // namespace detail
22
23 /** EnergyManagementSystemProgram is a ModelObject that wraps the OpenStudio IDD object 'OS:EnergyManagementSystem:Program'. */
24 class MODEL_API EnergyManagementSystemProgram : public ModelObject
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 explicit EnergyManagementSystemProgram(const Model& model);
31
32 545 virtual ~EnergyManagementSystemProgram() override = default;
33 // Default the copy and move operators because the virtual dtor is explicit
34 70 EnergyManagementSystemProgram(const EnergyManagementSystemProgram& other) = default;
35 211 EnergyManagementSystemProgram(EnergyManagementSystemProgram&& other) = default;
36 ✗ EnergyManagementSystemProgram& operator=(const EnergyManagementSystemProgram&) = default;
37 11 EnergyManagementSystemProgram& operator=(EnergyManagementSystemProgram&&) = default;
38
39 //@}
40
41 static IddObjectType iddObjectType();
42
43 /** @name Getters */
44 //@{
45
46 std::string body() const;
47
48 std::vector<std::string> lines() const;
49
50 std::vector<ModelObject> referencedObjects() const;
51
52 std::vector<std::string> invalidReferencedObjects() const;
53
54 //@}
55 /** @name Setters */
56 //@{
57
58 bool setBody(const std::string& body);
59
60 bool resetBody();
61
62 bool addLine(const std::string& body);
63
64 bool setLines(const std::vector<std::string>& body);
65
66 //@}
67 /** @name Other */
68 //@{
69
70 // Convenience method to return all EnergyManagementSystemMeteredOutputVariable that refer to this Program
71 std::vector<EnergyManagementSystemMeteredOutputVariable> energyManagementSystemMeteredOutputVariables() const;
72
73 //@}
74 protected:
75 /// @cond
76 using ImplType = detail::EnergyManagementSystemProgram_Impl;
77
78 explicit EnergyManagementSystemProgram(std::shared_ptr<detail::EnergyManagementSystemProgram_Impl> impl);
79
80 friend class detail::EnergyManagementSystemProgram_Impl;
81 friend class Model;
82 friend class IdfObject;
83 friend class openstudio::detail::IdfObject_Impl;
84 /// @endcond
85 private:
86 REGISTER_LOGGER("openstudio.model.EnergyManagementSystemProgram");
87 };
88
89 /** \relates EnergyManagementSystemProgram*/
90 using OptionalEnergyManagementSystemProgram = boost::optional<EnergyManagementSystemProgram>;
91
92 /** \relates EnergyManagementSystemProgram*/
93 using EnergyManagementSystemProgramVector = std::vector<EnergyManagementSystemProgram>;
94
95 } // namespace model
96 } // namespace openstudio
97
98 #endif // MODEL_ENERGYMANAGEMENTSYSTEMPROGRAM_HPP
99