1452 Commits

Author SHA1 Message Date
Milo Yip
99ea434eef Typo in readme 2014-07-04 10:36:15 +08:00
Milo Yip
3e4e68b099 Rearrange diagrams and fix typos in tutorial 2014-07-04 10:35:29 +08:00
Milo Yip
7bd3b17fbd Merge pull request #48 from miloyip/Swap
Safer implementation of Swap()
2014-07-04 09:09:12 +08:00
Milo Yip
9ed11d29a2 Safer implementation of Swap()
Also added documentation, unit tests for swapping Document/Value,
Document/Document.
2014-07-04 00:59:16 +08:00
Milo Yip
a96b699396 Merge pull request #46 from pah/cleanup/misc
Miscellaneous cleanups
2014-07-03 23:50:53 +08:00
Milo Yip
23318f2557 Complete tutorial draft 2014-07-03 23:46:30 +08:00
Philipp A. Hartmann
3254a784bb add missing 'typename' 2014-07-03 17:13:17 +02:00
Philipp A. Hartmann
c8673ef3de GenericReader::ParseNumber: consistently use s.Tell()
The error messages in ParseNumber used `is.Tell` to report the
position of the number parsing error.  Depending on the copy
optimization of the current stream, this can lead to different
behaviour (beginning of number vs. position of error).
2014-07-03 17:07:14 +02:00
Philipp A. Hartmann
249529f039 avoid truncation warning on MSVC 2014-07-03 17:07:07 +02:00
Philipp A. Hartmann
afa8279d8a GenericValue: drop duplicate/unneeded code
* Delegate constant string construction to SetStringRaw
 * Delegate "const Ch*" overloads to GenericValue variants
   of operator[], FindMember and RemoveMember
 * Remove repeated template arguments in nested struct Array

(cherry-picked from ca9b0332d)
2014-07-03 17:06:36 +02:00
Philipp A. Hartmann
d178fd4e94 Parse*: explicitly spell out kParseDefaultFlags
Instead of hard-coding the value 0 for the parseFlags in the
various parsing overloads, explicitly use kParseDefaultFlags
to provide more self-documenting code.
2014-07-03 17:06:35 +02:00
Philipp A. Hartmann
6b7f346437 ParseErrorCode: fix typo (NumberTooBig) 2014-07-03 17:06:35 +02:00
Philipp A. Hartmann
a22f325ae4 perftest: fix typo 2014-07-03 17:06:35 +02:00
Philipp A. Hartmann
f7204e78d0 .gitignore: exclude tracked directories in bin/ 2014-07-03 17:06:35 +02:00
Milo Yip
80a5b9093c In Value.CopyFrom unit test, run both allocators.
@pah
2014-07-03 22:57:09 +08:00
Milo Yip
d0146c4476 Merge pull request #45 from miloyip/Swap
Added GenericValue::Swap()
2014-07-03 22:45:02 +08:00
Milo Yip
1aa84342ba Added GenericValue::Swap() 2014-07-03 22:38:34 +08:00
Milo Yip
009c4005b2 Fixes 'not' keyword that is not supported by Visual Studio by default 2014-07-03 22:37:42 +08:00
Milo Yip
28294fa754 Merge pull request #44 from pah/feature/memberiterator
Add explicit MemberIterator, return MemberEnd() from FindMember()
2014-07-03 22:23:58 +08:00
Philipp A. Hartmann
5835750259 GenericMemberIterator: fixup some formatting and documentation
No functional changes.
2014-07-03 15:18:01 +02:00
Philipp A. Hartmann
78c75de22c tutorial.cpp: update for FindMember change
* use MemberIterator instead of plain pointer
 * check against MemberEnd() instead of NULL
2014-07-03 15:04:04 +02:00
Philipp A. Hartmann
86c47a6a8b document.h: move inclusion of template meta functions
In order to activate the suppression of "-Weffc++" warnings in the
template meta function classes (non-virtual destructor), move the
inclusion of the meta-function header `internal/meta.h` after the
suppression pragma.
2014-07-03 14:56:43 +02:00
Philipp A. Hartmann
43737ef310 GenericValue::FindMember: return MemberEnd, if member doesn't exist 2014-07-03 14:33:56 +02:00
Philipp A. Hartmann
17a8804cf3 document.h: add GenericMemberIterator
Add dedicated class-based member iterator to prepare the switch to a
(safe) API change to return MemberEnd() from FindMember().

