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/TableIndependentVariable_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_TABLEINDEPENDENTVARIABLE_IMPL_HPP
7 #define MODEL_TABLEINDEPENDENTVARIABLE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ResourceObject_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class TableLookup;
16
17 namespace detail {
18
19 /** TableIndependentVariable_Impl is a ResourceObject_Impl that is the implementation class for TableIndependentVariable.*/
20 class MODEL_API TableIndependentVariable_Impl : public ResourceObject_Impl
21 {
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 TableIndependentVariable_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 TableIndependentVariable_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
29
30 TableIndependentVariable_Impl(const TableIndependentVariable_Impl& other, Model_Impl* model, bool keepHandle);
31
32 104 virtual ~TableIndependentVariable_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 //@}
43 /** @name Getters */
44 //@{
45
46 std::string interpolationMethod() const;
47
48 std::string extrapolationMethod() const;
49
50 boost::optional<double> minimumValue() const;
51
52 boost::optional<double> maximumValue() const;
53
54 boost::optional<double> normalizationReferenceValue() const;
55
56 std::string unitType() const;
57
58 //@}
59 /** @name Setters */
60 //@{
61
62 bool setInterpolationMethod(const std::string& interpolationMethod);
63
64 bool setExtrapolationMethod(const std::string& extrapolationMethod);
65
66 bool setMinimumValue(double minimumValue);
67 void resetMinimumValue();
68
69 bool setMaximumValue(double maximumValue);
70 void resetMaximumValue();
71
72 bool setNormalizationReferenceValue(double normalizationReferenceValue);
73 void resetNormalizationReferenceValue();
74
75 bool setUnitType(const std::string& unitType);
76
77 //@}
78 /** @name Other */
79 //@{
80
81 std::vector<TableLookup> tableLookups() const;
82
83 bool addValue(double value);
84 bool removeValue(unsigned groupIndex);
85 void removeAllValues();
86 std::vector<double> values() const;
87 bool setValues(const std::vector<double>& values);
88 unsigned numberofValues() const;
89
90 //@}
91 protected:
92 private:
93 REGISTER_LOGGER("openstudio.model.TableIndependentVariable");
94 };
95
96 } // namespace detail
97
98 } // namespace model
99 } // namespace openstudio
100
101 #endif // MODEL_TABLEINDEPENDENTVARIABLE_IMPL_HPP
102