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/CurveRectangularHyperbola2.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_CURVERECTANGULARHYPERBOLA2_HPP
7 #define MODEL_CURVERECTANGULARHYPERBOLA2_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class CurveRectangularHyperbola2_Impl;
18
19 } // namespace detail
20
21 /** CurveRectangularHyperbola2 is a Curve that wraps the OpenStudio IDD object
22 * 'OS:Curve:RectangularHyperbola2'. The functional form is
23 * \f$\displaystyle f(x) = \frac{c_1 \cdot x}{c_2 + x} + c_3 \cdot x\f$ */
24 class MODEL_API CurveRectangularHyperbola2 : public Curve
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 /** Initializes /f$c_1 = c_2 = c_3 = 1.0,\ xmin = 0.0,\ xmax = 1.0/f$ */
31 explicit CurveRectangularHyperbola2(const Model& model);
32
33 37 virtual ~CurveRectangularHyperbola2() override = default;
34 // Default the copy and move operators because the virtual dtor is explicit
35 ✗ CurveRectangularHyperbola2(const CurveRectangularHyperbola2& other) = default;
36 ✗ CurveRectangularHyperbola2(CurveRectangularHyperbola2&& other) = default;
37 ✗ CurveRectangularHyperbola2& operator=(const CurveRectangularHyperbola2&) = default;
38 ✗ CurveRectangularHyperbola2& operator=(CurveRectangularHyperbola2&&) = default;
39
40 //@}
41
42 static IddObjectType iddObjectType();
43
44 static std::vector<std::string> validInputUnitTypeforxValues();
45
46 static std::vector<std::string> validOutputUnitTypeValues();
47
48 /** @name Getters */
49 //@{
50
51 double coefficient1C1() const;
52
53 double coefficient2C2() const;
54
55 double coefficient3C3() const;
56
57 double minimumValueofx() const;
58
59 double maximumValueofx() const;
60
61 boost::optional<double> minimumCurveOutput() const;
62
63 boost::optional<double> maximumCurveOutput() const;
64
65 std::string inputUnitTypeforx() const;
66
67 bool isInputUnitTypeforxDefaulted() const;
68
69 std::string outputUnitType() const;
70
71 bool isOutputUnitTypeDefaulted() const;
72
73 //@}
74 /** @name Setters */
75 //@{
76
77 bool setCoefficient1C1(double coefficient1C1);
78
79 bool setCoefficient2C2(double coefficient2C2);
80
81 bool setCoefficient3C3(double coefficient3C3);
82
83 bool setMinimumValueofx(double minimumValueofx);
84
85 bool setMaximumValueofx(double maximumValueofx);
86
87 bool setMinimumCurveOutput(double minimumCurveOutput);
88
89 void resetMinimumCurveOutput();
90
91 bool setMaximumCurveOutput(double maximumCurveOutput);
92
93 void resetMaximumCurveOutput();
94
95 bool setInputUnitTypeforx(const std::string& inputUnitTypeforx);
96
97 void resetInputUnitTypeforx();
98
99 bool setOutputUnitType(const std::string& outputUnitType);
100
101 void resetOutputUnitType();
102
103 //@}
104 /** @name Other */
105 //@{
106
107 //@}
108 protected:
109 /// @cond
110 using ImplType = detail::CurveRectangularHyperbola2_Impl;
111
112 explicit CurveRectangularHyperbola2(std::shared_ptr<detail::CurveRectangularHyperbola2_Impl> impl);
113
114 friend class detail::CurveRectangularHyperbola2_Impl;
115 friend class Model;
116 friend class IdfObject;
117 friend class openstudio::detail::IdfObject_Impl;
118
119 /// @endcond
120 private:
121 REGISTER_LOGGER("openstudio.model.CurveRectangularHyperbola2");
122 };
123
124 /** \relates CurveRectangularHyperbola2*/
125 using OptionalCurveRectangularHyperbola2 = boost::optional<CurveRectangularHyperbola2>;
126
127 /** \relates CurveRectangularHyperbola2*/
128 using CurveRectangularHyperbola2Vector = std::vector<CurveRectangularHyperbola2>;
129
130 } // namespace model
131 } // namespace openstudio
132
133 #endif // MODEL_CURVERECTANGULARHYPERBOLA2_HPP
134