GCC Code Coverage Report


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

src/model/ScheduleConstant.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_SCHEDULECONSTANT_HPP
7 #define MODEL_SCHEDULECONSTANT_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Schedule.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16 class ScheduleConstant_Impl;
17 } // namespace detail
18
19 /** ScheduleConstant is a Schedule that wraps the OpenStudio IDD object 'OS:Schedule:Constant'. */
20 class MODEL_API ScheduleConstant : public Schedule
21 {
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 /** Creates new ScheduleConstant in model and sets its value to 0.0. */
27 explicit ScheduleConstant(const Model& model);
28
29 23006 virtual ~ScheduleConstant() override = default;
30 // Default the copy and move operators because the virtual dtor is explicit
31 ✗ ScheduleConstant(const ScheduleConstant& other) = default;
32 7798 ScheduleConstant(ScheduleConstant&& other) = default;
33 ✗ ScheduleConstant& operator=(const ScheduleConstant&) = default;
34 3 ScheduleConstant& operator=(ScheduleConstant&&) = default;
35
36 //@}
37
38 static IddObjectType iddObjectType();
39
40 /** @name Getters */
41 //@{
42
43 double value() const;
44
45 //@}
46 /** @name Setters */
47 //@{
48
49 bool setValue(double value);
50
51 /** Sets this ScheduleConstant's value if scheduleTypeLimits() is set and value can be properly
52 * converted to the 'SI' units so implied. */
53
54 //@}
55 protected:
56 using ImplType = detail::ScheduleConstant_Impl;
57
58 friend class Model;
59 friend class openstudio::IdfObject;
60
61 // constructor
62 explicit ScheduleConstant(std::shared_ptr<detail::ScheduleConstant_Impl> impl);
63
64 private:
65 REGISTER_LOGGER("openstudio.model.ScheduleConstant");
66 };
67
68 /** \relates ScheduleConstant */
69 using OptionalScheduleConstant = boost::optional<ScheduleConstant>;
70
71 /** \relates ScheduleConstant */
72 using ScheduleConstantVector = std::vector<ScheduleConstant>;
73
74 } // namespace model
75 } // namespace openstudio
76
77 #endif // MODEL_SCHEDULECONSTANT_HPP
78