rj_schema 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (613) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -615
  3. data/ext/rj_schema/rapidjson/CHANGELOG.md +0 -158
  4. data/ext/rj_schema/rapidjson/CMakeLists.txt +0 -221
  5. data/ext/rj_schema/rapidjson/CMakeModules/FindGTestSrc.cmake +0 -30
  6. data/ext/rj_schema/rapidjson/RapidJSON.pc.in +0 -7
  7. data/ext/rj_schema/rapidjson/RapidJSONConfig.cmake.in +0 -15
  8. data/ext/rj_schema/rapidjson/RapidJSONConfigVersion.cmake.in +0 -10
  9. data/ext/rj_schema/rapidjson/appveyor.yml +0 -41
  10. data/ext/rj_schema/rapidjson/bin/data/glossary.json +0 -22
  11. data/ext/rj_schema/rapidjson/bin/data/menu.json +0 -27
  12. data/ext/rj_schema/rapidjson/bin/data/readme.txt +0 -1
  13. data/ext/rj_schema/rapidjson/bin/data/sample.json +0 -3315
  14. data/ext/rj_schema/rapidjson/bin/data/webapp.json +0 -88
  15. data/ext/rj_schema/rapidjson/bin/data/widget.json +0 -26
  16. data/ext/rj_schema/rapidjson/bin/draft-04/schema +0 -150
  17. data/ext/rj_schema/rapidjson/bin/encodings/utf16be.json +0 -0
  18. data/ext/rj_schema/rapidjson/bin/encodings/utf16bebom.json +0 -0
  19. data/ext/rj_schema/rapidjson/bin/encodings/utf16le.json +0 -0
  20. data/ext/rj_schema/rapidjson/bin/encodings/utf16lebom.json +0 -0
  21. data/ext/rj_schema/rapidjson/bin/encodings/utf32be.json +0 -0
  22. data/ext/rj_schema/rapidjson/bin/encodings/utf32bebom.json +0 -0
  23. data/ext/rj_schema/rapidjson/bin/encodings/utf32le.json +0 -0
  24. data/ext/rj_schema/rapidjson/bin/encodings/utf32lebom.json +0 -0
  25. data/ext/rj_schema/rapidjson/bin/encodings/utf8.json +0 -7
  26. data/ext/rj_schema/rapidjson/bin/encodings/utf8bom.json +0 -7
  27. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail1.json +0 -1
  28. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail10.json +0 -1
  29. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail11.json +0 -1
  30. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail12.json +0 -1
  31. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail13.json +0 -1
  32. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail14.json +0 -1
  33. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail15.json +0 -1
  34. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail16.json +0 -1
  35. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail17.json +0 -1
  36. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail18.json +0 -1
  37. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail19.json +0 -1
  38. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail2.json +0 -1
  39. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail20.json +0 -1
  40. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail21.json +0 -1
  41. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail22.json +0 -1
  42. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail23.json +0 -1
  43. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail24.json +0 -1
  44. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail25.json +0 -1
  45. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail26.json +0 -1
  46. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail27.json +0 -2
  47. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail28.json +0 -2
  48. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail29.json +0 -1
  49. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail3.json +0 -1
  50. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail30.json +0 -1
  51. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail31.json +0 -1
  52. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail32.json +0 -1
  53. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail33.json +0 -1
  54. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail4.json +0 -1
  55. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail5.json +0 -1
  56. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail6.json +0 -1
  57. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail7.json +0 -1
  58. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail8.json +0 -1
  59. data/ext/rj_schema/rapidjson/bin/jsonchecker/fail9.json +0 -1
  60. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass1.json +0 -58
  61. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass2.json +0 -1
  62. data/ext/rj_schema/rapidjson/bin/jsonchecker/pass3.json +0 -6
  63. data/ext/rj_schema/rapidjson/bin/jsonchecker/readme.txt +0 -3
  64. data/ext/rj_schema/rapidjson/bin/jsonschema/LICENSE +0 -19
  65. data/ext/rj_schema/rapidjson/bin/jsonschema/README.md +0 -148
  66. data/ext/rj_schema/rapidjson/bin/jsonschema/bin/jsonschema_suite +0 -283
  67. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/folder/folderInteger.json +0 -3
  68. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/integer.json +0 -3
  69. data/ext/rj_schema/rapidjson/bin/jsonschema/remotes/subSchemas.json +0 -8
  70. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalItems.json +0 -82
  71. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/additionalProperties.json +0 -88
  72. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/default.json +0 -49
  73. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/dependencies.json +0 -108
  74. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/disallow.json +0 -80
  75. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/divisibleBy.json +0 -60
  76. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json +0 -71
  77. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/extends.json +0 -94
  78. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/items.json +0 -46
  79. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxItems.json +0 -28
  80. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maxLength.json +0 -33
  81. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/maximum.json +0 -42
  82. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minItems.json +0 -28
  83. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minLength.json +0 -33
  84. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/minimum.json +0 -42
  85. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/bignum.json +0 -107
  86. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/format.json +0 -222
  87. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/jsregex.json +0 -18
  88. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/optional/zeroTerminatedFloats.json +0 -15
  89. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/pattern.json +0 -34
  90. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/patternProperties.json +0 -110
  91. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/properties.json +0 -92
  92. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/ref.json +0 -159
  93. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/refRemote.json +0 -74
  94. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/required.json +0 -53
  95. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/type.json +0 -474
  96. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/uniqueItems.json +0 -79
  97. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalItems.json +0 -82
  98. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/additionalProperties.json +0 -88
  99. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/allOf.json +0 -112
  100. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/anyOf.json +0 -68
  101. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/default.json +0 -49
  102. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/definitions.json +0 -32
  103. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/dependencies.json +0 -113
  104. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json +0 -72
  105. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/items.json +0 -46
  106. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxItems.json +0 -28
  107. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxLength.json +0 -33
  108. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maxProperties.json +0 -28
  109. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/maximum.json +0 -42
  110. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minItems.json +0 -28
  111. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minLength.json +0 -33
  112. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minProperties.json +0 -28
  113. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/minimum.json +0 -42
  114. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/multipleOf.json +0 -60
  115. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/not.json +0 -96
  116. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/oneOf.json +0 -68
  117. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/bignum.json +0 -107
  118. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/format.json +0 -148
  119. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/optional/zeroTerminatedFloats.json +0 -15
  120. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/pattern.json +0 -34
  121. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/patternProperties.json +0 -110
  122. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/properties.json +0 -92
  123. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/ref.json +0 -159
  124. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/refRemote.json +0 -74
  125. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/required.json +0 -39
  126. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/type.json +0 -330
  127. data/ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/uniqueItems.json +0 -79
  128. data/ext/rj_schema/rapidjson/bin/jsonschema/tox.ini +0 -8
  129. data/ext/rj_schema/rapidjson/bin/types/booleans.json +0 -102
  130. data/ext/rj_schema/rapidjson/bin/types/floats.json +0 -102
  131. data/ext/rj_schema/rapidjson/bin/types/guids.json +0 -102
  132. data/ext/rj_schema/rapidjson/bin/types/integers.json +0 -102
  133. data/ext/rj_schema/rapidjson/bin/types/mixed.json +0 -592
  134. data/ext/rj_schema/rapidjson/bin/types/nulls.json +0 -102
  135. data/ext/rj_schema/rapidjson/bin/types/paragraphs.json +0 -102
  136. data/ext/rj_schema/rapidjson/bin/types/readme.txt +0 -1
  137. data/ext/rj_schema/rapidjson/contrib/natvis/LICENSE +0 -45
  138. data/ext/rj_schema/rapidjson/contrib/natvis/README.md +0 -7
  139. data/ext/rj_schema/rapidjson/contrib/natvis/rapidjson.natvis +0 -38
  140. data/ext/rj_schema/rapidjson/doc/CMakeLists.txt +0 -27
  141. data/ext/rj_schema/rapidjson/doc/Doxyfile.in +0 -2369
  142. data/ext/rj_schema/rapidjson/doc/Doxyfile.zh-cn.in +0 -2369
  143. data/ext/rj_schema/rapidjson/doc/diagram/architecture.dot +0 -50
  144. data/ext/rj_schema/rapidjson/doc/diagram/architecture.png +0 -0
  145. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.dot +0 -65
  146. data/ext/rj_schema/rapidjson/doc/diagram/insituparsing.png +0 -0
  147. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.dot +0 -62
  148. data/ext/rj_schema/rapidjson/doc/diagram/iterative-parser-states-diagram.png +0 -0
  149. data/ext/rj_schema/rapidjson/doc/diagram/makefile +0 -8
  150. data/ext/rj_schema/rapidjson/doc/diagram/move1.dot +0 -47
  151. data/ext/rj_schema/rapidjson/doc/diagram/move1.png +0 -0
  152. data/ext/rj_schema/rapidjson/doc/diagram/move2.dot +0 -62
  153. data/ext/rj_schema/rapidjson/doc/diagram/move2.png +0 -0
  154. data/ext/rj_schema/rapidjson/doc/diagram/move3.dot +0 -60
  155. data/ext/rj_schema/rapidjson/doc/diagram/move3.png +0 -0
  156. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.dot +0 -56
  157. data/ext/rj_schema/rapidjson/doc/diagram/normalparsing.png +0 -0
  158. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.dot +0 -54
  159. data/ext/rj_schema/rapidjson/doc/diagram/simpledom.png +0 -0
  160. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.dot +0 -58
  161. data/ext/rj_schema/rapidjson/doc/diagram/tutorial.png +0 -0
  162. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.dot +0 -73
  163. data/ext/rj_schema/rapidjson/doc/diagram/utilityclass.png +0 -0
  164. data/ext/rj_schema/rapidjson/doc/dom.md +0 -280
  165. data/ext/rj_schema/rapidjson/doc/dom.zh-cn.md +0 -284
  166. data/ext/rj_schema/rapidjson/doc/encoding.md +0 -146
  167. data/ext/rj_schema/rapidjson/doc/encoding.zh-cn.md +0 -152
  168. data/ext/rj_schema/rapidjson/doc/faq.md +0 -289
  169. data/ext/rj_schema/rapidjson/doc/faq.zh-cn.md +0 -290
  170. data/ext/rj_schema/rapidjson/doc/features.md +0 -104
  171. data/ext/rj_schema/rapidjson/doc/features.zh-cn.md +0 -103
  172. data/ext/rj_schema/rapidjson/doc/internals.md +0 -368
  173. data/ext/rj_schema/rapidjson/doc/internals.zh-cn.md +0 -363
  174. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.png +0 -0
  175. data/ext/rj_schema/rapidjson/doc/logo/rapidjson.svg +0 -119
  176. data/ext/rj_schema/rapidjson/doc/misc/DoxygenLayout.xml +0 -194
  177. data/ext/rj_schema/rapidjson/doc/misc/doxygenextra.css +0 -274
  178. data/ext/rj_schema/rapidjson/doc/misc/footer.html +0 -11
  179. data/ext/rj_schema/rapidjson/doc/misc/header.html +0 -24
  180. data/ext/rj_schema/rapidjson/doc/npm.md +0 -31
  181. data/ext/rj_schema/rapidjson/doc/performance.md +0 -26
  182. data/ext/rj_schema/rapidjson/doc/performance.zh-cn.md +0 -26
  183. data/ext/rj_schema/rapidjson/doc/pointer.md +0 -234
  184. data/ext/rj_schema/rapidjson/doc/pointer.zh-cn.md +0 -234
  185. data/ext/rj_schema/rapidjson/doc/sax.md +0 -509
  186. data/ext/rj_schema/rapidjson/doc/sax.zh-cn.md +0 -487
  187. data/ext/rj_schema/rapidjson/doc/schema.md +0 -505
  188. data/ext/rj_schema/rapidjson/doc/schema.zh-cn.md +0 -237
  189. data/ext/rj_schema/rapidjson/doc/stream.md +0 -429
  190. data/ext/rj_schema/rapidjson/doc/stream.zh-cn.md +0 -429
  191. data/ext/rj_schema/rapidjson/doc/tutorial.md +0 -536
  192. data/ext/rj_schema/rapidjson/doc/tutorial.zh-cn.md +0 -534
  193. data/ext/rj_schema/rapidjson/docker/debian/Dockerfile +0 -8
  194. data/ext/rj_schema/rapidjson/example/CMakeLists.txt +0 -45
  195. data/ext/rj_schema/rapidjson/example/archiver/archiver.cpp +0 -292
  196. data/ext/rj_schema/rapidjson/example/archiver/archiver.h +0 -145
  197. data/ext/rj_schema/rapidjson/example/archiver/archivertest.cpp +0 -287
  198. data/ext/rj_schema/rapidjson/example/capitalize/capitalize.cpp +0 -67
  199. data/ext/rj_schema/rapidjson/example/condense/condense.cpp +0 -32
  200. data/ext/rj_schema/rapidjson/example/filterkey/filterkey.cpp +0 -135
  201. data/ext/rj_schema/rapidjson/example/filterkeydom/filterkeydom.cpp +0 -170
  202. data/ext/rj_schema/rapidjson/example/jsonx/jsonx.cpp +0 -207
  203. data/ext/rj_schema/rapidjson/example/lookaheadparser/lookaheadparser.cpp +0 -350
  204. data/ext/rj_schema/rapidjson/example/messagereader/messagereader.cpp +0 -105
  205. data/ext/rj_schema/rapidjson/example/parsebyparts/parsebyparts.cpp +0 -176
  206. data/ext/rj_schema/rapidjson/example/pretty/pretty.cpp +0 -30
  207. data/ext/rj_schema/rapidjson/example/prettyauto/prettyauto.cpp +0 -56
  208. data/ext/rj_schema/rapidjson/example/schemavalidator/schemavalidator.cpp +0 -78
  209. data/ext/rj_schema/rapidjson/example/serialize/serialize.cpp +0 -173
  210. data/ext/rj_schema/rapidjson/example/simpledom/simpledom.cpp +0 -29
  211. data/ext/rj_schema/rapidjson/example/simplepullreader/simplepullreader.cpp +0 -53
  212. data/ext/rj_schema/rapidjson/example/simplereader/simplereader.cpp +0 -42
  213. data/ext/rj_schema/rapidjson/example/simplewriter/simplewriter.cpp +0 -36
  214. data/ext/rj_schema/rapidjson/example/tutorial/tutorial.cpp +0 -151
  215. data/ext/rj_schema/rapidjson/include/rapidjson/allocators.h +0 -284
  216. data/ext/rj_schema/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -78
  217. data/ext/rj_schema/rapidjson/include/rapidjson/document.h +0 -2648
  218. data/ext/rj_schema/rapidjson/include/rapidjson/encodedstream.h +0 -299
  219. data/ext/rj_schema/rapidjson/include/rapidjson/encodings.h +0 -716
  220. data/ext/rj_schema/rapidjson/include/rapidjson/error/en.h +0 -74
  221. data/ext/rj_schema/rapidjson/include/rapidjson/error/error.h +0 -161
  222. data/ext/rj_schema/rapidjson/include/rapidjson/filereadstream.h +0 -99
  223. data/ext/rj_schema/rapidjson/include/rapidjson/filewritestream.h +0 -104
  224. data/ext/rj_schema/rapidjson/include/rapidjson/fwd.h +0 -151
  225. data/ext/rj_schema/rapidjson/include/rapidjson/internal/biginteger.h +0 -290
  226. data/ext/rj_schema/rapidjson/include/rapidjson/internal/diyfp.h +0 -271
  227. data/ext/rj_schema/rapidjson/include/rapidjson/internal/dtoa.h +0 -245
  228. data/ext/rj_schema/rapidjson/include/rapidjson/internal/ieee754.h +0 -78
  229. data/ext/rj_schema/rapidjson/include/rapidjson/internal/itoa.h +0 -308
  230. data/ext/rj_schema/rapidjson/include/rapidjson/internal/meta.h +0 -186
  231. data/ext/rj_schema/rapidjson/include/rapidjson/internal/pow10.h +0 -55
  232. data/ext/rj_schema/rapidjson/include/rapidjson/internal/regex.h +0 -732
  233. data/ext/rj_schema/rapidjson/include/rapidjson/internal/stack.h +0 -231
  234. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strfunc.h +0 -69
  235. data/ext/rj_schema/rapidjson/include/rapidjson/internal/strtod.h +0 -290
  236. data/ext/rj_schema/rapidjson/include/rapidjson/internal/swap.h +0 -46
  237. data/ext/rj_schema/rapidjson/include/rapidjson/istreamwrapper.h +0 -113
  238. data/ext/rj_schema/rapidjson/include/rapidjson/memorybuffer.h +0 -70
  239. data/ext/rj_schema/rapidjson/include/rapidjson/memorystream.h +0 -71
  240. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -316
  241. data/ext/rj_schema/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -300
  242. data/ext/rj_schema/rapidjson/include/rapidjson/ostreamwrapper.h +0 -81
  243. data/ext/rj_schema/rapidjson/include/rapidjson/pointer.h +0 -1357
  244. data/ext/rj_schema/rapidjson/include/rapidjson/prettywriter.h +0 -277
  245. data/ext/rj_schema/rapidjson/include/rapidjson/rapidjson.h +0 -630
  246. data/ext/rj_schema/rapidjson/include/rapidjson/reader.h +0 -2230
  247. data/ext/rj_schema/rapidjson/include/rapidjson/schema.h +0 -2494
  248. data/ext/rj_schema/rapidjson/include/rapidjson/stream.h +0 -223
  249. data/ext/rj_schema/rapidjson/include/rapidjson/stringbuffer.h +0 -121
  250. data/ext/rj_schema/rapidjson/include/rapidjson/writer.h +0 -710
  251. data/ext/rj_schema/rapidjson/include_dirs.js +0 -2
  252. data/ext/rj_schema/rapidjson/library.json +0 -15
  253. data/ext/rj_schema/rapidjson/license.txt +0 -57
  254. data/ext/rj_schema/rapidjson/package.json +0 -24
  255. data/ext/rj_schema/rapidjson/rapidjson.autopkg +0 -77
  256. data/ext/rj_schema/rapidjson/readme.md +0 -160
  257. data/ext/rj_schema/rapidjson/readme.zh-cn.md +0 -152
  258. data/ext/rj_schema/rapidjson/test/CMakeLists.txt +0 -20
  259. data/ext/rj_schema/rapidjson/test/perftest/CMakeLists.txt +0 -28
  260. data/ext/rj_schema/rapidjson/test/perftest/misctest.cpp +0 -974
  261. data/ext/rj_schema/rapidjson/test/perftest/perftest.cpp +0 -24
  262. data/ext/rj_schema/rapidjson/test/perftest/perftest.h +0 -185
  263. data/ext/rj_schema/rapidjson/test/perftest/platformtest.cpp +0 -166
  264. data/ext/rj_schema/rapidjson/test/perftest/rapidjsontest.cpp +0 -472
  265. data/ext/rj_schema/rapidjson/test/perftest/schematest.cpp +0 -223
  266. data/ext/rj_schema/rapidjson/test/unittest/CMakeLists.txt +0 -92
  267. data/ext/rj_schema/rapidjson/test/unittest/allocatorstest.cpp +0 -100
  268. data/ext/rj_schema/rapidjson/test/unittest/bigintegertest.cpp +0 -138
  269. data/ext/rj_schema/rapidjson/test/unittest/cursorstreamwrappertest.cpp +0 -115
  270. data/ext/rj_schema/rapidjson/test/unittest/documenttest.cpp +0 -672
  271. data/ext/rj_schema/rapidjson/test/unittest/dtoatest.cpp +0 -98
  272. data/ext/rj_schema/rapidjson/test/unittest/encodedstreamtest.cpp +0 -313
  273. data/ext/rj_schema/rapidjson/test/unittest/encodingstest.cpp +0 -451
  274. data/ext/rj_schema/rapidjson/test/unittest/filestreamtest.cpp +0 -112
  275. data/ext/rj_schema/rapidjson/test/unittest/fwdtest.cpp +0 -230
  276. data/ext/rj_schema/rapidjson/test/unittest/istreamwrappertest.cpp +0 -181
  277. data/ext/rj_schema/rapidjson/test/unittest/itoatest.cpp +0 -160
  278. data/ext/rj_schema/rapidjson/test/unittest/jsoncheckertest.cpp +0 -143
  279. data/ext/rj_schema/rapidjson/test/unittest/namespacetest.cpp +0 -70
  280. data/ext/rj_schema/rapidjson/test/unittest/ostreamwrappertest.cpp +0 -92
  281. data/ext/rj_schema/rapidjson/test/unittest/pointertest.cpp +0 -1529
  282. data/ext/rj_schema/rapidjson/test/unittest/prettywritertest.cpp +0 -373
  283. data/ext/rj_schema/rapidjson/test/unittest/readertest.cpp +0 -2190
  284. data/ext/rj_schema/rapidjson/test/unittest/regextest.cpp +0 -638
  285. data/ext/rj_schema/rapidjson/test/unittest/schematest.cpp +0 -2072
  286. data/ext/rj_schema/rapidjson/test/unittest/simdtest.cpp +0 -219
  287. data/ext/rj_schema/rapidjson/test/unittest/strfunctest.cpp +0 -30
  288. data/ext/rj_schema/rapidjson/test/unittest/stringbuffertest.cpp +0 -192
  289. data/ext/rj_schema/rapidjson/test/unittest/strtodtest.cpp +0 -132
  290. data/ext/rj_schema/rapidjson/test/unittest/unittest.cpp +0 -51
  291. data/ext/rj_schema/rapidjson/test/unittest/unittest.h +0 -140
  292. data/ext/rj_schema/rapidjson/test/unittest/valuetest.cpp +0 -1851
  293. data/ext/rj_schema/rapidjson/test/unittest/writertest.cpp +0 -598
  294. data/ext/rj_schema/rapidjson/test/valgrind.supp +0 -17
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +0 -16
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +0 -141
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +0 -126
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +0 -202
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +0 -40
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +0 -28
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +0 -224
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +0 -333
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +0 -146
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +0 -562
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +0 -3675
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +0 -280
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +0 -132
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +0 -12
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +0 -439
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +0 -628
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +0 -19
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +0 -525
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +0 -3250
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +0 -11
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +0 -439
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +0 -624
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +0 -534
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +0 -3342
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +0 -12
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +0 -439
  321. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +0 -628
  322. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +0 -556
  323. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +0 -3432
  324. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +0 -12
  325. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +0 -439
  326. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +0 -628
  327. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +0 -1205
  328. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +0 -147
  329. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +0 -2377
  330. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +0 -794
  331. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +0 -1095
  332. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +0 -291
  333. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +0 -2179
  334. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +0 -672
  335. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +0 -397
  336. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +0 -161
  337. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +0 -4399
  338. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +0 -246
  339. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +0 -58
  340. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +0 -1847
  341. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +0 -94
  342. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +0 -8
  343. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +0 -10
  344. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +0 -39
  345. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +0 -46
  346. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +0 -279
  347. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +0 -136
  348. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +0 -511
  349. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +0 -91
  350. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +0 -101
  351. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +0 -32
  352. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +0 -191
  353. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +0 -15
  354. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +0 -187
  355. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +0 -201
  356. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +0 -32
  357. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +0 -82
  358. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +0 -19
  359. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +0 -88
  360. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +0 -101
  361. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +0 -32
  362. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +0 -84
  363. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +0 -19
  364. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +0 -90
  365. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +0 -103
  366. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +0 -240
  367. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +0 -203
  368. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +0 -35
  369. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +0 -115
  370. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  371. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +0 -1733
  372. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +0 -227
  373. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +0 -448
  374. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +0 -59
  375. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +0 -287
  376. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +0 -41
  377. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +0 -31
  378. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +0 -303
  379. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +0 -640
  380. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +0 -1387
  381. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +0 -78
  382. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +0 -47
  383. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +0 -156
  384. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +0 -174
  385. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +0 -498
  386. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +0 -823
  387. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +0 -183
  388. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +0 -54
  389. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +0 -1411
  390. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +0 -428
  391. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +0 -1228
  392. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +0 -622
  393. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +0 -127
  394. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +0 -1286
  395. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +0 -699
  396. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +0 -5648
  397. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +0 -708
  398. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +0 -424
  399. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +0 -43
  400. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +0 -2644
  401. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +0 -51
  402. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +0 -81
  403. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +0 -108
  404. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +0 -100
  405. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +0 -40
  406. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +0 -40
  407. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +0 -669
  408. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +0 -180
  409. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +0 -291
  410. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +0 -310
  411. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +0 -322
  412. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +0 -220
  413. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +0 -112
  414. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +0 -157
  415. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +0 -286
  416. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +0 -37
  417. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +0 -28
  418. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +0 -310
  419. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +0 -280
  420. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +0 -242
  421. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +0 -138
  422. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +0 -54
  423. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +0 -38
  424. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +0 -40
  425. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +0 -82
  426. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +0 -88
  427. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +0 -68
  428. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +0 -2182
  429. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +0 -126
  430. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +0 -14
  431. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +0 -1087
  432. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +0 -502
  433. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +0 -177
  434. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +0 -14
  435. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +0 -2096
  436. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +0 -12
  437. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +0 -886
  438. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +0 -497
  439. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +0 -177
  440. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +0 -93
  441. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +0 -2178
  442. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +0 -14
  443. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +0 -1038
  444. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +0 -501
  445. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +0 -177
  446. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +0 -14
  447. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +0 -93
  448. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +0 -2181
  449. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +0 -14
  450. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +0 -1082
  451. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +0 -501
  452. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +0 -177
  453. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +0 -14
  454. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +0 -93
  455. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +0 -93
  456. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +0 -294
  457. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +0 -250
  458. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +0 -1444
  459. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +0 -510
  460. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +0 -993
  461. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +0 -232
  462. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +0 -179
  463. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +0 -263
  464. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +0 -2236
  465. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +0 -358
  466. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +0 -58
  467. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +0 -69
  468. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +0 -42
  469. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +0 -41
  470. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +0 -319
  471. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +0 -206
  472. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +0 -1238
  473. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +0 -243
  474. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +0 -5146
  475. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +0 -286
  476. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +0 -731
  477. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +0 -93
  478. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +0 -2554
  479. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +0 -167
  480. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +0 -1020
  481. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +0 -347
  482. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +0 -3331
  483. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +0 -297
  484. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +0 -363
  485. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +0 -74
  486. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +0 -82
  487. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +0 -45
  488. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +0 -126
  489. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +0 -45
  490. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +0 -126
  491. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +0 -129
  492. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +0 -129
  493. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +0 -164
  494. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +0 -164
  495. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +0 -147
  496. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +0 -147
  497. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +0 -123
  498. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +0 -68
  499. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +0 -43
  500. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +0 -144
  501. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +0 -153
  502. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +0 -56
  503. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +0 -85
  504. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +0 -109
  505. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +0 -172
  506. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +0 -151
  507. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +0 -46
  508. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +0 -53
  509. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +0 -45
  510. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +0 -199
  511. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +0 -224
  512. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +0 -130
  513. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +0 -173
  514. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +0 -160
  515. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +0 -83
  516. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +0 -253
  517. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +0 -730
  518. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +0 -274
  519. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +0 -855
  520. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +0 -158
  521. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +0 -59
  522. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +0 -1387
  523. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +0 -78
  524. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +0 -48
  525. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +0 -1342
  526. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +0 -387
  527. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +0 -1183
  528. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +0 -1259
  529. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +0 -373
  530. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +0 -110
  531. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +0 -118
  532. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +0 -5388
  533. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +0 -38
  534. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +0 -93
  535. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +0 -1427
  536. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +0 -662
  537. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +0 -154
  538. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +0 -311
  539. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +0 -159
  540. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +0 -215
  541. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +0 -65
  542. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +0 -1055
  543. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +0 -57
  544. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +0 -1304
  545. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +0 -1635
  546. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +0 -208
  547. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +0 -320
  548. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +0 -45
  549. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +0 -380
  550. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +0 -66
  551. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +0 -341
  552. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +0 -47
  553. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +0 -212
  554. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +0 -88
  555. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +0 -237
  556. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +0 -311
  557. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +0 -130
  558. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +0 -71
  559. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +0 -117
  560. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +0 -126
  561. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +0 -192
  562. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +0 -636
  563. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +0 -140
  564. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +0 -172
  565. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +0 -46
  566. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +0 -207
  567. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +0 -157
  568. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +0 -45
  569. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +0 -56
  570. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +0 -340
  571. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +0 -1062
  572. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +0 -743
  573. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +0 -2427
  574. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +0 -127
  575. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +0 -57
  576. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +0 -253
  577. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +0 -325
  578. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +0 -103
  579. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +0 -57
  580. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +0 -256
  581. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +0 -320
  582. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +0 -92
  583. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +0 -171
  584. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +0 -72
  585. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +0 -70
  586. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +0 -43
  587. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +0 -7706
  588. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +0 -49
  589. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +0 -49
  590. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +0 -132
  591. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +0 -308
  592. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +0 -181
  593. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +0 -194
  594. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +0 -36
  595. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +0 -55
  596. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +0 -30
  597. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +0 -17
  598. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +0 -41
  599. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +0 -32
  600. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +0 -18
  601. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +0 -8
  602. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +0 -30
  603. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +0 -28
  604. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +0 -457
  605. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +0 -62
  606. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +0 -63
  607. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +0 -59
  608. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +0 -68
  609. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +0 -65
  610. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +0 -100
  611. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +0 -1135
  612. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +0 -15
  613. data/ext/rj_schema/rapidjson/travis-doxygen.sh +0 -121
@@ -1,300 +0,0 @@
1
- // ISO C9x compliant stdint.h for Microsoft Visual Studio
2
- // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
3
- //
4
- // Copyright (c) 2006-2013 Alexander Chemeris
5
- //
6
- // Redistribution and use in source and binary forms, with or without
7
- // modification, are permitted provided that the following conditions are met:
8
- //
9
- // 1. Redistributions of source code must retain the above copyright notice,
10
- // this list of conditions and the following disclaimer.
11
- //
12
- // 2. Redistributions in binary form must reproduce the above copyright
13
- // notice, this list of conditions and the following disclaimer in the
14
- // documentation and/or other materials provided with the distribution.
15
- //
16
- // 3. Neither the name of the product nor the names of its contributors may
17
- // be used to endorse or promote products derived from this software
18
- // without specific prior written permission.
19
- //
20
- // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
21
- // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22
- // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
23
- // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
- // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26
- // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27
- // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28
- // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29
- // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- //
31
- ///////////////////////////////////////////////////////////////////////////////
32
-
33
- // The above software in this distribution may have been modified by
34
- // THL A29 Limited ("Tencent Modifications").
35
- // All Tencent Modifications are Copyright (C) 2015 THL A29 Limited.
36
-
37
- #ifndef _MSC_VER // [
38
- #error "Use this header only with Microsoft Visual C++ compilers!"
39
- #endif // _MSC_VER ]
40
-
41
- #ifndef _MSC_STDINT_H_ // [
42
- #define _MSC_STDINT_H_
43
-
44
- #if _MSC_VER > 1000
45
- #pragma once
46
- #endif
47
-
48
- // miloyip: Originally Visual Studio 2010 uses its own stdint.h. However it generates warning with INT64_C(), so change to use this file for vs2010.
49
- #if _MSC_VER >= 1600 // [
50
- #include <stdint.h>
51
-
52
- #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
53
-
54
- #undef INT8_C
55
- #undef INT16_C
56
- #undef INT32_C
57
- #undef INT64_C
58
- #undef UINT8_C
59
- #undef UINT16_C
60
- #undef UINT32_C
61
- #undef UINT64_C
62
-
63
- // 7.18.4.1 Macros for minimum-width integer constants
64
-
65
- #define INT8_C(val) val##i8
66
- #define INT16_C(val) val##i16
67
- #define INT32_C(val) val##i32
68
- #define INT64_C(val) val##i64
69
-
70
- #define UINT8_C(val) val##ui8
71
- #define UINT16_C(val) val##ui16
72
- #define UINT32_C(val) val##ui32
73
- #define UINT64_C(val) val##ui64
74
-
75
- // 7.18.4.2 Macros for greatest-width integer constants
76
- // These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
77
- // Check out Issue 9 for the details.
78
- #ifndef INTMAX_C // [
79
- # define INTMAX_C INT64_C
80
- #endif // INTMAX_C ]
81
- #ifndef UINTMAX_C // [
82
- # define UINTMAX_C UINT64_C
83
- #endif // UINTMAX_C ]
84
-
85
- #endif // __STDC_CONSTANT_MACROS ]
86
-
87
- #else // ] _MSC_VER >= 1700 [
88
-
89
- #include <limits.h>
90
-
91
- // For Visual Studio 6 in C++ mode and for many Visual Studio versions when
92
- // compiling for ARM we have to wrap <wchar.h> include with 'extern "C++" {}'
93
- // or compiler would give many errors like this:
94
- // error C2733: second C linkage of overloaded function 'wmemchr' not allowed
95
- #if defined(__cplusplus) && !defined(_M_ARM)
96
- extern "C" {
97
- #endif
98
- # include <wchar.h>
99
- #if defined(__cplusplus) && !defined(_M_ARM)
100
- }
101
- #endif
102
-
103
- // Define _W64 macros to mark types changing their size, like intptr_t.
104
- #ifndef _W64
105
- # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
106
- # define _W64 __w64
107
- # else
108
- # define _W64
109
- # endif
110
- #endif
111
-
112
-
113
- // 7.18.1 Integer types
114
-
115
- // 7.18.1.1 Exact-width integer types
116
-
117
- // Visual Studio 6 and Embedded Visual C++ 4 doesn't
118
- // realize that, e.g. char has the same size as __int8
119
- // so we give up on __intX for them.
120
- #if (_MSC_VER < 1300)
121
- typedef signed char int8_t;
122
- typedef signed short int16_t;
123
- typedef signed int int32_t;
124
- typedef unsigned char uint8_t;
125
- typedef unsigned short uint16_t;
126
- typedef unsigned int uint32_t;
127
- #else
128
- typedef signed __int8 int8_t;
129
- typedef signed __int16 int16_t;
130
- typedef signed __int32 int32_t;
131
- typedef unsigned __int8 uint8_t;
132
- typedef unsigned __int16 uint16_t;
133
- typedef unsigned __int32 uint32_t;
134
- #endif
135
- typedef signed __int64 int64_t;
136
- typedef unsigned __int64 uint64_t;
137
-
138
-
139
- // 7.18.1.2 Minimum-width integer types
140
- typedef int8_t int_least8_t;
141
- typedef int16_t int_least16_t;
142
- typedef int32_t int_least32_t;
143
- typedef int64_t int_least64_t;
144
- typedef uint8_t uint_least8_t;
145
- typedef uint16_t uint_least16_t;
146
- typedef uint32_t uint_least32_t;
147
- typedef uint64_t uint_least64_t;
148
-
149
- // 7.18.1.3 Fastest minimum-width integer types
150
- typedef int8_t int_fast8_t;
151
- typedef int16_t int_fast16_t;
152
- typedef int32_t int_fast32_t;
153
- typedef int64_t int_fast64_t;
154
- typedef uint8_t uint_fast8_t;
155
- typedef uint16_t uint_fast16_t;
156
- typedef uint32_t uint_fast32_t;
157
- typedef uint64_t uint_fast64_t;
158
-
159
- // 7.18.1.4 Integer types capable of holding object pointers
160
- #ifdef _WIN64 // [
161
- typedef signed __int64 intptr_t;
162
- typedef unsigned __int64 uintptr_t;
163
- #else // _WIN64 ][
164
- typedef _W64 signed int intptr_t;
165
- typedef _W64 unsigned int uintptr_t;
166
- #endif // _WIN64 ]
167
-
168
- // 7.18.1.5 Greatest-width integer types
169
- typedef int64_t intmax_t;
170
- typedef uint64_t uintmax_t;
171
-
172
-
173
- // 7.18.2 Limits of specified-width integer types
174
-
175
- #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
176
-
177
- // 7.18.2.1 Limits of exact-width integer types
178
- #define INT8_MIN ((int8_t)_I8_MIN)
179
- #define INT8_MAX _I8_MAX
180
- #define INT16_MIN ((int16_t)_I16_MIN)
181
- #define INT16_MAX _I16_MAX
182
- #define INT32_MIN ((int32_t)_I32_MIN)
183
- #define INT32_MAX _I32_MAX
184
- #define INT64_MIN ((int64_t)_I64_MIN)
185
- #define INT64_MAX _I64_MAX
186
- #define UINT8_MAX _UI8_MAX
187
- #define UINT16_MAX _UI16_MAX
188
- #define UINT32_MAX _UI32_MAX
189
- #define UINT64_MAX _UI64_MAX
190
-
191
- // 7.18.2.2 Limits of minimum-width integer types
192
- #define INT_LEAST8_MIN INT8_MIN
193
- #define INT_LEAST8_MAX INT8_MAX
194
- #define INT_LEAST16_MIN INT16_MIN
195
- #define INT_LEAST16_MAX INT16_MAX
196
- #define INT_LEAST32_MIN INT32_MIN
197
- #define INT_LEAST32_MAX INT32_MAX
198
- #define INT_LEAST64_MIN INT64_MIN
199
- #define INT_LEAST64_MAX INT64_MAX
200
- #define UINT_LEAST8_MAX UINT8_MAX
201
- #define UINT_LEAST16_MAX UINT16_MAX
202
- #define UINT_LEAST32_MAX UINT32_MAX
203
- #define UINT_LEAST64_MAX UINT64_MAX
204
-
205
- // 7.18.2.3 Limits of fastest minimum-width integer types
206
- #define INT_FAST8_MIN INT8_MIN
207
- #define INT_FAST8_MAX INT8_MAX
208
- #define INT_FAST16_MIN INT16_MIN
209
- #define INT_FAST16_MAX INT16_MAX
210
- #define INT_FAST32_MIN INT32_MIN
211
- #define INT_FAST32_MAX INT32_MAX
212
- #define INT_FAST64_MIN INT64_MIN
213
- #define INT_FAST64_MAX INT64_MAX
214
- #define UINT_FAST8_MAX UINT8_MAX
215
- #define UINT_FAST16_MAX UINT16_MAX
216
- #define UINT_FAST32_MAX UINT32_MAX
217
- #define UINT_FAST64_MAX UINT64_MAX
218
-
219
- // 7.18.2.4 Limits of integer types capable of holding object pointers
220
- #ifdef _WIN64 // [
221
- # define INTPTR_MIN INT64_MIN
222
- # define INTPTR_MAX INT64_MAX
223
- # define UINTPTR_MAX UINT64_MAX
224
- #else // _WIN64 ][
225
- # define INTPTR_MIN INT32_MIN
226
- # define INTPTR_MAX INT32_MAX
227
- # define UINTPTR_MAX UINT32_MAX
228
- #endif // _WIN64 ]
229
-
230
- // 7.18.2.5 Limits of greatest-width integer types
231
- #define INTMAX_MIN INT64_MIN
232
- #define INTMAX_MAX INT64_MAX
233
- #define UINTMAX_MAX UINT64_MAX
234
-
235
- // 7.18.3 Limits of other integer types
236
-
237
- #ifdef _WIN64 // [
238
- # define PTRDIFF_MIN _I64_MIN
239
- # define PTRDIFF_MAX _I64_MAX
240
- #else // _WIN64 ][
241
- # define PTRDIFF_MIN _I32_MIN
242
- # define PTRDIFF_MAX _I32_MAX
243
- #endif // _WIN64 ]
244
-
245
- #define SIG_ATOMIC_MIN INT_MIN
246
- #define SIG_ATOMIC_MAX INT_MAX
247
-
248
- #ifndef SIZE_MAX // [
249
- # ifdef _WIN64 // [
250
- # define SIZE_MAX _UI64_MAX
251
- # else // _WIN64 ][
252
- # define SIZE_MAX _UI32_MAX
253
- # endif // _WIN64 ]
254
- #endif // SIZE_MAX ]
255
-
256
- // WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
257
- #ifndef WCHAR_MIN // [
258
- # define WCHAR_MIN 0
259
- #endif // WCHAR_MIN ]
260
- #ifndef WCHAR_MAX // [
261
- # define WCHAR_MAX _UI16_MAX
262
- #endif // WCHAR_MAX ]
263
-
264
- #define WINT_MIN 0
265
- #define WINT_MAX _UI16_MAX
266
-
267
- #endif // __STDC_LIMIT_MACROS ]
268
-
269
-
270
- // 7.18.4 Limits of other integer types
271
-
272
- #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
273
-
274
- // 7.18.4.1 Macros for minimum-width integer constants
275
-
276
- #define INT8_C(val) val##i8
277
- #define INT16_C(val) val##i16
278
- #define INT32_C(val) val##i32
279
- #define INT64_C(val) val##i64
280
-
281
- #define UINT8_C(val) val##ui8
282
- #define UINT16_C(val) val##ui16
283
- #define UINT32_C(val) val##ui32
284
- #define UINT64_C(val) val##ui64
285
-
286
- // 7.18.4.2 Macros for greatest-width integer constants
287
- // These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
288
- // Check out Issue 9 for the details.
289
- #ifndef INTMAX_C // [
290
- # define INTMAX_C INT64_C
291
- #endif // INTMAX_C ]
292
- #ifndef UINTMAX_C // [
293
- # define UINTMAX_C UINT64_C
294
- #endif // UINTMAX_C ]
295
-
296
- #endif // __STDC_CONSTANT_MACROS ]
297
-
298
- #endif // _MSC_VER >= 1600 ]
299
-
300
- #endif // _MSC_STDINT_H_ ]
@@ -1,81 +0,0 @@
1
- // Tencent is pleased to support the open source community by making RapidJSON available.
2
- //
3
- // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
4
- //
5
- // Licensed under the MIT License (the "License"); you may not use this file except
6
- // in compliance with the License. You may obtain a copy of the License at
7
- //
8
- // http://opensource.org/licenses/MIT
9
- //
10
- // Unless required by applicable law or agreed to in writing, software distributed
11
- // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
- // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
- // specific language governing permissions and limitations under the License.
14
-
15
- #ifndef RAPIDJSON_OSTREAMWRAPPER_H_
16
- #define RAPIDJSON_OSTREAMWRAPPER_H_
17
-
18
- #include "stream.h"
19
- #include <iosfwd>
20
-
21
- #ifdef __clang__
22
- RAPIDJSON_DIAG_PUSH
23
- RAPIDJSON_DIAG_OFF(padded)
24
- #endif
25
-
26
- RAPIDJSON_NAMESPACE_BEGIN
27
-
28
- //! Wrapper of \c std::basic_ostream into RapidJSON's Stream concept.
29
- /*!
30
- The classes can be wrapped including but not limited to:
31
-
32
- - \c std::ostringstream
33
- - \c std::stringstream
34
- - \c std::wpstringstream
35
- - \c std::wstringstream
36
- - \c std::ifstream
37
- - \c std::fstream
38
- - \c std::wofstream
39
- - \c std::wfstream
40
-
41
- \tparam StreamType Class derived from \c std::basic_ostream.
42
- */
43
-
44
- template <typename StreamType>
45
- class BasicOStreamWrapper {
46
- public:
47
- typedef typename StreamType::char_type Ch;
48
- BasicOStreamWrapper(StreamType& stream) : stream_(stream) {}
49
-
50
- void Put(Ch c) {
51
- stream_.put(c);
52
- }
53
-
54
- void Flush() {
55
- stream_.flush();
56
- }
57
-
58
- // Not implemented
59
- char Peek() const { RAPIDJSON_ASSERT(false); return 0; }
60
- char Take() { RAPIDJSON_ASSERT(false); return 0; }
61
- size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; }
62
- char* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
63
- size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; }
64
-
65
- private:
66
- BasicOStreamWrapper(const BasicOStreamWrapper&);
67
- BasicOStreamWrapper& operator=(const BasicOStreamWrapper&);
68
-
69
- StreamType& stream_;
70
- };
71
-
72
- typedef BasicOStreamWrapper<std::ostream> OStreamWrapper;
73
- typedef BasicOStreamWrapper<std::wostream> WOStreamWrapper;
74
-
75
- #ifdef __clang__
76
- RAPIDJSON_DIAG_POP
77
- #endif
78
-
79
- RAPIDJSON_NAMESPACE_END
80
-
81
- #endif // RAPIDJSON_OSTREAMWRAPPER_H_
@@ -1,1357 +0,0 @@
1
- // Tencent is pleased to support the open source community by making RapidJSON available.
2
- //
3
- // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
4
- //
5
- // Licensed under the MIT License (the "License"); you may not use this file except
6
- // in compliance with the License. You may obtain a copy of the License at
7
- //
8
- // http://opensource.org/licenses/MIT
9
- //
10
- // Unless required by applicable law or agreed to in writing, software distributed
11
- // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
- // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
- // specific language governing permissions and limitations under the License.
14
-
15
- #ifndef RAPIDJSON_POINTER_H_
16
- #define RAPIDJSON_POINTER_H_
17
-
18
- #include "document.h"
19
- #include "internal/itoa.h"
20
-
21
- #ifdef __clang__
22
- RAPIDJSON_DIAG_PUSH
23
- RAPIDJSON_DIAG_OFF(switch-enum)
24
- #elif defined(_MSC_VER)
25
- RAPIDJSON_DIAG_PUSH
26
- RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
27
- #endif
28
-
29
- RAPIDJSON_NAMESPACE_BEGIN
30
-
31
- static const SizeType kPointerInvalidIndex = ~SizeType(0); //!< Represents an invalid index in GenericPointer::Token
32
-
33
- //! Error code of parsing.
34
- /*! \ingroup RAPIDJSON_ERRORS
35
- \see GenericPointer::GenericPointer, GenericPointer::GetParseErrorCode
36
- */
37
- enum PointerParseErrorCode {
38
- kPointerParseErrorNone = 0, //!< The parse is successful
39
-
40
- kPointerParseErrorTokenMustBeginWithSolidus, //!< A token must begin with a '/'
41
- kPointerParseErrorInvalidEscape, //!< Invalid escape
42
- kPointerParseErrorInvalidPercentEncoding, //!< Invalid percent encoding in URI fragment
43
- kPointerParseErrorCharacterMustPercentEncode //!< A character must percent encoded in URI fragment
44
- };
45
-
46
- ///////////////////////////////////////////////////////////////////////////////
47
- // GenericPointer
48
-
49
- //! Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
50
- /*!
51
- This class implements RFC 6901 "JavaScript Object Notation (JSON) Pointer"
52
- (https://tools.ietf.org/html/rfc6901).
53
-
54
- A JSON pointer is for identifying a specific value in a JSON document
55
- (GenericDocument). It can simplify coding of DOM tree manipulation, because it
56
- can access multiple-level depth of DOM tree with single API call.
57
-
58
- After it parses a string representation (e.g. "/foo/0" or URI fragment
59
- representation (e.g. "#/foo/0") into its internal representation (tokens),
60
- it can be used to resolve a specific value in multiple documents, or sub-tree
61
- of documents.
62
-
63
- Contrary to GenericValue, Pointer can be copy constructed and copy assigned.
64
- Apart from assignment, a Pointer cannot be modified after construction.
65
-
66
- Although Pointer is very convenient, please aware that constructing Pointer
67
- involves parsing and dynamic memory allocation. A special constructor with user-
68
- supplied tokens eliminates these.
69
-
70
- GenericPointer depends on GenericDocument and GenericValue.
71
-
72
- \tparam ValueType The value type of the DOM tree. E.g. GenericValue<UTF8<> >
73
- \tparam Allocator The allocator type for allocating memory for internal representation.
74
-
75
- \note GenericPointer uses same encoding of ValueType.
76
- However, Allocator of GenericPointer is independent of Allocator of Value.
77
- */
78
- template <typename ValueType, typename Allocator = CrtAllocator>
79
- class GenericPointer {
80
- public:
81
- typedef typename ValueType::EncodingType EncodingType; //!< Encoding type from Value
82
- typedef typename ValueType::Ch Ch; //!< Character type from Value
83
-
84
- //! A token is the basic units of internal representation.
85
- /*!
86
- A JSON pointer string representation "/foo/123" is parsed to two tokens:
87
- "foo" and 123. 123 will be represented in both numeric form and string form.
88
- They are resolved according to the actual value type (object or array).
89
-
90
- For token that are not numbers, or the numeric value is out of bound
91
- (greater than limits of SizeType), they are only treated as string form
92
- (i.e. the token's index will be equal to kPointerInvalidIndex).
93
-
94
- This struct is public so that user can create a Pointer without parsing and
95
- allocation, using a special constructor.
96
- */
97
- struct Token {
98
- const Ch* name; //!< Name of the token. It has null character at the end but it can contain null character.
99
- SizeType length; //!< Length of the name.
100
- SizeType index; //!< A valid array index, if it is not equal to kPointerInvalidIndex.
101
- };
102
-
103
- //!@name Constructors and destructor.
104
- //@{
105
-
106
- //! Default constructor.
107
- GenericPointer(Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
108
-
109
- //! Constructor that parses a string or URI fragment representation.
110
- /*!
111
- \param source A null-terminated, string or URI fragment representation of JSON pointer.
112
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
113
- */
114
- explicit GenericPointer(const Ch* source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
115
- Parse(source, internal::StrLen(source));
116
- }
117
-
118
- #if RAPIDJSON_HAS_STDSTRING
119
- //! Constructor that parses a string or URI fragment representation.
120
- /*!
121
- \param source A string or URI fragment representation of JSON pointer.
122
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
123
- \note Requires the definition of the preprocessor symbol \ref RAPIDJSON_HAS_STDSTRING.
124
- */
125
- explicit GenericPointer(const std::basic_string<Ch>& source, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
126
- Parse(source.c_str(), source.size());
127
- }
128
- #endif
129
-
130
- //! Constructor that parses a string or URI fragment representation, with length of the source string.
131
- /*!
132
- \param source A string or URI fragment representation of JSON pointer.
133
- \param length Length of source.
134
- \param allocator User supplied allocator for this pointer. If no allocator is provided, it creates a self-owned one.
135
- \note Slightly faster than the overload without length.
136
- */
137
- GenericPointer(const Ch* source, size_t length, Allocator* allocator = 0) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
138
- Parse(source, length);
139
- }
140
-
141
- //! Constructor with user-supplied tokens.
142
- /*!
143
- This constructor let user supplies const array of tokens.
144
- This prevents the parsing process and eliminates allocation.
145
- This is preferred for memory constrained environments.
146
-
147
- \param tokens An constant array of tokens representing the JSON pointer.
148
- \param tokenCount Number of tokens.
149
-
150
- \b Example
151
- \code
152
- #define NAME(s) { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
153
- #define INDEX(i) { #i, sizeof(#i) - 1, i }
154
-
155
- static const Pointer::Token kTokens[] = { NAME("foo"), INDEX(123) };
156
- static const Pointer p(kTokens, sizeof(kTokens) / sizeof(kTokens[0]));
157
- // Equivalent to static const Pointer p("/foo/123");
158
-
159
- #undef NAME
160
- #undef INDEX
161
- \endcode
162
- */
163
- GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast<Token*>(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {}
164
-
165
- //! Copy constructor.
166
- GenericPointer(const GenericPointer& rhs) : allocator_(rhs.allocator_), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
167
- *this = rhs;
168
- }
169
-
170
- //! Copy constructor.
171
- GenericPointer(const GenericPointer& rhs, Allocator* allocator) : allocator_(allocator), ownAllocator_(), nameBuffer_(), tokens_(), tokenCount_(), parseErrorOffset_(), parseErrorCode_(kPointerParseErrorNone) {
172
- *this = rhs;
173
- }
174
-
175
- //! Destructor.
176
- ~GenericPointer() {
177
- if (nameBuffer_) // If user-supplied tokens constructor is used, nameBuffer_ is nullptr and tokens_ are not deallocated.
178
- Allocator::Free(tokens_);
179
- RAPIDJSON_DELETE(ownAllocator_);
180
- }
181
-
182
- //! Assignment operator.
183
- GenericPointer& operator=(const GenericPointer& rhs) {
184
- if (this != &rhs) {
185
- // Do not delete ownAllcator
186
- if (nameBuffer_)
187
- Allocator::Free(tokens_);
188
-
189
- tokenCount_ = rhs.tokenCount_;
190
- parseErrorOffset_ = rhs.parseErrorOffset_;
191
- parseErrorCode_ = rhs.parseErrorCode_;
192
-
193
- if (rhs.nameBuffer_)
194
- CopyFromRaw(rhs); // Normally parsed tokens.
195
- else {
196
- tokens_ = rhs.tokens_; // User supplied const tokens.
197
- nameBuffer_ = 0;
198
- }
199
- }
200
- return *this;
201
- }
202
-
203
- //@}
204
-
205
- //!@name Append token
206
- //@{
207
-
208
- //! Append a token and return a new Pointer
209
- /*!
210
- \param token Token to be appended.
211
- \param allocator Allocator for the newly return Pointer.
212
- \return A new Pointer with appended token.
213
- */
214
- GenericPointer Append(const Token& token, Allocator* allocator = 0) const {
215
- GenericPointer r;
216
- r.allocator_ = allocator;
217
- Ch *p = r.CopyFromRaw(*this, 1, token.length + 1);
218
- std::memcpy(p, token.name, (token.length + 1) * sizeof(Ch));
219
- r.tokens_[tokenCount_].name = p;
220
- r.tokens_[tokenCount_].length = token.length;
221
- r.tokens_[tokenCount_].index = token.index;
222
- return r;
223
- }
224
-
225
- //! Append a name token with length, and return a new Pointer
226
- /*!
227
- \param name Name to be appended.
228
- \param length Length of name.
229
- \param allocator Allocator for the newly return Pointer.
230
- \return A new Pointer with appended token.
231
- */
232
- GenericPointer Append(const Ch* name, SizeType length, Allocator* allocator = 0) const {
233
- Token token = { name, length, kPointerInvalidIndex };
234
- return Append(token, allocator);
235
- }
236
-
237
- //! Append a name token without length, and return a new Pointer
238
- /*!
239
- \param name Name (const Ch*) to be appended.
240
- \param allocator Allocator for the newly return Pointer.
241
- \return A new Pointer with appended token.
242
- */
243
- template <typename T>
244
- RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch> >), (GenericPointer))
245
- Append(T* name, Allocator* allocator = 0) const {
246
- return Append(name, internal::StrLen(name), allocator);
247
- }
248
-
249
- #if RAPIDJSON_HAS_STDSTRING
250
- //! Append a name token, and return a new Pointer
251
- /*!
252
- \param name Name to be appended.
253
- \param allocator Allocator for the newly return Pointer.
254
- \return A new Pointer with appended token.
255
- */
256
- GenericPointer Append(const std::basic_string<Ch>& name, Allocator* allocator = 0) const {
257
- return Append(name.c_str(), static_cast<SizeType>(name.size()), allocator);
258
- }
259
- #endif
260
-
261
- //! Append a index token, and return a new Pointer
262
- /*!
263
- \param index Index to be appended.
264
- \param allocator Allocator for the newly return Pointer.
265
- \return A new Pointer with appended token.
266
- */
267
- GenericPointer Append(SizeType index, Allocator* allocator = 0) const {
268
- char buffer[21];
269
- char* end = sizeof(SizeType) == 4 ? internal::u32toa(index, buffer) : internal::u64toa(index, buffer);
270
- SizeType length = static_cast<SizeType>(end - buffer);
271
- buffer[length] = '\0';
272
-
273
- if (sizeof(Ch) == 1) {
274
- Token token = { reinterpret_cast<Ch*>(buffer), length, index };
275
- return Append(token, allocator);
276
- }
277
- else {
278
- Ch name[21];
279
- for (size_t i = 0; i <= length; i++)
280
- name[i] = static_cast<Ch>(buffer[i]);
281
- Token token = { name, length, index };
282
- return Append(token, allocator);
283
- }
284
- }
285
-
286
- //! Append a token by value, and return a new Pointer
287
- /*!
288
- \param token token to be appended.
289
- \param allocator Allocator for the newly return Pointer.
290
- \return A new Pointer with appended token.
291
- */
292
- GenericPointer Append(const ValueType& token, Allocator* allocator = 0) const {
293
- if (token.IsString())
294
- return Append(token.GetString(), token.GetStringLength(), allocator);
295
- else {
296
- RAPIDJSON_ASSERT(token.IsUint64());
297
- RAPIDJSON_ASSERT(token.GetUint64() <= SizeType(~0));
298
- return Append(static_cast<SizeType>(token.GetUint64()), allocator);
299
- }
300
- }
301
-
302
- //!@name Handling Parse Error
303
- //@{
304
-
305
- //! Check whether this is a valid pointer.
306
- bool IsValid() const { return parseErrorCode_ == kPointerParseErrorNone; }
307
-
308
- //! Get the parsing error offset in code unit.
309
- size_t GetParseErrorOffset() const { return parseErrorOffset_; }
310
-
311
- //! Get the parsing error code.
312
- PointerParseErrorCode GetParseErrorCode() const { return parseErrorCode_; }
313
-
314
- //@}
315
-
316
- //! Get the allocator of this pointer.
317
- Allocator& GetAllocator() { return *allocator_; }
318
-
319
- //!@name Tokens
320
- //@{
321
-
322
- //! Get the token array (const version only).
323
- const Token* GetTokens() const { return tokens_; }
324
-
325
- //! Get the number of tokens.
326
- size_t GetTokenCount() const { return tokenCount_; }
327
-
328
- //@}
329
-
330
- //!@name Equality/inequality operators
331
- //@{
332
-
333
- //! Equality operator.
334
- /*!
335
- \note When any pointers are invalid, always returns false.
336
- */
337
- bool operator==(const GenericPointer& rhs) const {
338
- if (!IsValid() || !rhs.IsValid() || tokenCount_ != rhs.tokenCount_)
339
- return false;
340
-
341
- for (size_t i = 0; i < tokenCount_; i++) {
342
- if (tokens_[i].index != rhs.tokens_[i].index ||
343
- tokens_[i].length != rhs.tokens_[i].length ||
344
- (tokens_[i].length != 0 && std::memcmp(tokens_[i].name, rhs.tokens_[i].name, sizeof(Ch)* tokens_[i].length) != 0))
345
- {
346
- return false;
347
- }
348
- }
349
-
350
- return true;
351
- }
352
-
353
- //! Inequality operator.
354
- /*!
355
- \note When any pointers are invalid, always returns true.
356
- */
357
- bool operator!=(const GenericPointer& rhs) const { return !(*this == rhs); }
358
-
359
- //@}
360
-
361
- //!@name Stringify
362
- //@{
363
-
364
- //! Stringify the pointer into string representation.
365
- /*!
366
- \tparam OutputStream Type of output stream.
367
- \param os The output stream.
368
- */
369
- template<typename OutputStream>
370
- bool Stringify(OutputStream& os) const {
371
- return Stringify<false, OutputStream>(os);
372
- }
373
-
374
- //! Stringify the pointer into URI fragment representation.
375
- /*!
376
- \tparam OutputStream Type of output stream.
377
- \param os The output stream.
378
- */
379
- template<typename OutputStream>
380
- bool StringifyUriFragment(OutputStream& os) const {
381
- return Stringify<true, OutputStream>(os);
382
- }
383
-
384
- //@}
385
-
386
- //!@name Create value
387
- //@{
388
-
389
- //! Create a value in a subtree.
390
- /*!
391
- If the value is not exist, it creates all parent values and a JSON Null value.
392
- So it always succeed and return the newly created or existing value.
393
-
394
- Remind that it may change types of parents according to tokens, so it
395
- potentially removes previously stored values. For example, if a document
396
- was an array, and "/foo" is used to create a value, then the document
397
- will be changed to an object, and all existing array elements are lost.
398
-
399
- \param root Root value of a DOM subtree to be resolved. It can be any value other than document root.
400
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
401
- \param alreadyExist If non-null, it stores whether the resolved value is already exist.
402
- \return The resolved newly created (a JSON Null value), or already exists value.
403
- */
404
- ValueType& Create(ValueType& root, typename ValueType::AllocatorType& allocator, bool* alreadyExist = 0) const {
405
- RAPIDJSON_ASSERT(IsValid());
406
- ValueType* v = &root;
407
- bool exist = true;
408
- for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
409
- if (v->IsArray() && t->name[0] == '-' && t->length == 1) {
410
- v->PushBack(ValueType().Move(), allocator);
411
- v = &((*v)[v->Size() - 1]);
412
- exist = false;
413
- }
414
- else {
415
- if (t->index == kPointerInvalidIndex) { // must be object name
416
- if (!v->IsObject())
417
- v->SetObject(); // Change to Object
418
- }
419
- else { // object name or array index
420
- if (!v->IsArray() && !v->IsObject())
421
- v->SetArray(); // Change to Array
422
- }
423
-
424
- if (v->IsArray()) {
425
- if (t->index >= v->Size()) {
426
- v->Reserve(t->index + 1, allocator);
427
- while (t->index >= v->Size())
428
- v->PushBack(ValueType().Move(), allocator);
429
- exist = false;
430
- }
431
- v = &((*v)[t->index]);
432
- }
433
- else {
434
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
435
- if (m == v->MemberEnd()) {
436
- v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);
437
- v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end
438
- exist = false;
439
- }
440
- else
441
- v = &m->value;
442
- }
443
- }
444
- }
445
-
446
- if (alreadyExist)
447
- *alreadyExist = exist;
448
-
449
- return *v;
450
- }
451
-
452
- //! Creates a value in a document.
453
- /*!
454
- \param document A document to be resolved.
455
- \param alreadyExist If non-null, it stores whether the resolved value is already exist.
456
- \return The resolved newly created, or already exists value.
457
- */
458
- template <typename stackAllocator>
459
- ValueType& Create(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, bool* alreadyExist = 0) const {
460
- return Create(document, document.GetAllocator(), alreadyExist);
461
- }
462
-
463
- //@}
464
-
465
- //!@name Query value
466
- //@{
467
-
468
- //! Query a value in a subtree.
469
- /*!
470
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
471
- \param unresolvedTokenIndex If the pointer cannot resolve a token in the pointer, this parameter can obtain the index of unresolved token.
472
- \return Pointer to the value if it can be resolved. Otherwise null.
473
-
474
- \note
475
- There are only 3 situations when a value cannot be resolved:
476
- 1. A value in the path is not an array nor object.
477
- 2. An object value does not contain the token.
478
- 3. A token is out of range of an array value.
479
-
480
- Use unresolvedTokenIndex to retrieve the token index.
481
- */
482
- ValueType* Get(ValueType& root, size_t* unresolvedTokenIndex = 0) const {
483
- RAPIDJSON_ASSERT(IsValid());
484
- ValueType* v = &root;
485
- for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
486
- switch (v->GetType()) {
487
- case kObjectType:
488
- {
489
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
490
- if (m == v->MemberEnd())
491
- break;
492
- v = &m->value;
493
- }
494
- continue;
495
- case kArrayType:
496
- if (t->index == kPointerInvalidIndex || t->index >= v->Size())
497
- break;
498
- v = &((*v)[t->index]);
499
- continue;
500
- default:
501
- break;
502
- }
503
-
504
- // Error: unresolved token
505
- if (unresolvedTokenIndex)
506
- *unresolvedTokenIndex = static_cast<size_t>(t - tokens_);
507
- return 0;
508
- }
509
- return v;
510
- }
511
-
512
- //! Query a const value in a const subtree.
513
- /*!
514
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
515
- \return Pointer to the value if it can be resolved. Otherwise null.
516
- */
517
- const ValueType* Get(const ValueType& root, size_t* unresolvedTokenIndex = 0) const {
518
- return Get(const_cast<ValueType&>(root), unresolvedTokenIndex);
519
- }
520
-
521
- //@}
522
-
523
- //!@name Query a value with default
524
- //@{
525
-
526
- //! Query a value in a subtree with default value.
527
- /*!
528
- Similar to Get(), but if the specified value do not exists, it creates all parents and clone the default value.
529
- So that this function always succeed.
530
-
531
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
532
- \param defaultValue Default value to be cloned if the value was not exists.
533
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
534
- \see Create()
535
- */
536
- ValueType& GetWithDefault(ValueType& root, const ValueType& defaultValue, typename ValueType::AllocatorType& allocator) const {
537
- bool alreadyExist;
538
- ValueType& v = Create(root, allocator, &alreadyExist);
539
- return alreadyExist ? v : v.CopyFrom(defaultValue, allocator);
540
- }
541
-
542
- //! Query a value in a subtree with default null-terminated string.
543
- ValueType& GetWithDefault(ValueType& root, const Ch* defaultValue, typename ValueType::AllocatorType& allocator) const {
544
- bool alreadyExist;
545
- ValueType& v = Create(root, allocator, &alreadyExist);
546
- return alreadyExist ? v : v.SetString(defaultValue, allocator);
547
- }
548
-
549
- #if RAPIDJSON_HAS_STDSTRING
550
- //! Query a value in a subtree with default std::basic_string.
551
- ValueType& GetWithDefault(ValueType& root, const std::basic_string<Ch>& defaultValue, typename ValueType::AllocatorType& allocator) const {
552
- bool alreadyExist;
553
- ValueType& v = Create(root, allocator, &alreadyExist);
554
- return alreadyExist ? v : v.SetString(defaultValue, allocator);
555
- }
556
- #endif
557
-
558
- //! Query a value in a subtree with default primitive value.
559
- /*!
560
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
561
- */
562
- template <typename T>
563
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
564
- GetWithDefault(ValueType& root, T defaultValue, typename ValueType::AllocatorType& allocator) const {
565
- return GetWithDefault(root, ValueType(defaultValue).Move(), allocator);
566
- }
567
-
568
- //! Query a value in a document with default value.
569
- template <typename stackAllocator>
570
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& defaultValue) const {
571
- return GetWithDefault(document, defaultValue, document.GetAllocator());
572
- }
573
-
574
- //! Query a value in a document with default null-terminated string.
575
- template <typename stackAllocator>
576
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* defaultValue) const {
577
- return GetWithDefault(document, defaultValue, document.GetAllocator());
578
- }
579
-
580
- #if RAPIDJSON_HAS_STDSTRING
581
- //! Query a value in a document with default std::basic_string.
582
- template <typename stackAllocator>
583
- ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& defaultValue) const {
584
- return GetWithDefault(document, defaultValue, document.GetAllocator());
585
- }
586
- #endif
587
-
588
- //! Query a value in a document with default primitive value.
589
- /*!
590
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
591
- */
592
- template <typename T, typename stackAllocator>
593
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
594
- GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T defaultValue) const {
595
- return GetWithDefault(document, defaultValue, document.GetAllocator());
596
- }
597
-
598
- //@}
599
-
600
- //!@name Set a value
601
- //@{
602
-
603
- //! Set a value in a subtree, with move semantics.
604
- /*!
605
- It creates all parents if they are not exist or types are different to the tokens.
606
- So this function always succeeds but potentially remove existing values.
607
-
608
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
609
- \param value Value to be set.
610
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
611
- \see Create()
612
- */
613
- ValueType& Set(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {
614
- return Create(root, allocator) = value;
615
- }
616
-
617
- //! Set a value in a subtree, with copy semantics.
618
- ValueType& Set(ValueType& root, const ValueType& value, typename ValueType::AllocatorType& allocator) const {
619
- return Create(root, allocator).CopyFrom(value, allocator);
620
- }
621
-
622
- //! Set a null-terminated string in a subtree.
623
- ValueType& Set(ValueType& root, const Ch* value, typename ValueType::AllocatorType& allocator) const {
624
- return Create(root, allocator) = ValueType(value, allocator).Move();
625
- }
626
-
627
- #if RAPIDJSON_HAS_STDSTRING
628
- //! Set a std::basic_string in a subtree.
629
- ValueType& Set(ValueType& root, const std::basic_string<Ch>& value, typename ValueType::AllocatorType& allocator) const {
630
- return Create(root, allocator) = ValueType(value, allocator).Move();
631
- }
632
- #endif
633
-
634
- //! Set a primitive value in a subtree.
635
- /*!
636
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
637
- */
638
- template <typename T>
639
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
640
- Set(ValueType& root, T value, typename ValueType::AllocatorType& allocator) const {
641
- return Create(root, allocator) = ValueType(value).Move();
642
- }
643
-
644
- //! Set a value in a document, with move semantics.
645
- template <typename stackAllocator>
646
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {
647
- return Create(document) = value;
648
- }
649
-
650
- //! Set a value in a document, with copy semantics.
651
- template <typename stackAllocator>
652
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const ValueType& value) const {
653
- return Create(document).CopyFrom(value, document.GetAllocator());
654
- }
655
-
656
- //! Set a null-terminated string in a document.
657
- template <typename stackAllocator>
658
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const Ch* value) const {
659
- return Create(document) = ValueType(value, document.GetAllocator()).Move();
660
- }
661
-
662
- #if RAPIDJSON_HAS_STDSTRING
663
- //! Sets a std::basic_string in a document.
664
- template <typename stackAllocator>
665
- ValueType& Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, const std::basic_string<Ch>& value) const {
666
- return Create(document) = ValueType(value, document.GetAllocator()).Move();
667
- }
668
- #endif
669
-
670
- //! Set a primitive value in a document.
671
- /*!
672
- \tparam T Either \ref Type, \c int, \c unsigned, \c int64_t, \c uint64_t, \c bool
673
- */
674
- template <typename T, typename stackAllocator>
675
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >), (ValueType&))
676
- Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T value) const {
677
- return Create(document) = value;
678
- }
679
-
680
- //@}
681
-
682
- //!@name Swap a value
683
- //@{
684
-
685
- //! Swap a value with a value in a subtree.
686
- /*!
687
- It creates all parents if they are not exist or types are different to the tokens.
688
- So this function always succeeds but potentially remove existing values.
689
-
690
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
691
- \param value Value to be swapped.
692
- \param allocator Allocator for creating the values if the specified value or its parents are not exist.
693
- \see Create()
694
- */
695
- ValueType& Swap(ValueType& root, ValueType& value, typename ValueType::AllocatorType& allocator) const {
696
- return Create(root, allocator).Swap(value);
697
- }
698
-
699
- //! Swap a value with a value in a document.
700
- template <typename stackAllocator>
701
- ValueType& Swap(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, ValueType& value) const {
702
- return Create(document).Swap(value);
703
- }
704
-
705
- //@}
706
-
707
- //! Erase a value in a subtree.
708
- /*!
709
- \param root Root value of a DOM sub-tree to be resolved. It can be any value other than document root.
710
- \return Whether the resolved value is found and erased.
711
-
712
- \note Erasing with an empty pointer \c Pointer(""), i.e. the root, always fail and return false.
713
- */
714
- bool Erase(ValueType& root) const {
715
- RAPIDJSON_ASSERT(IsValid());
716
- if (tokenCount_ == 0) // Cannot erase the root
717
- return false;
718
-
719
- ValueType* v = &root;
720
- const Token* last = tokens_ + (tokenCount_ - 1);
721
- for (const Token *t = tokens_; t != last; ++t) {
722
- switch (v->GetType()) {
723
- case kObjectType:
724
- {
725
- typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length));
726
- if (m == v->MemberEnd())
727
- return false;
728
- v = &m->value;
729
- }
730
- break;
731
- case kArrayType:
732
- if (t->index == kPointerInvalidIndex || t->index >= v->Size())
733
- return false;
734
- v = &((*v)[t->index]);
735
- break;
736
- default:
737
- return false;
738
- }
739
- }
740
-
741
- switch (v->GetType()) {
742
- case kObjectType:
743
- return v->EraseMember(GenericStringRef<Ch>(last->name, last->length));
744
- case kArrayType:
745
- if (last->index == kPointerInvalidIndex || last->index >= v->Size())
746
- return false;
747
- v->Erase(v->Begin() + last->index);
748
- return true;
749
- default:
750
- return false;
751
- }
752
- }
753
-
754
- private:
755
- //! Clone the content from rhs to this.
756
- /*!
757
- \param rhs Source pointer.
758
- \param extraToken Extra tokens to be allocated.
759
- \param extraNameBufferSize Extra name buffer size (in number of Ch) to be allocated.
760
- \return Start of non-occupied name buffer, for storing extra names.
761
- */
762
- Ch* CopyFromRaw(const GenericPointer& rhs, size_t extraToken = 0, size_t extraNameBufferSize = 0) {
763
- if (!allocator_) // allocator is independently owned.
764
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
765
-
766
- size_t nameBufferSize = rhs.tokenCount_; // null terminators for tokens
767
- for (Token *t = rhs.tokens_; t != rhs.tokens_ + rhs.tokenCount_; ++t)
768
- nameBufferSize += t->length;
769
-
770
- tokenCount_ = rhs.tokenCount_ + extraToken;
771
- tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + (nameBufferSize + extraNameBufferSize) * sizeof(Ch)));
772
- nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);
773
- if (rhs.tokenCount_ > 0) {
774
- std::memcpy(tokens_, rhs.tokens_, rhs.tokenCount_ * sizeof(Token));
775
- }
776
- if (nameBufferSize > 0) {
777
- std::memcpy(nameBuffer_, rhs.nameBuffer_, nameBufferSize * sizeof(Ch));
778
- }
779
-
780
- // Adjust pointers to name buffer
781
- std::ptrdiff_t diff = nameBuffer_ - rhs.nameBuffer_;
782
- for (Token *t = tokens_; t != tokens_ + rhs.tokenCount_; ++t)
783
- t->name += diff;
784
-
785
- return nameBuffer_ + nameBufferSize;
786
- }
787
-
788
- //! Check whether a character should be percent-encoded.
789
- /*!
790
- According to RFC 3986 2.3 Unreserved Characters.
791
- \param c The character (code unit) to be tested.
792
- */
793
- bool NeedPercentEncode(Ch c) const {
794
- return !((c >= '0' && c <= '9') || (c >= 'A' && c <='Z') || (c >= 'a' && c <= 'z') || c == '-' || c == '.' || c == '_' || c =='~');
795
- }
796
-
797
- //! Parse a JSON String or its URI fragment representation into tokens.
798
- #ifndef __clang__ // -Wdocumentation
799
- /*!
800
- \param source Either a JSON Pointer string, or its URI fragment representation. Not need to be null terminated.
801
- \param length Length of the source string.
802
- \note Source cannot be JSON String Representation of JSON Pointer, e.g. In "/\u0000", \u0000 will not be unescaped.
803
- */
804
- #endif
805
- void Parse(const Ch* source, size_t length) {
806
- RAPIDJSON_ASSERT(source != NULL);
807
- RAPIDJSON_ASSERT(nameBuffer_ == 0);
808
- RAPIDJSON_ASSERT(tokens_ == 0);
809
-
810
- // Create own allocator if user did not supply.
811
- if (!allocator_)
812
- ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
813
-
814
- // Count number of '/' as tokenCount
815
- tokenCount_ = 0;
816
- for (const Ch* s = source; s != source + length; s++)
817
- if (*s == '/')
818
- tokenCount_++;
819
-
820
- Token* token = tokens_ = static_cast<Token *>(allocator_->Malloc(tokenCount_ * sizeof(Token) + length * sizeof(Ch)));
821
- Ch* name = nameBuffer_ = reinterpret_cast<Ch *>(tokens_ + tokenCount_);
822
- size_t i = 0;
823
-
824
- // Detect if it is a URI fragment
825
- bool uriFragment = false;
826
- if (source[i] == '#') {
827
- uriFragment = true;
828
- i++;
829
- }
830
-
831
- if (i != length && source[i] != '/') {
832
- parseErrorCode_ = kPointerParseErrorTokenMustBeginWithSolidus;
833
- goto error;
834
- }
835
-
836
- while (i < length) {
837
- RAPIDJSON_ASSERT(source[i] == '/');
838
- i++; // consumes '/'
839
-
840
- token->name = name;
841
- bool isNumber = true;
842
-
843
- while (i < length && source[i] != '/') {
844
- Ch c = source[i];
845
- if (uriFragment) {
846
- // Decoding percent-encoding for URI fragment
847
- if (c == '%') {
848
- PercentDecodeStream is(&source[i], source + length);
849
- GenericInsituStringStream<EncodingType> os(name);
850
- Ch* begin = os.PutBegin();
851
- if (!Transcoder<UTF8<>, EncodingType>().Validate(is, os) || !is.IsValid()) {
852
- parseErrorCode_ = kPointerParseErrorInvalidPercentEncoding;
853
- goto error;
854
- }
855
- size_t len = os.PutEnd(begin);
856
- i += is.Tell() - 1;
857
- if (len == 1)
858
- c = *name;
859
- else {
860
- name += len;
861
- isNumber = false;
862
- i++;
863
- continue;
864
- }
865
- }
866
- else if (NeedPercentEncode(c)) {
867
- parseErrorCode_ = kPointerParseErrorCharacterMustPercentEncode;
868
- goto error;
869
- }
870
- }
871
-
872
- i++;
873
-
874
- // Escaping "~0" -> '~', "~1" -> '/'
875
- if (c == '~') {
876
- if (i < length) {
877
- c = source[i];
878
- if (c == '0') c = '~';
879
- else if (c == '1') c = '/';
880
- else {
881
- parseErrorCode_ = kPointerParseErrorInvalidEscape;
882
- goto error;
883
- }
884
- i++;
885
- }
886
- else {
887
- parseErrorCode_ = kPointerParseErrorInvalidEscape;
888
- goto error;
889
- }
890
- }
891
-
892
- // First check for index: all of characters are digit
893
- if (c < '0' || c > '9')
894
- isNumber = false;
895
-
896
- *name++ = c;
897
- }
898
- token->length = static_cast<SizeType>(name - token->name);
899
- if (token->length == 0)
900
- isNumber = false;
901
- *name++ = '\0'; // Null terminator
902
-
903
- // Second check for index: more than one digit cannot have leading zero
904
- if (isNumber && token->length > 1 && token->name[0] == '0')
905
- isNumber = false;
906
-
907
- // String to SizeType conversion
908
- SizeType n = 0;
909
- if (isNumber) {
910
- for (size_t j = 0; j < token->length; j++) {
911
- SizeType m = n * 10 + static_cast<SizeType>(token->name[j] - '0');
912
- if (m < n) { // overflow detection
913
- isNumber = false;
914
- break;
915
- }
916
- n = m;
917
- }
918
- }
919
-
920
- token->index = isNumber ? n : kPointerInvalidIndex;
921
- token++;
922
- }
923
-
924
- RAPIDJSON_ASSERT(name <= nameBuffer_ + length); // Should not overflow buffer
925
- parseErrorCode_ = kPointerParseErrorNone;
926
- return;
927
-
928
- error:
929
- Allocator::Free(tokens_);
930
- nameBuffer_ = 0;
931
- tokens_ = 0;
932
- tokenCount_ = 0;
933
- parseErrorOffset_ = i;
934
- return;
935
- }
936
-
937
- //! Stringify to string or URI fragment representation.
938
- /*!
939
- \tparam uriFragment True for stringifying to URI fragment representation. False for string representation.
940
- \tparam OutputStream type of output stream.
941
- \param os The output stream.
942
- */
943
- template<bool uriFragment, typename OutputStream>
944
- bool Stringify(OutputStream& os) const {
945
- RAPIDJSON_ASSERT(IsValid());
946
-
947
- if (uriFragment)
948
- os.Put('#');
949
-
950
- for (Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
951
- os.Put('/');
952
- for (size_t j = 0; j < t->length; j++) {
953
- Ch c = t->name[j];
954
- if (c == '~') {
955
- os.Put('~');
956
- os.Put('0');
957
- }
958
- else if (c == '/') {
959
- os.Put('~');
960
- os.Put('1');
961
- }
962
- else if (uriFragment && NeedPercentEncode(c)) {
963
- // Transcode to UTF8 sequence
964
- GenericStringStream<typename ValueType::EncodingType> source(&t->name[j]);
965
- PercentEncodeStream<OutputStream> target(os);
966
- if (!Transcoder<EncodingType, UTF8<> >().Validate(source, target))
967
- return false;
968
- j += source.Tell() - 1;
969
- }
970
- else
971
- os.Put(c);
972
- }
973
- }
974
- return true;
975
- }
976
-
977
- //! A helper stream for decoding a percent-encoded sequence into code unit.
978
- /*!
979
- This stream decodes %XY triplet into code unit (0-255).
980
- If it encounters invalid characters, it sets output code unit as 0 and
981
- mark invalid, and to be checked by IsValid().
982
- */
983
- class PercentDecodeStream {
984
- public:
985
- typedef typename ValueType::Ch Ch;
986
-
987
- //! Constructor
988
- /*!
989
- \param source Start of the stream
990
- \param end Past-the-end of the stream.
991
- */
992
- PercentDecodeStream(const Ch* source, const Ch* end) : src_(source), head_(source), end_(end), valid_(true) {}
993
-
994
- Ch Take() {
995
- if (*src_ != '%' || src_ + 3 > end_) { // %XY triplet
996
- valid_ = false;
997
- return 0;
998
- }
999
- src_++;
1000
- Ch c = 0;
1001
- for (int j = 0; j < 2; j++) {
1002
- c = static_cast<Ch>(c << 4);
1003
- Ch h = *src_;
1004
- if (h >= '0' && h <= '9') c = static_cast<Ch>(c + h - '0');
1005
- else if (h >= 'A' && h <= 'F') c = static_cast<Ch>(c + h - 'A' + 10);
1006
- else if (h >= 'a' && h <= 'f') c = static_cast<Ch>(c + h - 'a' + 10);
1007
- else {
1008
- valid_ = false;
1009
- return 0;
1010
- }
1011
- src_++;
1012
- }
1013
- return c;
1014
- }
1015
-
1016
- size_t Tell() const { return static_cast<size_t>(src_ - head_); }
1017
- bool IsValid() const { return valid_; }
1018
-
1019
- private:
1020
- const Ch* src_; //!< Current read position.
1021
- const Ch* head_; //!< Original head of the string.
1022
- const Ch* end_; //!< Past-the-end position.
1023
- bool valid_; //!< Whether the parsing is valid.
1024
- };
1025
-
1026
- //! A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.
1027
- template <typename OutputStream>
1028
- class PercentEncodeStream {
1029
- public:
1030
- PercentEncodeStream(OutputStream& os) : os_(os) {}
1031
- void Put(char c) { // UTF-8 must be byte
1032
- unsigned char u = static_cast<unsigned char>(c);
1033
- static const char hexDigits[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
1034
- os_.Put('%');
1035
- os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u >> 4]));
1036
- os_.Put(static_cast<typename OutputStream::Ch>(hexDigits[u & 15]));
1037
- }
1038
- private:
1039
- OutputStream& os_;
1040
- };
1041
-
1042
- Allocator* allocator_; //!< The current allocator. It is either user-supplied or equal to ownAllocator_.
1043
- Allocator* ownAllocator_; //!< Allocator owned by this Pointer.
1044
- Ch* nameBuffer_; //!< A buffer containing all names in tokens.
1045
- Token* tokens_; //!< A list of tokens.
1046
- size_t tokenCount_; //!< Number of tokens in tokens_.
1047
- size_t parseErrorOffset_; //!< Offset in code unit when parsing fail.
1048
- PointerParseErrorCode parseErrorCode_; //!< Parsing error code.
1049
- };
1050
-
1051
- //! GenericPointer for Value (UTF-8, default allocator).
1052
- typedef GenericPointer<Value> Pointer;
1053
-
1054
- //!@name Helper functions for GenericPointer
1055
- //@{
1056
-
1057
- //////////////////////////////////////////////////////////////////////////////
1058
-
1059
- template <typename T>
1060
- typename T::ValueType& CreateValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::AllocatorType& a) {
1061
- return pointer.Create(root, a);
1062
- }
1063
-
1064
- template <typename T, typename CharType, size_t N>
1065
- typename T::ValueType& CreateValueByPointer(T& root, const CharType(&source)[N], typename T::AllocatorType& a) {
1066
- return GenericPointer<typename T::ValueType>(source, N - 1).Create(root, a);
1067
- }
1068
-
1069
- // No allocator parameter
1070
-
1071
- template <typename DocumentType>
1072
- typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer) {
1073
- return pointer.Create(document);
1074
- }
1075
-
1076
- template <typename DocumentType, typename CharType, size_t N>
1077
- typename DocumentType::ValueType& CreateValueByPointer(DocumentType& document, const CharType(&source)[N]) {
1078
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Create(document);
1079
- }
1080
-
1081
- //////////////////////////////////////////////////////////////////////////////
1082
-
1083
- template <typename T>
1084
- typename T::ValueType* GetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
1085
- return pointer.Get(root, unresolvedTokenIndex);
1086
- }
1087
-
1088
- template <typename T>
1089
- const typename T::ValueType* GetValueByPointer(const T& root, const GenericPointer<typename T::ValueType>& pointer, size_t* unresolvedTokenIndex = 0) {
1090
- return pointer.Get(root, unresolvedTokenIndex);
1091
- }
1092
-
1093
- template <typename T, typename CharType, size_t N>
1094
- typename T::ValueType* GetValueByPointer(T& root, const CharType (&source)[N], size_t* unresolvedTokenIndex = 0) {
1095
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
1096
- }
1097
-
1098
- template <typename T, typename CharType, size_t N>
1099
- const typename T::ValueType* GetValueByPointer(const T& root, const CharType(&source)[N], size_t* unresolvedTokenIndex = 0) {
1100
- return GenericPointer<typename T::ValueType>(source, N - 1).Get(root, unresolvedTokenIndex);
1101
- }
1102
-
1103
- //////////////////////////////////////////////////////////////////////////////
1104
-
1105
- template <typename T>
1106
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {
1107
- return pointer.GetWithDefault(root, defaultValue, a);
1108
- }
1109
-
1110
- template <typename T>
1111
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* defaultValue, typename T::AllocatorType& a) {
1112
- return pointer.GetWithDefault(root, defaultValue, a);
1113
- }
1114
-
1115
- #if RAPIDJSON_HAS_STDSTRING
1116
- template <typename T>
1117
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {
1118
- return pointer.GetWithDefault(root, defaultValue, a);
1119
- }
1120
- #endif
1121
-
1122
- template <typename T, typename T2>
1123
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
1124
- GetValueByPointerWithDefault(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 defaultValue, typename T::AllocatorType& a) {
1125
- return pointer.GetWithDefault(root, defaultValue, a);
1126
- }
1127
-
1128
- template <typename T, typename CharType, size_t N>
1129
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::ValueType& defaultValue, typename T::AllocatorType& a) {
1130
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
1131
- }
1132
-
1133
- template <typename T, typename CharType, size_t N>
1134
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const typename T::Ch* defaultValue, typename T::AllocatorType& a) {
1135
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
1136
- }
1137
-
1138
- #if RAPIDJSON_HAS_STDSTRING
1139
- template <typename T, typename CharType, size_t N>
1140
- typename T::ValueType& GetValueByPointerWithDefault(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& defaultValue, typename T::AllocatorType& a) {
1141
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
1142
- }
1143
- #endif
1144
-
1145
- template <typename T, typename CharType, size_t N, typename T2>
1146
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
1147
- GetValueByPointerWithDefault(T& root, const CharType(&source)[N], T2 defaultValue, typename T::AllocatorType& a) {
1148
- return GenericPointer<typename T::ValueType>(source, N - 1).GetWithDefault(root, defaultValue, a);
1149
- }
1150
-
1151
- // No allocator parameter
1152
-
1153
- template <typename DocumentType>
1154
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& defaultValue) {
1155
- return pointer.GetWithDefault(document, defaultValue);
1156
- }
1157
-
1158
- template <typename DocumentType>
1159
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* defaultValue) {
1160
- return pointer.GetWithDefault(document, defaultValue);
1161
- }
1162
-
1163
- #if RAPIDJSON_HAS_STDSTRING
1164
- template <typename DocumentType>
1165
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& defaultValue) {
1166
- return pointer.GetWithDefault(document, defaultValue);
1167
- }
1168
- #endif
1169
-
1170
- template <typename DocumentType, typename T2>
1171
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
1172
- GetValueByPointerWithDefault(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 defaultValue) {
1173
- return pointer.GetWithDefault(document, defaultValue);
1174
- }
1175
-
1176
- template <typename DocumentType, typename CharType, size_t N>
1177
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& defaultValue) {
1178
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
1179
- }
1180
-
1181
- template <typename DocumentType, typename CharType, size_t N>
1182
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* defaultValue) {
1183
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
1184
- }
1185
-
1186
- #if RAPIDJSON_HAS_STDSTRING
1187
- template <typename DocumentType, typename CharType, size_t N>
1188
- typename DocumentType::ValueType& GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& defaultValue) {
1189
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
1190
- }
1191
- #endif
1192
-
1193
- template <typename DocumentType, typename CharType, size_t N, typename T2>
1194
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
1195
- GetValueByPointerWithDefault(DocumentType& document, const CharType(&source)[N], T2 defaultValue) {
1196
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).GetWithDefault(document, defaultValue);
1197
- }
1198
-
1199
- //////////////////////////////////////////////////////////////////////////////
1200
-
1201
- template <typename T>
1202
- typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {
1203
- return pointer.Set(root, value, a);
1204
- }
1205
-
1206
- template <typename T>
1207
- typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::ValueType& value, typename T::AllocatorType& a) {
1208
- return pointer.Set(root, value, a);
1209
- }
1210
-
1211
- template <typename T>
1212
- typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const typename T::Ch* value, typename T::AllocatorType& a) {
1213
- return pointer.Set(root, value, a);
1214
- }
1215
-
1216
- #if RAPIDJSON_HAS_STDSTRING
1217
- template <typename T>
1218
- typename T::ValueType& SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {
1219
- return pointer.Set(root, value, a);
1220
- }
1221
- #endif
1222
-
1223
- template <typename T, typename T2>
1224
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
1225
- SetValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, T2 value, typename T::AllocatorType& a) {
1226
- return pointer.Set(root, value, a);
1227
- }
1228
-
1229
- template <typename T, typename CharType, size_t N>
1230
- typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {
1231
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
1232
- }
1233
-
1234
- template <typename T, typename CharType, size_t N>
1235
- typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::ValueType& value, typename T::AllocatorType& a) {
1236
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
1237
- }
1238
-
1239
- template <typename T, typename CharType, size_t N>
1240
- typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const typename T::Ch* value, typename T::AllocatorType& a) {
1241
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
1242
- }
1243
-
1244
- #if RAPIDJSON_HAS_STDSTRING
1245
- template <typename T, typename CharType, size_t N>
1246
- typename T::ValueType& SetValueByPointer(T& root, const CharType(&source)[N], const std::basic_string<typename T::Ch>& value, typename T::AllocatorType& a) {
1247
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
1248
- }
1249
- #endif
1250
-
1251
- template <typename T, typename CharType, size_t N, typename T2>
1252
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename T::ValueType&))
1253
- SetValueByPointer(T& root, const CharType(&source)[N], T2 value, typename T::AllocatorType& a) {
1254
- return GenericPointer<typename T::ValueType>(source, N - 1).Set(root, value, a);
1255
- }
1256
-
1257
- // No allocator parameter
1258
-
1259
- template <typename DocumentType>
1260
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {
1261
- return pointer.Set(document, value);
1262
- }
1263
-
1264
- template <typename DocumentType>
1265
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::ValueType& value) {
1266
- return pointer.Set(document, value);
1267
- }
1268
-
1269
- template <typename DocumentType>
1270
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const typename DocumentType::Ch* value) {
1271
- return pointer.Set(document, value);
1272
- }
1273
-
1274
- #if RAPIDJSON_HAS_STDSTRING
1275
- template <typename DocumentType>
1276
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, const std::basic_string<typename DocumentType::Ch>& value) {
1277
- return pointer.Set(document, value);
1278
- }
1279
- #endif
1280
-
1281
- template <typename DocumentType, typename T2>
1282
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
1283
- SetValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, T2 value) {
1284
- return pointer.Set(document, value);
1285
- }
1286
-
1287
- template <typename DocumentType, typename CharType, size_t N>
1288
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {
1289
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
1290
- }
1291
-
1292
- template <typename DocumentType, typename CharType, size_t N>
1293
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::ValueType& value) {
1294
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
1295
- }
1296
-
1297
- template <typename DocumentType, typename CharType, size_t N>
1298
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const typename DocumentType::Ch* value) {
1299
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
1300
- }
1301
-
1302
- #if RAPIDJSON_HAS_STDSTRING
1303
- template <typename DocumentType, typename CharType, size_t N>
1304
- typename DocumentType::ValueType& SetValueByPointer(DocumentType& document, const CharType(&source)[N], const std::basic_string<typename DocumentType::Ch>& value) {
1305
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
1306
- }
1307
- #endif
1308
-
1309
- template <typename DocumentType, typename CharType, size_t N, typename T2>
1310
- RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (typename DocumentType::ValueType&))
1311
- SetValueByPointer(DocumentType& document, const CharType(&source)[N], T2 value) {
1312
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Set(document, value);
1313
- }
1314
-
1315
- //////////////////////////////////////////////////////////////////////////////
1316
-
1317
- template <typename T>
1318
- typename T::ValueType& SwapValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer, typename T::ValueType& value, typename T::AllocatorType& a) {
1319
- return pointer.Swap(root, value, a);
1320
- }
1321
-
1322
- template <typename T, typename CharType, size_t N>
1323
- typename T::ValueType& SwapValueByPointer(T& root, const CharType(&source)[N], typename T::ValueType& value, typename T::AllocatorType& a) {
1324
- return GenericPointer<typename T::ValueType>(source, N - 1).Swap(root, value, a);
1325
- }
1326
-
1327
- template <typename DocumentType>
1328
- typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const GenericPointer<typename DocumentType::ValueType>& pointer, typename DocumentType::ValueType& value) {
1329
- return pointer.Swap(document, value);
1330
- }
1331
-
1332
- template <typename DocumentType, typename CharType, size_t N>
1333
- typename DocumentType::ValueType& SwapValueByPointer(DocumentType& document, const CharType(&source)[N], typename DocumentType::ValueType& value) {
1334
- return GenericPointer<typename DocumentType::ValueType>(source, N - 1).Swap(document, value);
1335
- }
1336
-
1337
- //////////////////////////////////////////////////////////////////////////////
1338
-
1339
- template <typename T>
1340
- bool EraseValueByPointer(T& root, const GenericPointer<typename T::ValueType>& pointer) {
1341
- return pointer.Erase(root);
1342
- }
1343
-
1344
- template <typename T, typename CharType, size_t N>
1345
- bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
1346
- return GenericPointer<typename T::ValueType>(source, N - 1).Erase(root);
1347
- }
1348
-
1349
- //@}
1350
-
1351
- RAPIDJSON_NAMESPACE_END
1352
-
1353
- #if defined(__clang__) || defined(_MSC_VER)
1354
- RAPIDJSON_DIAG_POP
1355
- #endif
1356
-
1357
- #endif // RAPIDJSON_POINTER_H_