nx_metadata_sdk 1.0 Metadata SDK

json.h
Go to the documentation of this file.
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
13 // Includes from json11.hpp are duplicated here to put them in the global namespace.
14 #include <string>
15 #include <vector>
16 #include <map>
17 #include <memory>
18 #include <initializer_list>
19
20 //-------------------------------------------------------------------------------------------------
21 // Make the Json11 classes exported from nx_kit dynamic lib.
22
23 namespace nx {
24 namespace kit {
25 namespace detail { //< Prohibits to refer to Json11 classes as nx::kit::json11::*.
26 namespace json11 { //< Such namespace is used in the original Json11 source.
27
28 class NX_KIT_API Json;
29 class NX_KIT_API JsonValue; //< Considered private in Json11, but is exported for debugging.
30
31 } // namespace json11
32 } // namespace detail
33 } // namespace kit
34 } // namespace nx
35
36 //-------------------------------------------------------------------------------------------------
37 // Explicitly instantiate and export a type used in class Json - suppresses an MSVC warning.
38
39 #if defined(_MSC_VER)
40 namespace std {
41
42 template class NX_KIT_API std::shared_ptr<nx::kit::detail::json11::JsonValue>;
43
44 } // namespace std
45 #endif
46
47 //-------------------------------------------------------------------------------------------------
48 // Include the original Json11 header and make its classes available in namespace nx::kit.
49
50 namespace nx {
51 namespace kit {
52
53 namespace detail {
54
55 #include "../../json11/json11.hpp" //< Original Json11 header.
56
57 } // namespace detail
58
59 using namespace detail::json11; //< Allow to refer to the Json11 class as nx::kit::Json.
60
61 } // namespace kit
62 } // namespace nx
std
Definition: to_string.h:51
json11
Definition: json11.cpp:32
nx
Definition: apple_utils.h:6