config.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef JSON_CONFIG_H_INCLUDED
  2. # define JSON_CONFIG_H_INCLUDED
  3. /// If defined, indicates that json library is embedded in CppTL library.
  4. //# define JSON_IN_CPPTL 1
  5. /// If defined, indicates that json may leverage CppTL library
  6. //# define JSON_USE_CPPTL 1
  7. /// If defined, indicates that cpptl vector based map should be used instead of std::map
  8. /// as Value container.
  9. //# define JSON_USE_CPPTL_SMALLMAP 1
  10. /// If defined, indicates that Json specific container should be used
  11. /// (hash table & simple deque container with customizable allocator).
  12. /// THIS FEATURE IS STILL EXPERIMENTAL!
  13. //# define JSON_VALUE_USE_INTERNAL_MAP 1
  14. /// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
  15. /// The memory pools allocator used optimization (initializing Value and ValueInternalLink
  16. /// as if it was a POD) that may cause some validation tool to report errors.
  17. /// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
  18. //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
  19. /// If defined, indicates that Json use exception to report invalid type manipulation
  20. /// instead of C assert macro.
  21. # define JSON_USE_EXCEPTION 1
  22. # ifdef JSON_IN_CPPTL
  23. # include <cpptl/config.h>
  24. # ifndef JSON_USE_CPPTL
  25. # define JSON_USE_CPPTL 1
  26. # endif
  27. # endif
  28. # ifdef JSON_IN_CPPTL
  29. # define JSON_API CPPTL_API
  30. # elif defined(JSON_DLL_BUILD)
  31. # define JSON_API __declspec(dllexport)
  32. # elif defined(JSON_DLL)
  33. # define JSON_API __declspec(dllimport)
  34. # else
  35. # define JSON_API
  36. # endif
  37. #endif // JSON_CONFIG_H_INCLUDED