GCC Code Coverage Report


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

src/utilities/filetypes/StandardsJSON_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 UTILITIES_FILETYPES_STANDARDSJSON_IMPL_HPP
7 #define UTILITIES_FILETYPES_STANDARDSJSON_IMPL_HPP
8
9 #include "../UtilitiesAPI.hpp"
10
11 #include "RunOptions.hpp"
12
13 #include "../core/Logger.hpp"
14
15 #include <nano/nano_signal_slot.hpp>
16 #include <json/json.h>
17
18 namespace openstudio {
19
20 class StandardsJSON;
21
22 namespace detail {
23
24 class UTILITIES_API StandardsJSON_Impl
25 {
26 public:
27 StandardsJSON_Impl();
28
29 StandardsJSON_Impl(const std::string& s);
30
31 Json::Value toJSON() const;
32
33 std::string string() const;
34
35 boost::optional<Json::Value> getPrimaryKey(const std::string& primaryKey) const;
36
37 /** A crude schema validation, will only check the first entry */
38 bool isValidStandardsJSON() const;
39
40 private:
41 − REGISTER_LOGGER("openstudio.StandardsJSON");
42
43 // Store the entire standards JSON that is passed
44 Json::Value m_standardsRoot;
45 };
46
47 } // namespace detail
48 } // namespace openstudio
49
50 #endif //UTILITIES_FILETYPES_STANDARDSJSON_IMPL_HPP
51