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
53b27ac8
Commit
53b27ac8
authored
Jul 05, 2014
by
Philipp A. Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GenericReader: improve doxygen documentation
parent
ec8f26e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
reader.h
include/rapidjson/reader.h
+17
-8
No files found.
include/rapidjson/reader.h
View file @
53b27ac8
...
...
@@ -43,6 +43,8 @@ namespace rapidjson {
// ParseFlag
//! Combination of parseFlags
/*! \see Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream
*/
enum
ParseFlag
{
kParseDefaultFlags
=
0
,
//!< Default parse flags. Non-destructive parsing. Text strings are decoded into allocated buffer.
kParseInsituFlag
=
1
,
//!< In-situ(destructive) parsing.
...
...
@@ -257,7 +259,7 @@ template<> inline void SkipWhitespace(StringStream& is) {
///////////////////////////////////////////////////////////////////////////////
// GenericReader
//! SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.
//! SAX-style JSON parser. Use
\ref
Reader for UTF8 encoding and default allocator.
/*! GenericReader parses JSON text from a stream, and send events synchronously to an
object implementing Handler concept.
...
...
@@ -276,7 +278,7 @@ template<> inline void SkipWhitespace(StringStream& is) {
template
<
typename
SourceEncoding
,
typename
TargetEncoding
,
typename
Allocator
=
MemoryPoolAllocator
<>
>
class
GenericReader
{
public
:
typedef
typename
SourceEncoding
::
Ch
Ch
;
typedef
typename
SourceEncoding
::
Ch
Ch
;
//!< SourceEncoding character type
//! Constructor.
/*! \param allocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing)
...
...
@@ -285,12 +287,12 @@ public:
GenericReader
(
Allocator
*
allocator
=
0
,
size_t
stackCapacity
=
kDefaultStackCapacity
)
:
stack_
(
allocator
,
stackCapacity
),
parseErrorCode_
(
kParseErrorNone
),
errorOffset_
(
0
)
{}
//! Parse JSON text.
/*! \tparam parseFlags Combination of
ParseFlag.
\tparam InputStream Type of input stream
.
\tparam Handler Type of handler which must implement
Handler concept.
\param is Input stream to be parsed.
\param handler The handler to receive events.
\return Whether the parsing is successful.
/*! \tparam parseFlags Combination of
\ref ParseFlag.
\tparam InputStream Type of input stream, implementing Stream concept
.
\tparam Handler Type of handler, implementing
Handler concept.
\param is Input stream to be parsed.
\param handler The handler to receive events.
\return Whether the parsing is successful.
*/
template
<
unsigned
parseFlags
,
typename
InputStream
,
typename
Handler
>
bool
Parse
(
InputStream
&
is
,
Handler
&
handler
)
{
...
...
@@ -321,6 +323,13 @@ public:
return
!
HasParseError
();
}
//! Parse JSON text (with \ref kParseDefaultFlags)
/*! \tparam InputStream Type of input stream, implementing Stream concept
\tparam Handler Type of handler, implementing Handler concept.
\param is Input stream to be parsed.
\param handler The handler to receive events.
\return Whether the parsing is successful.
*/
template
<
typename
InputStream
,
typename
Handler
>
bool
Parse
(
InputStream
&
is
,
Handler
&
handler
)
{
return
Parse
<
kParseDefaultFlags
>
(
is
,
handler
);
...
...
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