json-forwards.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
  2. /// It is intended to be used with #include "json/json-forwards.h"
  3. /// This header provides forward declaration for all JsonCpp types.
  4. // //////////////////////////////////////////////////////////////////////
  5. // Beginning of content of file: LICENSE
  6. // //////////////////////////////////////////////////////////////////////
  7. /*
  8. The JsonCpp library's source code, including accompanying documentation,
  9. tests and demonstration applications, are licensed under the following
  10. conditions...
  11. The author (Baptiste Lepilleur) explicitly disclaims copyright in all
  12. jurisdictions which recognize such a disclaimer. In such jurisdictions,
  13. this software is released into the Public Domain.
  14. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
  15. 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
  16. released under the terms of the MIT License (see below).
  17. In jurisdictions which recognize Public Domain property, the user of this
  18. software may choose to accept it either as 1) Public Domain, 2) under the
  19. conditions of the MIT License (see below), or 3) under the terms of dual
  20. Public Domain/MIT License conditions described here, as they choose.
  21. The MIT License is about as close to Public Domain as a license can get, and is
  22. described in clear, concise terms at:
  23. http://en.wikipedia.org/wiki/MIT_License
  24. The full text of the MIT License follows:
  25. ========================================================================
  26. Copyright (c) 2007-2010 Baptiste Lepilleur
  27. Permission is hereby granted, free of charge, to any person
  28. obtaining a copy of this software and associated documentation
  29. files (the "Software"), to deal in the Software without
  30. restriction, including without limitation the rights to use, copy,
  31. modify, merge, publish, distribute, sublicense, and/or sell copies
  32. of the Software, and to permit persons to whom the Software is
  33. furnished to do so, subject to the following conditions:
  34. The above copyright notice and this permission notice shall be
  35. included in all copies or substantial portions of the Software.
  36. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  38. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  39. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  40. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  41. ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  42. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  43. SOFTWARE.
  44. ========================================================================
  45. (END LICENSE TEXT)
  46. The MIT license is compatible with both the GPL and commercial
  47. software, affording one all of the rights of Public Domain with the
  48. minor nuisance of being required to keep the above copyright notice
  49. and license text in the source code. Note also that by accepting the
  50. Public Domain "license" you can re-license your copy using whatever
  51. license you like.
  52. */
  53. // //////////////////////////////////////////////////////////////////////
  54. // End of content of file: LICENSE
  55. // //////////////////////////////////////////////////////////////////////
  56. #ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
  57. # define JSON_FORWARD_AMALGATED_H_INCLUDED
  58. /// If defined, indicates that the source file is amalgated
  59. /// to prevent private header inclusion.
  60. #define JSON_IS_AMALGAMATION
  61. // //////////////////////////////////////////////////////////////////////
  62. // Beginning of content of file: include/json/config.h
  63. // //////////////////////////////////////////////////////////////////////
  64. // Copyright 2007-2010 Baptiste Lepilleur
  65. // Distributed under MIT license, or public domain if desired and
  66. // recognized in your jurisdiction.
  67. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
  68. #ifndef JSON_CONFIG_H_INCLUDED
  69. #define JSON_CONFIG_H_INCLUDED
  70. /// If defined, indicates that json library is embedded in CppTL library.
  71. //# define JSON_IN_CPPTL 1
  72. /// If defined, indicates that json may leverage CppTL library
  73. //# define JSON_USE_CPPTL 1
  74. /// If defined, indicates that cpptl vector based map should be used instead of
  75. /// std::map
  76. /// as Value container.
  77. //# define JSON_USE_CPPTL_SMALLMAP 1
  78. // If non-zero, the library uses exceptions to report bad input instead of C
  79. // assertion macros. The default is to use exceptions.
  80. #ifndef JSON_USE_EXCEPTION
  81. #define JSON_USE_EXCEPTION 1
  82. #endif
  83. /// If defined, indicates that the source file is amalgated
  84. /// to prevent private header inclusion.
  85. /// Remarks: it is automatically defined in the generated amalgated header.
  86. // #define JSON_IS_AMALGAMATION
  87. #ifdef JSON_IN_CPPTL
  88. #include <cpptl/config.h>
  89. #ifndef JSON_USE_CPPTL
  90. #define JSON_USE_CPPTL 1
  91. #endif
  92. #endif
  93. #ifdef JSON_IN_CPPTL
  94. #define JSON_API CPPTL_API
  95. #elif defined(JSON_DLL_BUILD)
  96. #if defined(_MSC_VER)
  97. #define JSON_API __declspec(dllexport)
  98. #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
  99. #endif // if defined(_MSC_VER)
  100. #elif defined(JSON_DLL)
  101. #if defined(_MSC_VER)
  102. #define JSON_API __declspec(dllimport)
  103. #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
  104. #endif // if defined(_MSC_VER)
  105. #endif // ifdef JSON_IN_CPPTL
  106. #if !defined(JSON_API)
  107. #define JSON_API
  108. #endif
  109. #if !defined(JSON_HAS_UNIQUE_PTR)
  110. #if __cplusplus >= 201103L
  111. #define JSON_HAS_UNIQUE_PTR (1)
  112. #elif _MSC_VER >= 1600
  113. #define JSON_HAS_UNIQUE_PTR (1)
  114. #else
  115. #define JSON_HAS_UNIQUE_PTR (0)
  116. #endif
  117. #endif
  118. // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
  119. // integer
  120. // Storages, and 64 bits integer support is disabled.
  121. // #define JSON_NO_INT64 1
  122. #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
  123. // Microsoft Visual Studio 6 only support conversion from __int64 to double
  124. // (no conversion from unsigned __int64).
  125. #define JSON_USE_INT64_DOUBLE_CONVERSION 1
  126. // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
  127. // characters in the debug information)
  128. // All projects I've ever seen with VS6 were using this globally (not bothering
  129. // with pragma push/pop).
  130. #pragma warning(disable : 4786)
  131. #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
  132. #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
  133. /// Indicates that the following function is deprecated.
  134. #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
  135. #elif defined(__clang__) && defined(__has_feature)
  136. #if __has_feature(attribute_deprecated_with_message)
  137. #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
  138. #endif
  139. #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
  140. #define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
  141. #elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
  142. #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
  143. #endif
  144. #if !defined(JSONCPP_DEPRECATED)
  145. #define JSONCPP_DEPRECATED(message)
  146. #endif // if !defined(JSONCPP_DEPRECATED)
  147. namespace Json {
  148. typedef int Int;
  149. typedef unsigned int UInt;
  150. #if defined(JSON_NO_INT64)
  151. typedef int LargestInt;
  152. typedef unsigned int LargestUInt;
  153. #undef JSON_HAS_INT64
  154. #else // if defined(JSON_NO_INT64)
  155. // For Microsoft Visual use specific types as long long is not supported
  156. #if defined(_MSC_VER) // Microsoft Visual Studio
  157. typedef __int64 Int64;
  158. typedef unsigned __int64 UInt64;
  159. #else // if defined(_MSC_VER) // Other platforms, use long long
  160. typedef long long int Int64;
  161. typedef unsigned long long int UInt64;
  162. #endif // if defined(_MSC_VER)
  163. typedef Int64 LargestInt;
  164. typedef UInt64 LargestUInt;
  165. #define JSON_HAS_INT64
  166. #endif // if defined(JSON_NO_INT64)
  167. } // end namespace Json
  168. #endif // JSON_CONFIG_H_INCLUDED
  169. // //////////////////////////////////////////////////////////////////////
  170. // End of content of file: include/json/config.h
  171. // //////////////////////////////////////////////////////////////////////
  172. // //////////////////////////////////////////////////////////////////////
  173. // Beginning of content of file: include/json/forwards.h
  174. // //////////////////////////////////////////////////////////////////////
  175. // Copyright 2007-2010 Baptiste Lepilleur
  176. // Distributed under MIT license, or public domain if desired and
  177. // recognized in your jurisdiction.
  178. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
  179. #ifndef JSON_FORWARDS_H_INCLUDED
  180. #define JSON_FORWARDS_H_INCLUDED
  181. #if !defined(JSON_IS_AMALGAMATION)
  182. #include "config.h"
  183. #endif // if !defined(JSON_IS_AMALGAMATION)
  184. namespace Json {
  185. // writer.h
  186. class FastWriter;
  187. class StyledWriter;
  188. // reader.h
  189. class Reader;
  190. // features.h
  191. class Features;
  192. // value.h
  193. typedef unsigned int ArrayIndex;
  194. class StaticString;
  195. class Path;
  196. class PathArgument;
  197. class Value;
  198. class ValueIteratorBase;
  199. class ValueIterator;
  200. class ValueConstIterator;
  201. } // namespace Json
  202. #endif // JSON_FORWARDS_H_INCLUDED
  203. // //////////////////////////////////////////////////////////////////////
  204. // End of content of file: include/json/forwards.h
  205. // //////////////////////////////////////////////////////////////////////
  206. #endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED