GCC Code Coverage Report


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

src/model/EnergyManagementSystemSensor.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_ENERGYMANAGEMENTSYSTEMSENSOR_HPP
7 #define MODEL_ENERGYMANAGEMENTSYSTEMSENSOR_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11 #include "OutputVariable.hpp"
12 #include "OutputVariable_Impl.hpp"
13 #include "OutputMeter.hpp"
14 #include "OutputMeter_Impl.hpp"
15
16 namespace openstudio {
17
18 namespace energyplus {
19 class ReverseTranslator;
20 }
21
22 namespace model {
23
24 class OutputVariable;
25 class OutputMeter;
26
27 namespace detail {
28
29 class EnergyManagementSystemSensor_Impl;
30
31 } // namespace detail
32
33 /** EnergyManagementSystemSensor is a ModelObject that wraps the OpenStudio IDD object 'OS:EnergyManagementSystem:Sensor'. */
34 class MODEL_API EnergyManagementSystemSensor : public ModelObject
35 {
36 public:
37 /** @name Constructors and Destructors */
38 //@{
39
40 explicit EnergyManagementSystemSensor(const Model& model, const OutputVariable& outvar);
41
42 explicit EnergyManagementSystemSensor(const Model& model, const OutputMeter& outvar);
43
44 explicit EnergyManagementSystemSensor(const Model& model, const std::string& outputVariableOrMeterName);
45
46 103 virtual ~EnergyManagementSystemSensor() override = default;
47 // Default the copy and move operators because the virtual dtor is explicit
48 1 EnergyManagementSystemSensor(const EnergyManagementSystemSensor& other) = default;
49 23 EnergyManagementSystemSensor(EnergyManagementSystemSensor&& other) = default;
50 ✗ EnergyManagementSystemSensor& operator=(const EnergyManagementSystemSensor&) = default;
51 ✗ EnergyManagementSystemSensor& operator=(EnergyManagementSystemSensor&&) = default;
52
53 //@}
54
55 static IddObjectType iddObjectType();
56
57 /** @name Getters */
58 //@{
59
60 std::string keyName() const;
61
62 boost::optional<OutputVariable> outputVariable() const;
63 boost::optional<OutputMeter> outputMeter() const;
64 std::string outputVariableOrMeterName() const;
65
66 //@}
67 /** @name Setters */
68 //@{
69
70 bool setKeyName(const std::string& keyName);
71
72 bool setOutputVariable(const OutputVariable& outputVariable);
73 bool setOutputMeter(const OutputMeter& outputMeter);
74 bool setOutputVariableOrMeterName(const std::string& outputVariableOrMeterName);
75 //@}
76 /** @name Other */
77 //@{
78
79 //@}
80 protected:
81 /// @cond
82 using ImplType = detail::EnergyManagementSystemSensor_Impl;
83
84 explicit EnergyManagementSystemSensor(std::shared_ptr<detail::EnergyManagementSystemSensor_Impl> impl);
85
86 friend class detail::EnergyManagementSystemSensor_Impl;
87 friend class Model;
88 friend class IdfObject;
89 friend class openstudio::detail::IdfObject_Impl;
90 friend class energyplus::ReverseTranslator;
91 /// @endcond
92 private:
93 − REGISTER_LOGGER("openstudio.model.EnergyManagementSystemSensor");
94 explicit EnergyManagementSystemSensor(const Model& model);
95 };
96
97 /** \relates EnergyManagementSystemSensor*/
98 using OptionalEnergyManagementSystemSensor = boost::optional<EnergyManagementSystemSensor>;
99
100 /** \relates EnergyManagementSystemSensor*/
101 using EnergyManagementSystemSensorVector = std::vector<EnergyManagementSystemSensor>;
102
103 } // namespace model
104 } // namespace openstudio
105
106 #endif // MODEL_ENERGYMANAGEMENTSYSTEMSENSOR_HPP
107