annotate third_party/json/config.h @ 0:add35537fdbb tip

Initial import
author irh <ian.r.hobson@gmail.com>
date Thu, 25 Aug 2011 11:05:55 +0100
parents
children
rev   line source
ian@0 1 // Copyright 2007-2010 Baptiste Lepilleur
ian@0 2 // Distributed under MIT license, or public domain if desired and
ian@0 3 // recognized in your jurisdiction.
ian@0 4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
ian@0 5
ian@0 6 #ifndef JSON_CONFIG_H_INCLUDED
ian@0 7 # define JSON_CONFIG_H_INCLUDED
ian@0 8
ian@0 9 /// If defined, indicates that json library is embedded in CppTL library.
ian@0 10 //# define JSON_IN_CPPTL 1
ian@0 11
ian@0 12 /// If defined, indicates that json may leverage CppTL library
ian@0 13 //# define JSON_USE_CPPTL 1
ian@0 14 /// If defined, indicates that cpptl vector based map should be used instead of std::map
ian@0 15 /// as Value container.
ian@0 16 //# define JSON_USE_CPPTL_SMALLMAP 1
ian@0 17 /// If defined, indicates that Json specific container should be used
ian@0 18 /// (hash table & simple deque container with customizable allocator).
ian@0 19 /// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332
ian@0 20 //# define JSON_VALUE_USE_INTERNAL_MAP 1
ian@0 21 /// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
ian@0 22 /// The memory pools allocator used optimization (initializing Value and ValueInternalLink
ian@0 23 /// as if it was a POD) that may cause some validation tool to report errors.
ian@0 24 /// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
ian@0 25 //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
ian@0 26
ian@0 27 /// If defined, indicates that Json use exception to report invalid type manipulation
ian@0 28 /// instead of C assert macro.
ian@0 29 # define JSON_USE_EXCEPTION 1
ian@0 30
ian@0 31 /// If defined, indicates that the source file is amalgated
ian@0 32 /// to prevent private header inclusion.
ian@0 33 /// Remarks: it is automatically defined in the generated amalgated header.
ian@0 34 // #define JSON_IS_AMALGAMATION
ian@0 35
ian@0 36
ian@0 37 # ifdef JSON_IN_CPPTL
ian@0 38 # include <cpptl/config.h>
ian@0 39 # ifndef JSON_USE_CPPTL
ian@0 40 # define JSON_USE_CPPTL 1
ian@0 41 # endif
ian@0 42 # endif
ian@0 43
ian@0 44 # ifdef JSON_IN_CPPTL
ian@0 45 # define JSON_API CPPTL_API
ian@0 46 # elif defined(JSON_DLL_BUILD)
ian@0 47 # define JSON_API __declspec(dllexport)
ian@0 48 # elif defined(JSON_DLL)
ian@0 49 # define JSON_API __declspec(dllimport)
ian@0 50 # else
ian@0 51 # define JSON_API
ian@0 52 # endif
ian@0 53
ian@0 54 // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
ian@0 55 // Storages, and 64 bits integer support is disabled.
ian@0 56 // #define JSON_NO_INT64 1
ian@0 57
ian@0 58 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
ian@0 59 // Microsoft Visual Studio 6 only support conversion from __int64 to double
ian@0 60 // (no conversion from unsigned __int64).
ian@0 61 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
ian@0 62 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
ian@0 63
ian@0 64 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
ian@0 65 /// Indicates that the following function is deprecated.
ian@0 66 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
ian@0 67 #endif
ian@0 68
ian@0 69 #if !defined(JSONCPP_DEPRECATED)
ian@0 70 # define JSONCPP_DEPRECATED(message)
ian@0 71 #endif // if !defined(JSONCPP_DEPRECATED)
ian@0 72
ian@0 73 namespace Json {
ian@0 74 typedef int Int;
ian@0 75 typedef unsigned int UInt;
ian@0 76 # if defined(JSON_NO_INT64)
ian@0 77 typedef int LargestInt;
ian@0 78 typedef unsigned int LargestUInt;
ian@0 79 # undef JSON_HAS_INT64
ian@0 80 # else // if defined(JSON_NO_INT64)
ian@0 81 // For Microsoft Visual use specific types as long long is not supported
ian@0 82 # if defined(_MSC_VER) // Microsoft Visual Studio
ian@0 83 typedef __int64 Int64;
ian@0 84 typedef unsigned __int64 UInt64;
ian@0 85 # else // if defined(_MSC_VER) // Other platforms, use long long
ian@0 86 typedef long long int Int64;
ian@0 87 typedef unsigned long long int UInt64;
ian@0 88 # endif // if defined(_MSC_VER)
ian@0 89 typedef Int64 LargestInt;
ian@0 90 typedef UInt64 LargestUInt;
ian@0 91 # define JSON_HAS_INT64
ian@0 92 # endif // if defined(JSON_NO_INT64)
ian@0 93 } // end namespace Json
ian@0 94
ian@0 95
ian@0 96 #endif // JSON_CONFIG_H_INCLUDED