GCC Code Coverage Report


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

src/model/TemperingValve_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_TEMPERINGVALVE_IMPL_HPP
7 #define MODEL_TEMPERINGVALVE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Node;
16
17 namespace detail {
18
19 /** TemperingValve_Impl is a StraightComponent_Impl that is the implementation class for TemperingValve.*/
20 class MODEL_API TemperingValve_Impl : public StraightComponent_Impl
21 {
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 TemperingValve_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 TemperingValve_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
29
30 TemperingValve_Impl(const TemperingValve_Impl& other, Model_Impl* model, bool keepHandle);
31
32 3 virtual ~TemperingValve_Impl() override = default;
33
34 //@}
35 /** @name Virtual Methods */
36 //@{
37
38 virtual const std::vector<std::string>& outputVariableNames() const override;
39
40 virtual IddObjectType iddObjectType() const override;
41
42 virtual ComponentType componentType() const override;
43 virtual std::vector<FuelType> coolingFuelTypes() const override;
44 virtual std::vector<FuelType> heatingFuelTypes() const override;
45 virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override;
46
47 //@}
48 /** @name Getters */
49 //@{
50
51 boost::optional<Node> stream2SourceNode() const;
52
53 boost::optional<Node> temperatureSetpointNode() const;
54
55 boost::optional<Node> pumpOutletNode() const;
56
57 //@}
58 /** @name Setters */
59 //@{
60
61 bool setStream2SourceNode(const boost::optional<Node>& stream2SourceNode);
62
63 void resetStream2SourceNode();
64
65 bool setTemperatureSetpointNode(const boost::optional<Node>& temperatureSetpointNode);
66
67 void resetTemperatureSetpointNode();
68
69 bool setPumpOutletNode(const boost::optional<Node>& pumpOutletNode);
70
71 void resetPumpOutletNode();
72
73 //@}
74 /** @name Other */
75 //@{
76
77 virtual unsigned inletPort() const override;
78
79 virtual unsigned outletPort() const override;
80
81 virtual bool addToNode(Node& node) override;
82
83 // Set pumpOutletNode, temperatureSetpointNode, and stream2SourceNode to reasonable values if they are not set
84 bool setControlNodes();
85
86 //@}
87 protected:
88 private:
89 REGISTER_LOGGER("openstudio.model.TemperingValve");
90
91 // TODO: Check the return types of these methods.
92 // Optional getters for use by methods like children() so can remove() if the constructor fails.
93 // There are other ways for the public versions of these getters to fail--perhaps all required
94 // objects should be returned as boost::optionals
95 boost::optional<Connection> optionalInletNode() const;
96 boost::optional<Connection> optionalOutletNode() const;
97 };
98
99 } // namespace detail
100
101 } // namespace model
102 } // namespace openstudio
103
104 #endif // MODEL_TEMPERINGVALVE_IMPL_HPP
105