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 namespace std {
40 
41 template class NX_KIT_API std::shared_ptr<nx::kit::detail::json11::JsonValue>;
42 
43 } // namespace std
44 
45 //-------------------------------------------------------------------------------------------------
46 // Include the original Json11 header and make its classes available in namespace nx::kit.
47 
48 namespace nx {
49 namespace kit {
50 
51 namespace detail {
52 
53 #include "../../json11/json11.hpp" //< Original Json11 header.
54 
55 } // namespace detail
56 
57 using namespace detail::json11; //< Allow to refer to the Json11 class as nx::kit::Json.
58 
59 } // namespace kit
60 } // namespace nx
Definition: json.h:39
Definition: json11.cpp:32
Definition: apple_utils.h:6