Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
709daab1
Commit
709daab1
authored
Jul 04, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #369 from mloskot/typed-ctor
Add GenericDocument ctor overload to specify JSON type.
parents
eb5818a5
81978052
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
document.h
include/rapidjson/document.h
+16
-1
No files found.
include/rapidjson/document.h
View file @
709daab1
...
...
@@ -1749,7 +1749,22 @@ public:
typedef
Allocator
AllocatorType
;
//!< Allocator type from template parameter.
//! Constructor
/*! \param allocator Optional allocator for allocating memory.
/*! Creates an empty document of specified type.
\param type Mandatory type of object to create.
\param allocator Optional allocator for allocating memory.
\param stackCapacity Optional initial capacity of stack in bytes.
\param stackAllocator Optional allocator for allocating memory for stack.
*/
explicit
GenericDocument
(
Type
type
,
Allocator
*
allocator
=
0
,
size_t
stackCapacity
=
kDefaultStackCapacity
,
StackAllocator
*
stackAllocator
=
0
)
:
GenericValue
<
Encoding
,
Allocator
>
(
type
),
allocator_
(
allocator
),
ownAllocator_
(
0
),
stack_
(
stackAllocator
,
stackCapacity
),
parseResult_
()
{
if
(
!
allocator_
)
ownAllocator_
=
allocator_
=
RAPIDJSON_NEW
(
Allocator
());
}
//! Constructor
/*! Creates an empty document which type is Null.
\param allocator Optional allocator for allocating memory.
\param stackCapacity Optional initial capacity of stack in bytes.
\param stackAllocator Optional allocator for allocating memory for stack.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment