JsonCpp project page JsonCpp home page

config.h
Go to the documentation of this file.
1 // Copyright 2007-2010 Baptiste Lepilleur
2 // Distributed under MIT license, or public domain if desired and
3 // recognized in your jurisdiction.
4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5 
6 #ifndef JSON_CONFIG_H_INCLUDED
7 # define JSON_CONFIG_H_INCLUDED
8 
10 //# define JSON_IN_CPPTL 1
11 
13 //# define JSON_USE_CPPTL 1
16 //# define JSON_USE_CPPTL_SMALLMAP 1
20 //# define JSON_VALUE_USE_INTERNAL_MAP 1
25 //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
26 
29 # define JSON_USE_EXCEPTION 1
30 
34 // #define JSON_IS_AMALGAMATION
35 
36 
37 # ifdef JSON_IN_CPPTL
38 # include <cpptl/config.h>
39 # ifndef JSON_USE_CPPTL
40 # define JSON_USE_CPPTL 1
41 # endif
42 # endif
43 
44 # ifdef JSON_IN_CPPTL
45 # define JSON_API CPPTL_API
46 # elif defined(JSON_DLL_BUILD)
47 # define JSON_API __declspec(dllexport)
48 # elif defined(JSON_DLL)
49 # define JSON_API __declspec(dllimport)
50 # else
51 # define JSON_API
52 # endif
53 
54 // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
55 // Storages, and 64 bits integer support is disabled.
56 // #define JSON_NO_INT64 1
57 
58 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
59 // Microsoft Visual Studio 6 only support conversion from __int64 to double
60 // (no conversion from unsigned __int64).
61 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
62 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
63 
64 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
65 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
67 #endif
68 
69 #if !defined(JSONCPP_DEPRECATED)
70 # define JSONCPP_DEPRECATED(message)
71 #endif // if !defined(JSONCPP_DEPRECATED)
72 
73 namespace Json {
74  typedef int Int;
75  typedef unsigned int UInt;
76 # if defined(JSON_NO_INT64)
77  typedef int LargestInt;
78  typedef unsigned int LargestUInt;
79 # undef JSON_HAS_INT64
80 # else // if defined(JSON_NO_INT64)
81  // For Microsoft Visual use specific types as long long is not supported
82 # if defined(_MSC_VER) // Microsoft Visual Studio
83  typedef __int64 Int64;
84  typedef unsigned __int64 UInt64;
85 # else // if defined(_MSC_VER) // Other platforms, use long long
86  typedef long long int Int64;
87  typedef unsigned long long int UInt64;
88 # endif // if defined(_MSC_VER)
89  typedef Int64 LargestInt;
90  typedef UInt64 LargestUInt;
91 # define JSON_HAS_INT64
92 # endif // if defined(JSON_NO_INT64)
93 } // end namespace Json
94 
95 
96 #endif // JSON_CONFIG_H_INCLUDED
Int64 LargestInt
Definition: config.h:89
unsigned __int64 UInt64
Definition: config.h:84
UInt64 LargestUInt
Definition: config.h:90
JSON (JavaScript Object Notation).
Definition: config.h:73
unsigned int UInt
Definition: config.h:75
__int64 Int64
Definition: config.h:83
int Int
Definition: config.h:74

SourceForge Logo hosts this site. Send comments to:
Json-cpp Developers