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/OutputDiagnostics.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_OUTPUTDIAGNOSTICS_HPP
7 #define MODEL_OUTPUTDIAGNOSTICS_HPP
8
9 #include <model/ModelAPI.hpp>
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class OutputDiagnostics_Impl;
18
19 } // namespace detail
20
21 /** OutputDiagnostics is a ModelObject that wraps the OpenStudio IDD object 'OS:Output:Diagnostics'. */
22 class MODEL_API OutputDiagnostics : public ModelObject
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 22 virtual ~OutputDiagnostics() override = default;
29 // Default the copy and move operators because the virtual dtor is explicit
30 3 OutputDiagnostics(const OutputDiagnostics& other) = default;
31 4 OutputDiagnostics(OutputDiagnostics&& other) = default;
32 ✗ OutputDiagnostics& operator=(const OutputDiagnostics&) = default;
33 ✗ OutputDiagnostics& operator=(OutputDiagnostics&&) = default;
34
35 //@}
36
37 static IddObjectType iddObjectType();
38
39 static std::vector<std::string> keyValues();
40 static std::vector<std::string> validKeyValues();
41
42 /** @name Getters */
43 //@{
44
45 std::vector<std::string> keys() const;
46
47 //@}
48 /** @name Setters */
49 //@{
50
51 // Return false if key isn't valid. If is already present, not added twice (ensures unicity) and logs an info in that case too
52 bool addKey(const std::string& key);
53
54 // Calls clearKeys, then for each k, addKey(k)
55 bool setKeys(const std::vector<std::string>& keys);
56
57 // Just a convenience function to add 'DisplayExtraWarnings' as a key since it's so common
58 bool enableDisplayExtraWarnings();
59
60 // Clears out every key
61 void clearKeys();
62
63 //@}
64 /** @name Other */
65 //@{
66
67 //@}
68 protected:
69 /// @cond
70 using ImplType = detail::OutputDiagnostics_Impl;
71
72 explicit OutputDiagnostics(std::shared_ptr<detail::OutputDiagnostics_Impl> impl);
73
74 friend class detail::OutputDiagnostics_Impl;
75 friend class Model;
76 friend class IdfObject;
77 friend class openstudio::detail::IdfObject_Impl;
78 explicit OutputDiagnostics(Model& model);
79
80 /// @endcond
81 private:
82 REGISTER_LOGGER("openstudio.model.OutputDiagnostics");
83 };
84
85 /** \relates OutputDiagnostics*/
86 using OptionalOutputDiagnostics = boost::optional<OutputDiagnostics>;
87
88 /** \relates OutputDiagnostics*/
89 using OutputDiagnosticsVector = std::vector<OutputDiagnostics>;
90
91 } // namespace model
92 } // namespace openstudio
93
94 #endif // MODEL_OUTPUTDIAGNOSTICS_HPP
95