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/AirflowNetworkFan_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_AIRFLOWNETWORKFAN_IMPL_HPP
7 #define MODEL_AIRFLOWNETWORKFAN_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "AirflowNetworkComponent_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class StraightComponent;
16 class FanConstantVolume;
17 class FanVariableVolume;
18 class FanOnOff;
19 class FanSystemModel;
20
21 namespace detail {
22
23 /** AirflowNetworkFan_Impl is a ModelObject_Impl that is the implementation class for AirflowNetworkFan.*/
24 class MODEL_API AirflowNetworkFan_Impl : public AirflowNetworkComponent_Impl
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 AirflowNetworkFan_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
31
32 AirflowNetworkFan_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
33
34 AirflowNetworkFan_Impl(const AirflowNetworkFan_Impl& other, Model_Impl* model, bool keepHandle);
35
36 2 virtual ~AirflowNetworkFan_Impl() override = default;
37
38 //@}
39 /** @name Virtual Methods */
40 //@{
41
42 virtual const std::vector<std::string>& outputVariableNames() const override;
43
44 virtual IddObjectType iddObjectType() const override;
45
46 virtual boost::optional<ModelObject> componentModelObject() const override;
47
48 //@}
49 /** @name Getters */
50 //@{
51
52 /*
53 template <typename T> boost::optional<T> fan() const
54 {
55 return getObject<ModelObject>().getModelObjectTarget<T>(OS_AirflowNetworkFanFields::FanName);
56 }
57 */
58
59 boost::optional<FanConstantVolume> fanConstantVolume() const;
60 boost::optional<FanVariableVolume> fanVariableVolume() const;
61 boost::optional<FanOnOff> fanOnOff() const;
62 boost::optional<FanSystemModel> fanSystemModel() const;
63
64 //@}
65 /** @name Setters */
66 //@{
67
68 /*
69 template <typename T> bool setFan(const typename std::enable_if<
70 std::is_same<FanConstantVolume, T>::value ||
71 std::is_same<FanVariableVolume, T>::value ||
72 std::is_same<FanOnOff, T>::value, T>::type
73 &fan)
74 {
75 return setPointer(OS_AirflowNetworkFanFields::FanName, fan.handle());
76 }
77 */
78
79 void resetFan();
80
81 //@}
82 /** @name Other */
83 //@{
84
85 //@}
86 protected:
87 private:
88 REGISTER_LOGGER("openstudio.model.AirflowNetworkFan");
89
90 // TODO: Check the return types of these methods.
91 // Optional getters for use by methods like children() so can remove() if the constructor fails.
92 // There are other ways for the public versions of these getters to fail--perhaps all required
93 // objects should be returned as boost::optionals
94 //boost::optional<FansCVandOnOff> optionalFan() const;
95 };
96
97 } // namespace detail
98
99 } // namespace model
100 } // namespace openstudio
101
102 #endif // MODEL_AIRFLOWNETWORKFAN_IMPL_HPP
103