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/SetpointManagerScheduled_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_SETPOINTMANAGERSCHEDULED_IMPL_HPP
7 #define MODEL_SETPOINTMANAGERSCHEDULED_IMPL_HPP
8
9 #include "SetpointManager_Impl.hpp"
10
11 namespace openstudio {
12
13 namespace model {
14
15 class Schedule;
16
17 namespace detail {
18
19 class MODEL_API SetpointManagerScheduled_Impl : public SetpointManager_Impl
20 {
21
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 SetpointManagerScheduled_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 SetpointManagerScheduled_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
29
30 SetpointManagerScheduled_Impl(const SetpointManagerScheduled_Impl& other, Model_Impl* model, bool keepHandles);
31
32 118 virtual ~SetpointManagerScheduled_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 std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
43
44 // virtual bool addToNode(Node & node) override;
45
46 virtual bool isAllowedOnPlantLoop() const override;
47
48 //@}
49 /** @name Getters */
50 //@{
51
52 virtual boost::optional<Node> setpointNode() const override;
53
54 virtual std::string controlVariable() const override;
55
56 Schedule schedule() const;
57
58 bool hasSchedule() const;
59
60 //@}
61 /** @name Setters */
62 //@{
63
64 virtual bool setControlVariable(const std::string& controlVariable) override;
65
66 bool setSchedule(Schedule& schedule);
67
68 //@}
69 /** @name Other */
70 //@{
71
72 /** Sets control variable and schedule simultaneously. Use in the case that the
73 * control variable change implies a change in schedule units. */
74 bool setControlVariableAndSchedule(const std::string& controlVariable, Schedule& schedule);
75
76 //@}
77 private:
78 virtual bool setSetpointNode(const Node& node) override;
79
80 virtual void resetSetpointNode() override;
81
82 // converts control variable to the schedule's display name
83 std::string scheduleDisplayName() const;
84
85 // as above, but used to check candidate control variables
86 std::string scheduleDisplayName(const std::string& candidateControlVariable) const;
87
88 std::vector<std::string> controlVariableValues() const;
89
90 boost::optional<ModelObject> scheduleAsModelObject() const;
91
92 bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
93 };
94
95 } // namespace detail
96
97 } // namespace model
98 } // namespace openstudio
99
100 #endif // MODEL_SETPOINTMANAGERSCHEDULED_IMPL_HPP
101