GCC Code Coverage Report


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

src/model/PlantComponentTemperatureSource.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_PLANTCOMPONENTTEMPERATURESOURCE_HPP
7 #define MODEL_PLANTCOMPONENTTEMPERATURESOURCE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17
18 namespace detail {
19
20 class PlantComponentTemperatureSource_Impl;
21
22 } // namespace detail
23
24 /** PlantComponentTemperatureSource is a StraightComponent that wraps the OpenStudio IDD object 'OS:PlantComponent:TemperatureSource'. */
25 class MODEL_API PlantComponentTemperatureSource : public StraightComponent
26 {
27 public:
28 /** @name Constructors and Destructors */
29 //@{
30
31 explicit PlantComponentTemperatureSource(const Model& model);
32
33 1 virtual ~PlantComponentTemperatureSource() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 ✗ PlantComponentTemperatureSource(const PlantComponentTemperatureSource& other) = default;
36 ✗ PlantComponentTemperatureSource(PlantComponentTemperatureSource&& other) = default;
37 ✗ PlantComponentTemperatureSource& operator=(const PlantComponentTemperatureSource&) = default;
38 ✗ PlantComponentTemperatureSource& operator=(PlantComponentTemperatureSource&&) = default;
39
40 //@}
41
42 static IddObjectType iddObjectType();
43
44 static std::vector<std::string> temperatureSpecificationTypeValues();
45
46 /** @name Getters */
47 //@{
48
49 boost::optional<double> designVolumeFlowRate() const;
50
51 bool isDesignVolumeFlowRateAutosized() const;
52
53 std::string temperatureSpecificationType() const;
54
55 boost::optional<double> sourceTemperature() const;
56
57 boost::optional<Schedule> sourceTemperatureSchedule() const;
58
59 //@}
60 /** @name Setters */
61 //@{
62
63 bool setDesignVolumeFlowRate(double designVolumeFlowRate);
64
65 void autosizeDesignVolumeFlowRate();
66
67 bool setTemperatureSpecificationType(const std::string& temperatureSpecificationType);
68
69 bool setSourceTemperature(double sourceTemperature);
70
71 void resetSourceTemperature();
72
73 bool setSourceTemperatureSchedule(Schedule& schedule);
74
75 void resetSourceTemperatureSchedule();
76
77 //@}
78 /** @name Other */
79 //@{
80
81 boost::optional<double> autosizedDesignVolumeFlowRate() const;
82
83 //@}
84 protected:
85 /// @cond
86 using ImplType = detail::PlantComponentTemperatureSource_Impl;
87
88 explicit PlantComponentTemperatureSource(std::shared_ptr<detail::PlantComponentTemperatureSource_Impl> impl);
89
90 friend class detail::PlantComponentTemperatureSource_Impl;
91 friend class Model;
92 friend class IdfObject;
93 friend class openstudio::detail::IdfObject_Impl;
94 /// @endcond
95 private:
96 REGISTER_LOGGER("openstudio.model.PlantComponentTemperatureSource");
97 };
98
99 /** \relates PlantComponentTemperatureSource*/
100 using OptionalPlantComponentTemperatureSource = boost::optional<PlantComponentTemperatureSource>;
101
102 /** \relates PlantComponentTemperatureSource*/
103 using PlantComponentTemperatureSourceVector = std::vector<PlantComponentTemperatureSource>;
104
105 } // namespace model
106 } // namespace openstudio
107
108 #endif // MODEL_PLANTCOMPONENTTEMPERATURESOURCE_HPP
109