GCC Code Coverage Report


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

src/model/CurveLinear_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_CURVELINEAR_IMPL_HPP
7 #define MODEL_CURVELINEAR_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "Curve_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 /** CurveLinear_Impl is a Curve_Impl that is the implementation class for CurveLinear.*/
18 class MODEL_API CurveLinear_Impl : public Curve_Impl
19 {
20
21 public:
22 /** @name Constructors and Destructors */
23 //@{
24
25 CurveLinear_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
26
27 CurveLinear_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
28
29 CurveLinear_Impl(const CurveLinear_Impl& other, Model_Impl* model, bool keepHandle);
30
31 234 virtual ~CurveLinear_Impl() override = default;
32
33 //@}
34 /** @name Virtual Methods */
35 //@{
36
37 virtual const std::vector<std::string>& outputVariableNames() const override;
38
39 virtual IddObjectType iddObjectType() const override;
40
41 virtual int numVariables() const override;
42
43 virtual double evaluate(const std::vector<double>& independentVariables) const override;
44
45 //@}
46 /** @name Getters */
47 //@{
48
49 double coefficient1Constant() const;
50
51 double coefficient2x() const;
52
53 double minimumValueofx() const;
54
55 double maximumValueofx() const;
56
57 boost::optional<double> minimumCurveOutput() const;
58
59 boost::optional<double> maximumCurveOutput() const;
60
61 std::string inputUnitTypeforX() const;
62
63 bool isInputUnitTypeforXDefaulted() const;
64
65 std::string outputUnitType() const;
66
67 bool isOutputUnitTypeDefaulted() const;
68
69 //@}
70 /** @name Setters */
71 //@{
72
73 bool setCoefficient1Constant(double coefficient1Constant);
74
75 bool setCoefficient2x(double coefficient2x);
76
77 bool setMinimumValueofx(double minimumValueofx);
78
79 bool setMaximumValueofx(double maximumValueofx);
80
81 bool setMinimumCurveOutput(boost::optional<double> minimumCurveOutput);
82
83 void resetMinimumCurveOutput();
84
85 bool setMaximumCurveOutput(boost::optional<double> maximumCurveOutput);
86
87 void resetMaximumCurveOutput();
88
89 bool setInputUnitTypeforX(const std::string& inputUnitTypeforX);
90
91 void resetInputUnitTypeforX();
92
93 bool setOutputUnitType(const std::string& outputUnitType);
94
95 void resetOutputUnitType();
96
97 //@}
98 /** @name Other */
99 //@{
100
101 //@}
102 protected:
103 private:
104 − REGISTER_LOGGER("openstudio.model.CurveLinear");
105 };
106
107 } // namespace detail
108
109 } // namespace model
110 } // namespace openstudio
111
112 #endif // MODEL_CURVELINEAR_IMPL_HPP
113