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/CurveQuadraticLinear.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_CURVEQUADRATICLINEAR_HPP
7 #define MODEL_CURVEQUADRATICLINEAR_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class CurveQuadraticLinear_Impl;
18
19 } // namespace detail
20
21 /** CurveQuadraticLinear is a Curve that wraps the OpenStudio IDD object
22 * 'OS:Curve:QuadraticLinear'. The functional form is
23 * \f$f(x) = c_1 + c_2 \cdot x + c_3 \cdot x^2 + (c_4 + c_5 \cdot x + c_6 \cdot x^2) \cdot y\f$ */
24 class MODEL_API CurveQuadraticLinear : public Curve
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 /** Initializes \f$c_1 = c_2 = c_3 = c_4 = c_5 = 0.0,\ c_6 = 1.0,\ x\ \text{and}\ y\ \text{within}\ [0.0,1.0]\f$ */
31 explicit CurveQuadraticLinear(const Model& model);
32
33 9 virtual ~CurveQuadraticLinear() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 ✗ CurveQuadraticLinear(const CurveQuadraticLinear& other) = default;
36 ✗ CurveQuadraticLinear(CurveQuadraticLinear&& other) = default;
37 ✗ CurveQuadraticLinear& operator=(const CurveQuadraticLinear&) = default;
38 ✗ CurveQuadraticLinear& operator=(CurveQuadraticLinear&&) = default;
39
40 //@}
41
42 static IddObjectType iddObjectType();
43
44 static std::vector<std::string> validInputUnitTypeforXValues();
45
46 static std::vector<std::string> validInputUnitTypeforYValues();
47
48 static std::vector<std::string> validOutputUnitTypeValues();
49
50 /** @name Getters */
51 //@{
52
53 double coefficient1Constant() const;
54
55 double coefficient2x() const;
56
57 double coefficient3xPOW2() const;
58
59 double coefficient4y() const;
60
61 double coefficient5xTIMESY() const;
62
63 double coefficient6xPOW2TIMESY() const;
64
65 double minimumValueofx() const;
66
67 double maximumValueofx() const;
68
69 double minimumValueofy() const;
70
71 double maximumValueofy() const;
72
73 boost::optional<double> minimumCurveOutput() const;
74
75 boost::optional<double> maximumCurveOutput() const;
76
77 std::string inputUnitTypeforX() const;
78
79 bool isInputUnitTypeforXDefaulted() const;
80
81 std::string inputUnitTypeforY() const;
82
83 bool isInputUnitTypeforYDefaulted() const;
84
85 std::string outputUnitType() const;
86
87 bool isOutputUnitTypeDefaulted() const;
88
89 //@}
90 /** @name Setters */
91 //@{
92
93 bool setCoefficient1Constant(double coefficient1Constant);
94
95 bool setCoefficient2x(double coefficient2x);
96
97 bool setCoefficient3xPOW2(double coefficient3xPOW2);
98
99 bool setCoefficient4y(double coefficient4y);
100
101 bool setCoefficient5xTIMESY(double coefficient5xTIMESY);
102
103 bool setCoefficient6xPOW2TIMESY(double coefficient6xPOW2TIMESY);
104
105 bool setMinimumValueofx(double minimumValueofx);
106
107 bool setMaximumValueofx(double maximumValueofx);
108
109 bool setMinimumValueofy(double minimumValueofy);
110
111 bool setMaximumValueofy(double maximumValueofy);
112
113 bool setMinimumCurveOutput(double minimumCurveOutput);
114
115 void resetMinimumCurveOutput();
116
117 bool setMaximumCurveOutput(double maximumCurveOutput);
118
119 void resetMaximumCurveOutput();
120
121 bool setInputUnitTypeforX(const std::string& inputUnitTypeforX);
122
123 void resetInputUnitTypeforX();
124
125 bool setInputUnitTypeforY(const std::string& inputUnitTypeforY);
126
127 void resetInputUnitTypeforY();
128
129 bool setOutputUnitType(const std::string& outputUnitType);
130
131 void resetOutputUnitType();
132
133 //@}
134 /** @name Other */
135 //@{
136
137 //@}
138 protected:
139 /// @cond
140 using ImplType = detail::CurveQuadraticLinear_Impl;
141
142 explicit CurveQuadraticLinear(std::shared_ptr<detail::CurveQuadraticLinear_Impl> impl);
143
144 friend class detail::CurveQuadraticLinear_Impl;
145 friend class Model;
146 friend class IdfObject;
147 friend class openstudio::detail::IdfObject_Impl;
148
149 /// @endcond
150 private:
151 REGISTER_LOGGER("openstudio.model.CurveQuadraticLinear");
152 };
153
154 /** \relates CurveQuadraticLinear*/
155 using OptionalCurveQuadraticLinear = boost::optional<CurveQuadraticLinear>;
156
157 /** \relates CurveQuadraticLinear*/
158 using CurveQuadraticLinearVector = std::vector<CurveQuadraticLinear>;
159
160 } // namespace model
161 } // namespace openstudio
162
163 #endif // MODEL_CURVEQUADRATICLINEAR_HPP
164