GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 60.0% 3 / 0 / 5
Functions: 60.0% 3 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/ControllerMechanicalVentilation.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_CONTROLLERMECHANICALVENTILATION_HPP
7 #define MODEL_CONTROLLERMECHANICALVENTILATION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class ControllerOutdoorAir;
17
18 namespace detail {
19
20 class ControllerMechanicalVentilation_Impl;
21
22 } // namespace detail
23
24 /** ControllerMechanicalVentilation is a ModelObject that wraps the OpenStudio IDD object 'OS:Controller:MechanicalVentilation'. */
25 class MODEL_API ControllerMechanicalVentilation : public ModelObject
26 {
27 public:
28 explicit ControllerMechanicalVentilation(const Model& model);
29
30 1290 virtual ~ControllerMechanicalVentilation() override = default;
31 // Default the copy and move operators because the virtual dtor is explicit
32 245 ControllerMechanicalVentilation(const ControllerMechanicalVentilation& other) = default;
33 490 ControllerMechanicalVentilation(ControllerMechanicalVentilation&& other) = default;
34 ✗ ControllerMechanicalVentilation& operator=(const ControllerMechanicalVentilation&) = default;
35 ✗ ControllerMechanicalVentilation& operator=(ControllerMechanicalVentilation&&) = default;
36
37 static IddObjectType iddObjectType();
38
39 static std::vector<std::string> systemOutdoorAirMethodValues();
40
41 Schedule availabilitySchedule() const;
42
43 bool setAvailabilitySchedule(Schedule& schedule);
44
45 bool demandControlledVentilation() const;
46
47 bool isDemandControlledVentilationDefaulted() const;
48
49 bool setDemandControlledVentilation(bool demandControlledVentilation);
50
51 void setDemandControlledVentilationNoFail(bool demandControlledVentilation);
52
53 void resetDemandControlledVentilation();
54
55 std::string systemOutdoorAirMethod() const;
56
57 bool isSystemOutdoorAirMethodDefaulted() const;
58
59 bool setSystemOutdoorAirMethod(const std::string& systemOutdoorAirMethod);
60
61 void resetSystemOutdoorAirMethod();
62
63 //@}
64 /** @name Other */
65 //@{
66
67 ControllerOutdoorAir controllerOutdoorAir() const;
68
69 // Convenience method to check whether it links to zones that have DesignSpecificationOutdoorAir(s) assigned
70 bool hasZonesWithDesignSpecificationOutdoorAir() const;
71
72 //@}
73
74 protected:
75 /// @cond
76 using ImplType = detail::ControllerMechanicalVentilation_Impl;
77
78 explicit ControllerMechanicalVentilation(std::shared_ptr<detail::ControllerMechanicalVentilation_Impl> impl);
79
80 friend class detail::ControllerMechanicalVentilation_Impl;
81 friend class Model;
82 friend class IdfObject;
83 friend class openstudio::detail::IdfObject_Impl;
84 /// @endcond
85 private:
86 REGISTER_LOGGER("openstudio.model.ControllerMechanicalVentilation");
87 };
88
89 /** \relates ControllerMechanicalVentilation*/
90 using OptionalControllerMechanicalVentilation = boost::optional<ControllerMechanicalVentilation>;
91
92 /** \relates ControllerMechanicalVentilation*/
93 using ControllerMechanicalVentilationVector = std::vector<ControllerMechanicalVentilation>;
94
95 } // namespace model
96 } // namespace openstudio
97
98 #endif // MODEL_CONTROLLERMECHANICALVENTILATION_HPP
99