GCC Code Coverage Report


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

src/model/ExternalInterfaceVariable.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_EXTERNALINTERFACEVARIABLE_HPP
7 #define MODEL_EXTERNALINTERFACEVARIABLE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 namespace detail {
17
18 class ExternalInterfaceVariable_Impl;
19
20 } // namespace detail
21
22 /** ExternalInterfaceVariable is a ModelObject that wraps the OpenStudio IDD object 'OS:ExternalInterface:Variable'. */
23 class MODEL_API ExternalInterfaceVariable : public ModelObject
24 {
25 public:
26 /** @name Constructors and Destructors */
27 //@{
28
29 explicit ExternalInterfaceVariable(const Model& model, const std::string& variableName, double initialValue);
30
31 3 virtual ~ExternalInterfaceVariable() override = default;
32 // Default the copy and move operators because the virtual dtor is explicit
33 ✗ ExternalInterfaceVariable(const ExternalInterfaceVariable& other) = default;
34 ✗ ExternalInterfaceVariable(ExternalInterfaceVariable&& other) = default;
35 ✗ ExternalInterfaceVariable& operator=(const ExternalInterfaceVariable&) = default;
36 ✗ ExternalInterfaceVariable& operator=(ExternalInterfaceVariable&&) = default;
37
38 //@}
39
40 static IddObjectType iddObjectType();
41
42 /** @name Getters */
43 //@{
44
45 double initialValue() const;
46
47 bool exportToBCVTB() const;
48
49 bool isExportToBCVTBDefaulted() const;
50
51 //@}
52 /** @name Setters */
53 //@{
54
55 bool setInitialValue(double initialValue);
56
57 bool setExportToBCVTB(bool exportToBCVTB);
58
59 void resetExportToBCVTB();
60
61 //@}
62 /** @name Other */
63 //@{
64
65 //@}
66 protected:
67 /// @cond
68 using ImplType = detail::ExternalInterfaceVariable_Impl;
69
70 explicit ExternalInterfaceVariable(std::shared_ptr<detail::ExternalInterfaceVariable_Impl> impl);
71
72 friend class detail::ExternalInterfaceVariable_Impl;
73 friend class Model;
74 friend class IdfObject;
75 friend class openstudio::detail::IdfObject_Impl;
76 /// @endcond
77 private:
78 − REGISTER_LOGGER("openstudio.model.ExternalInterfaceVariable");
79 };
80
81 /** \relates ExternalInterfaceVariable*/
82 using OptionalExternalInterfaceVariable = boost::optional<ExternalInterfaceVariable>;
83
84 /** \relates ExternalInterfaceVariable*/
85 using ExternalInterfaceVariableVector = std::vector<ExternalInterfaceVariable>;
86
87 } // namespace model
88 } // namespace openstudio
89
90 #endif // MODEL_EXTERNALINTERFACEVARIABLE_HPP
91