TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
reader.h File Reference
#include "rapidjson.h"
#include "encodings.h"
#include "internal/meta.h"
#include "internal/stack.h"
#include "internal/strtod.h"
#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...
 
singleton  internal::StreamLocalCopy< Stream, int >
 
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...
 
struct  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::ClearStackOnExit
 
class  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::StackStream< CharType >
 
singleton  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::NumberStream< InputStream, backup >
 
class  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::NumberStream< InputStream, false >
 
class  GenericReader< SourceEncoding, TargetEncoding, StackAllocator >::NumberStream< InputStream, true >
 

Namespaces

 internal
 

Macros

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

Typedefs

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

Enumerations

enum  ParseFlag {
  kParseNoFlags = 0, kParseInsituFlag = 1, kParseValidateEncodingFlag = 2, kParseIterativeFlag = 4,
  kParseStopWhenDoneFlag = 8, kParseFullPrecisionFlag = 16, 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. More...
 

Macro Definition Documentation

#define RAPIDJSON_PARSE_DEFAULT_FLAGS   kParseNoFlags

Typedef Documentation

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

Reader with UTF8 encoding and default allocator.

Enumeration Type Documentation

enum ParseFlag

Combination of parseFlags.

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).

kParseDefaultFlags 

Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS.

136  {
137  kParseNoFlags = 0,
138  kParseInsituFlag = 1,
140  kParseIterativeFlag = 4,
144 };
Iterative(constant complexity in terms of function call stack size) parsing.
Definition: reader.h:140
No flags are set.
Definition: reader.h:137
After parsing a complete JSON root from stream, stop further processing the rest of stream...
Definition: reader.h:141
Default parse flags. Can be customized by defining RAPIDJSON_PARSE_DEFAULT_FLAGS. ...
Definition: reader.h:143
Parse number in full precision (but slower).
Definition: reader.h:142
#define RAPIDJSON_PARSE_DEFAULT_FLAGS
Definition: reader.h:130
Validate encoding of JSON strings.
Definition: reader.h:139
In-situ(destructive) parsing.
Definition: reader.h:138

Function Documentation

template<typename InputStream >
void SkipWhitespace ( InputStream &  is)

Skip the JSON white spaces in a stream.

Parameters
isA input stream for skipping white spaces.
Note
This function has SSE2/SSE4.2 specialization.
247  {
249  InputStream& s(copy.s);
250 
251  while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t')
252  s.Take();
253 }
Definition: reader.h:208

+ Here is the caller graph for this function: