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
27101d9c
Commit
27101d9c
authored
Jul 13, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API doc for Writer::Reset() and Writer::IsComplete()
parent
5babae98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
writer.h
include/rapidjson/writer.h
+22
-0
No files found.
include/rapidjson/writer.h
View file @
27101d9c
...
...
@@ -44,6 +44,24 @@ public:
os_
(
&
os
),
level_stack_
(
allocator
,
levelDepth
*
sizeof
(
Level
)),
doublePrecision_
(
kDefaultDoublePrecision
),
hasRoot_
(
false
)
{}
//! Reset the writer with a new stream.
/*!
This function reset the writer with a new stream and default settings,
in order to make a Writer object reusable for output multiple JSONs.
\param os New output stream.
\code
Writer<OutputStream> writer(os1);
writer.StartObject();
// ...
writer.EndObject();
writer.Reset(os2);
writer.StartObject();
// ...
writer.EndObject();
\endcode
*/
void
Reset
(
OutputStream
&
os
)
{
os_
=
&
os
;
doublePrecision_
=
kDefaultDoublePrecision
;
...
...
@@ -51,6 +69,10 @@ public:
level_stack_
.
Clear
();
}
//! Checks whether the output is a complete JSON.
/*!
A complete JSON has a complete root object or array.
*/
bool
IsComplete
()
const
{
return
hasRoot_
&&
level_stack_
.
Empty
();
}
...
...
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