Pointer-based iterator can be kept by defining
RAPIDJSON_NOMEMBERITERATORCLASS. This may be useful for platforms without
a working <iterator> header.
2014-07-03 14:29:57 +02:00
Philipp A. Hartmann
05179e2891 internal/meta.h: add some template meta functions
* Add/RemoveConst
 * IsSame, IsConst, IsMoreConst
 * Enable/DisableIf (including helper macro)
2014-07-03 14:24:58 +02:00
miloyip
f3fa423de0 Updates "Create/Modify Values" section 2014-07-03 19:20:33 +08:00
Milo Yip
0bce2dedd2 Merge pull request #42 from pah/cleanup/streamcopy
GenericReader: simplify local stream copy optimization
2014-07-03 13:14:16 +08:00
Philipp A. Hartmann
7890a1b17a StreamLocalCopy: move to reader.h
Eventually move to internal header `internal/streamcopy.h`?

Based on 088e8173.
2014-07-02 21:28:41 +02:00
Philipp A. Hartmann
f6903f79d4 GenericReader: simplify local stream copy optimization
rapidjson.h:
 * StreamLocalCopy: add default argument to copy optimization selector
   based on StreamTraits of Stream parameter
 * drop operator->, operator*
 * make Stream (reference) member public
 * drop empty destructor

reader.h:
 * add local references, initialized from "copy"
   (reverts algorithmic bodies back to plain 's.xx()')
2014-07-02 20:51:10 +02:00
Milo Yip
ebbfaf1c13 Fixes premake4 script for VS 2014-07-03 01:59:13 +08:00
Milo Yip
104c3954bd Revert "Fixes premake4 for VS"
This reverts commit 63757f6405e327b100cc51e35fdf8cf32b5cc286.
2014-07-03 01:51:08 +08:00
Milo Yip
63757f6405 Fixes premake4 for VS 2014-07-03 01:50:12 +08:00
Milo Yip
feb5dde7e5 Merge pull request #40 from miloyip/warning
Fix/Suppress all -Wall -Wextra -Weffc++ warnings on gcc 4.6.x - 4.8.x
2014-07-03 01:48:15 +08:00
Milo Yip
49b1a12799 Fixes two other warning about unused fread() return value 2014-07-03 01:24:52 +08:00
Milo Yip
0815f0560a Fixes a warning about unused fread() return value 2014-07-03 01:17:58 +08:00
Milo Yip
e4188c8040 Fixes a warning in release. 2014-07-03 01:11:52 +08:00
Milo Yip
1e99f0b537 Merge remote-tracking branch 'origin/master' into warning 2014-07-03 01:00:01 +08:00
Milo Yip
5a186104f4 Fixes warnings 2014-07-03 00:59:35 +08:00
Milo Yip
0c81ed7724 Merge pull request #39 from miloyip/LocalCopyOptimization
Fixes local copy optimization
2014-07-03 00:57:05 +08:00
Milo Yip
2a9c7a9ffa Makes FileReadStream not using local copy optimization 2014-07-03 00:25:45 +08:00
Milo Yip
9aec8d6ad4 Fixes local copy optimization
The previous optimization #32 has problem that restoration requires
assignment operator.
Change the backup/restore process using a template wrapper class to
select code path.
2014-07-02 23:49:47 +08:00
miloyip
f3ac1de589 Added creatie/modify value section to tutorial 2014-07-02 19:13:14 +08:00
Milo Yip
553a251b5a Update tutorial.md 2014-07-02 00:41:49 +08:00
Milo Yip
dfcf4f26dd Update tutorial.md 2014-07-02 00:35:42 +08:00
Milo Yip
a74c5da9da Update tutorial.md 2014-07-02 00:31:30 +08:00
Milo Yip
c1035cb970 Update tutorial.md 2014-07-02 00:29:33 +08:00
Milo Yip
cbc2c46bb8 Update tutorial.md
Fixes table
2014-07-02 00:27:27 +08:00
Milo Yip
bc2daea2f6 Add other query sections in tutorial 2014-07-02 00:20:36 +08:00
miloyip
84a4ff85c5 tutorial draft 2014-07-01 19:17:44 +08:00
Milo Yip
5852c42bb9 Update features.md 2014-07-01 12:56:40 +08:00