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/OutputJSON.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_OUTPUTJSON_HPP
7 #define MODEL_OUTPUTJSON_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 OutputJSON_Impl;
18
19 } // namespace detail
20
21 /** OutputJSON is a ModelObject that wraps the OpenStudio IDD object 'OS:Output:JSON'. */
22 class MODEL_API OutputJSON : public ModelObject
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 62 virtual ~OutputJSON() override = default;
29 // Default the copy and move operators because the virtual dtor is explicit
30 13 OutputJSON(const OutputJSON& other) = default;
31 17 OutputJSON(OutputJSON&& other) = default;
32 ✗ OutputJSON& operator=(const OutputJSON&) = default;
33 ✗ OutputJSON& operator=(OutputJSON&&) = default;
34
35 //@}
36
37 static IddObjectType iddObjectType();
38
39 static std::vector<std::string> optionTypeValues();
40
41 /** @name Getters */
42 //@{
43
44 std::string optionType() const;
45
46 bool outputJSON() const;
47
48 bool outputCBOR() const;
49
50 bool outputMessagePack() const;
51
52 //@}
53 /** @name Setters */
54 //@{
55
56 bool setOptionType(const std::string& optionType);
57
58 bool setOutputJSON(bool outputJSON);
59
60 bool setOutputCBOR(bool outputCBOR);
61
62 bool setOutputMessagePack(bool outputMessagePack);
63
64 //@}
65 /** @name Other */
66 //@{
67
68 //@}
69 protected:
70 /// @cond
71 using ImplType = detail::OutputJSON_Impl;
72
73 explicit OutputJSON(std::shared_ptr<detail::OutputJSON_Impl> impl);
74
75 friend class detail::OutputJSON_Impl;
76 friend class Model;
77 friend class IdfObject;
78 friend class openstudio::detail::IdfObject_Impl;
79 explicit OutputJSON(Model& model);
80
81 /// @endcond
82 private:
83 REGISTER_LOGGER("openstudio.model.OutputJSON");
84 };
85
86 /** \relates OutputJSON*/
87 using OptionalOutputJSON = boost::optional<OutputJSON>;
88
89 /** \relates OutputJSON*/
90 using OutputJSONVector = std::vector<OutputJSON>;
91
92 } // namespace model
93 } // namespace openstudio
94
95 #endif // MODEL_OUTPUTJSON_HPP
96