JsonCpp project page JsonCpp home page

config.h

Go to the documentation of this file.
00001 // Copyright 2007-2010 Baptiste Lepilleur
00002 // Distributed under MIT license, or public domain if desired and
00003 // recognized in your jurisdiction.
00004 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
00005 
00006 #ifndef JSON_CONFIG_H_INCLUDED
00007 # define JSON_CONFIG_H_INCLUDED
00008 
00010 //# define JSON_IN_CPPTL 1
00011 
00013 //#  define JSON_USE_CPPTL 1
00016 //#  define JSON_USE_CPPTL_SMALLMAP 1
00020 //#  define JSON_VALUE_USE_INTERNAL_MAP 1
00025 //#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
00026 
00029 # define JSON_USE_EXCEPTION 1
00030 
00034 // #define JSON_IS_AMALGAMATION
00035 
00036 
00037 # ifdef JSON_IN_CPPTL
00038 #  include <cpptl/config.h>
00039 #  ifndef JSON_USE_CPPTL
00040 #   define JSON_USE_CPPTL 1
00041 #  endif
00042 # endif
00043 
00044 # ifdef JSON_IN_CPPTL
00045 #  define JSON_API CPPTL_API
00046 # elif defined(JSON_DLL_BUILD)
00047 #  define JSON_API __declspec(dllexport)
00048 # elif defined(JSON_DLL)
00049 #  define JSON_API __declspec(dllimport)
00050 # else
00051 #  define JSON_API
00052 # endif
00053 
00054 // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer
00055 // Storages, and 64 bits integer support is disabled.
00056 // #define JSON_NO_INT64 1
00057 
00058 #if defined(_MSC_VER)  &&  _MSC_VER <= 1200 // MSVC 6
00059 // Microsoft Visual Studio 6 only support conversion from __int64 to double
00060 // (no conversion from unsigned __int64).
00061 #define JSON_USE_INT64_DOUBLE_CONVERSION 1
00062 #endif // if defined(_MSC_VER)  &&  _MSC_VER < 1200 // MSVC 6
00063 
00064 #if defined(_MSC_VER)  &&  _MSC_VER >= 1500 // MSVC 2008
00066 # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
00067 #endif
00068 
00069 #if !defined(JSONCPP_DEPRECATED)
00070 # define JSONCPP_DEPRECATED(message)
00071 #endif // if !defined(JSONCPP_DEPRECATED)
00072 
00073 namespace Json {
00074    typedef int Int;
00075    typedef unsigned int UInt;
00076 # if defined(JSON_NO_INT64)
00077    typedef int LargestInt;
00078    typedef unsigned int LargestUInt;
00079 #  undef JSON_HAS_INT64
00080 # else // if defined(JSON_NO_INT64)
00081    // For Microsoft Visual use specific types as long long is not supported
00082 #  if defined(_MSC_VER) // Microsoft Visual Studio
00083    typedef __int64 Int64;
00084    typedef unsigned __int64 UInt64;
00085 #  else // if defined(_MSC_VER) // Other platforms, use long long
00086    typedef long long int Int64;
00087    typedef unsigned long long int UInt64;
00088 #  endif // if defined(_MSC_VER)
00089    typedef Int64 LargestInt;
00090    typedef UInt64 LargestUInt;
00091 #  define JSON_HAS_INT64
00092 # endif // if defined(JSON_NO_INT64)
00093 } // end namespace Json
00094 
00095 
00096 #endif // JSON_CONFIG_H_INCLUDED

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