Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
reader.h File Reference
#include "allocators.h"
#include "stream.h"
#include "encodedstream.h"
#include "internal/meta.h"
#include "internal/stack.h"
#include "internal/strtod.h"
#include <limits>
#include "error/error.h"
Include dependency graph for reader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BaseReaderHandler< Encoding, Derived >
 Default implementation of Handler. More...
 
class  internal::StreamLocalCopy< Stream, 1 >
 Do copy optimization. More...
 
class  internal::StreamLocalCopy< Stream, 0 >
 Keep reference. More...
 
class  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >
 SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. More...
 

Namespaces

namespace  internal
 

Macros

#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset)
 Macro to indicate a parse error.
 
#define RAPIDJSON_PARSE_ERROR(parseErrorCode, offset)
 (Internal) macro to indicate and handle a parse error.
 
#define RAPIDJSON_PARSE_DEFAULT_FLAGS   kParseNoFlags
 

Typedefs

typedef GenericReader< UTF8<>, UTF8<> > Reader
 Reader with UTF8 encoding and default allocator.
 

Enumerations

enum  ParseFlag {
  kParseNoFlags = 0 , kParseInsituFlag = 1 , kParseValidateEncodingFlag = 2 , kParseIterativeFlag = 4 ,
  kParseStopWhenDoneFlag = 8 , kParseFullPrecisionFlag = 16 , kParseCommentsFlag = 32 , kParseNumbersAsStringsFlag = 64 ,
  kParseTrailingCommasFlag = 128 , kParseNanAndInfFlag = 256 , kParseDefaultFlags = RAPIDJSON_PARSE_DEFAULT_FLAGS
}
 Combination of parseFlags. More...
 

Functions

template<typename InputStream >
void SkipWhitespace (InputStream &is)
 Skip the JSON white spaces in a stream.
 
const char * SkipWhitespace (const char *p, const char *end)
 

Macro Definition Documentation

◆ RAPIDJSON_PARSE_DEFAULT_FLAGS

#define RAPIDJSON_PARSE_DEFAULT_FLAGS   kParseNoFlags

Definition at line 139 of file reader.h.

Typedef Documentation

◆ Reader

typedef GenericReader<UTF8<>, UTF8<> > Reader

Definition at line 2217 of file reader.h.

Enumeration Type Documentation

◆ ParseFlag

enum ParseFlag
See also
Reader::Parse, Document::Parse, Document::ParseInsitu, Document::ParseStream
Enumerator
kParseNoFlags 

No flags are set.

kParseInsituFlag 

In-situ(destructive) parsing.

kParseValidateEncodingFlag 

Validate encoding of JSON strings.

kParseIterativeFlag 

Iterative(constant complexity in terms of function call stack size) parsing.

kParseStopWhenDoneFlag 

After parsing a complete JSON root from stream, stop further processing the rest of stream. When this flag is used, parser will not generate kParseErrorDocumentRootNotSingular error.

kParseFullPrecisionFlag 

Parse number in full precision (but slower).

kParseCommentsFlag 

Allow one-line (//) and multi-line (/‍**/) comments.

kParseNumbersAsStringsFlag 

Parse all numbers (ints/doubles) as strings.

kParseTrailingCommasFlag 

Allow trailing commas at the end of objects and arrays.

kParseNanAndInfFlag 

Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.

kParseDefaultFlags 

Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.

Definition at line 145 of file reader.h.

145 {
146 kParseNoFlags = 0,
147 kParseInsituFlag = 1,
152 kParseCommentsFlag = 32,
155 kParseNanAndInfFlag = 256,
157};
#define RAPIDJSON_PARSE_DEFAULT_FLAGS
Definition reader.h:139
@ kParseFullPrecisionFlag
Parse number in full precision (but slower).
Definition reader.h:151
@ kParseInsituFlag
In-situ(destructive) parsing.
Definition reader.h:147
@ kParseNoFlags
No flags are set.
Definition reader.h:146
@ kParseCommentsFlag
Allow one-line (//) and multi-line (/‍**/) comments.
Definition reader.h:152
@ kParseDefaultFlags
Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.
Definition reader.h:156
@ kParseTrailingCommasFlag
Allow trailing commas at the end of objects and arrays.
Definition reader.h:154
@ kParseNanAndInfFlag
Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubles.
Definition reader.h:155
@ kParseValidateEncodingFlag
Validate encoding of JSON strings.
Definition reader.h:148
@ kParseNumbersAsStringsFlag
Parse all numbers (ints/doubles) as strings.
Definition reader.h:153
@ kParseIterativeFlag
Iterative(constant complexity in terms of function call stack size) parsing.
Definition reader.h:149
@ kParseStopWhenDoneFlag
After parsing a complete JSON root from stream, stop further processing the rest of stream....
Definition reader.h:150

Function Documentation

◆ SkipWhitespace() [1/2]

const char * SkipWhitespace ( const char * p,
const char * end )
inline

Definition at line 273 of file reader.h.

273 {
274 while (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t'))
275 ++p;
276 return p;
277}
const mie::Vuint & p
Definition bn.cpp:27

◆ SkipWhitespace() [2/2]

template<typename InputStream >
void SkipWhitespace ( InputStream & is)
Parameters
isA input stream for skipping white spaces.
Note
This function has SSE2/SSE4.2 specialization.

Definition at line 264 of file reader.h.

264 {
266 InputStream& s(copy.s);
267
268 typename InputStream::Ch c;
269 while ((c = s.Peek()) == ' ' || c == '\n' || c == '\r' || c == '\t')
270 s.Take();
271}
void copy(const path &from, const path &to)
char * s
Here is the caller graph for this function: