rapidjson

Engine/source/persistence/rapidjson/allocators.h

More...

Classes:

class

Dynamically select encoding according to stream's runtime-specified UTF encoding type.

class

Input stream wrapper with dynamically bound encoding and automatic encoding detection.

class

Output stream wrapper with dynamically bound encoding and automatic encoding detection.

class

Default implementation of Handler.

class

C-runtime library allocator.

class

Input byte stream wrapper with a statically bound encoding.

class

Output byte stream wrapper with statically bound encoding.

class

File byte stream for input using fread().

class

(Depreciated) Wrapper of C file stream for input or output.

class

Wrapper of C file stream for input using fread().

class

A document for parsing JSON text as DOM.

class

A read-write string stream.

class

SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.

class

Represents an in-memory output stream.

class

Read-only string stream.

class

Represents a JSON value. Use Value for UTF8 encoding and default allocator.

class

Default memory allocator used by the parser and DOM.

class

Writer with indentation and spacing.

class

Specialization of Transcoder with same source and target encoding.

class

UTF-16 encoding.

class

UTF-16 big endian encoding.

class

UTF-16 little endian encoding.

class

UTF-32 encoding.

class

UTF-32 big endian encoding.

class

UTF-32 little endian enocoding.

class

UTF-8 encoding.

class

JSON writer.

Namespaces:

Public Enumerations

enum
ParseFlag {
  kParseDefaultFlags = 0
  kParseInsituFlag = 1
  kParseValidateEncodingFlag = 2
}

Combination of parseFlags.

enum
Type {
  kNullType = 0
  kFalseType = 1
  kTrueType = 2
  kObjectType = 3
  kArrayType = 4
  kStringType = 5
  kNumberType = 6
}

Type of JSON value.

enum
UTFType {
  kUTF8 = 0
  kUTF16LE = 1
  kUTF16BE = 2
  kUTF32LE = 3
  kUTF32BE = 4
}

Runtime-specified UTF encoding type of a stream.

Public Typedefs

Document 
InsituStringStream 
Reader 

Reader with UTF8 encoding and default allocator.

unsigned
SizeType 

Use 32-bit array/string indices even for 64-bit platform, instead of using size_t.

StringBuffer 
StringStream 
Value 

Value with UTF8 encoding.

Public Functions

PutN(FileWriteStream & stream, char c, size_t n)

Implement specialized version of PutN() with memset() for better performance.

PutN(GenericStringBuffer< UTF8<> > & stream, char c, size_t n)

Implement specialized version of PutN() with memset() for better performance.

PutN(Stream & stream, Ch c, size_t n)

Put N copies of a character to a stream.

SkipWhitespace(InputStream & is)

Skip the JSON white spaces in a stream.

Detailed Description

Public Enumerations

ParseFlag

Enumerator

kParseDefaultFlags = 0

Default parse flags. Non-destructive parsing. Text strings are decoded into allocated buffer.

kParseInsituFlag = 1

In-situ(destructive) parsing.

kParseValidateEncodingFlag = 2

Validate encoding of JSON strings.

Combination of parseFlags.

Type

Enumerator

kNullType = 0

null

kFalseType = 1

false

kTrueType = 2

true

kObjectType = 3

object

kArrayType = 4

array

kStringType = 5

string

kNumberType = 6

number

Type of JSON value.

UTFType

Enumerator

kUTF8 = 0

UTF-8.

kUTF16LE = 1

UTF-16 little endian.

kUTF16BE = 2

UTF-16 big endian.

kUTF32LE = 3

UTF-32 little endian.

kUTF32BE = 4

UTF-32 big endian.

Runtime-specified UTF encoding type of a stream.

Public Typedefs

typedef GenericDocument< UTF8<> > Document 
typedef GenericInsituStringStream< UTF8<> > InsituStringStream 
typedef GenericReader< UTF8<>, UTF8<> > Reader 

Reader with UTF8 encoding and default allocator.

typedef unsigned SizeType 

Use 32-bit array/string indices even for 64-bit platform, instead of using size_t.

User may override the SizeType by defining RAPIDJSON_NO_SIZETYPEDEFINE.

typedef GenericStringBuffer< UTF8<> > StringBuffer 
typedef GenericStringStream< UTF8<> > StringStream 
typedef GenericValue< UTF8<> > Value 

Value with UTF8 encoding.

Public Functions

PutN(FileWriteStream & stream, char c, size_t n)

Implement specialized version of PutN() with memset() for better performance.

PutN(GenericStringBuffer< UTF8<> > & stream, char c, size_t n)

Implement specialized version of PutN() with memset() for better performance.

PutN(Stream & stream, Ch c, size_t n)

Put N copies of a character to a stream.

SkipWhitespace(InputStream & is)

Skip the JSON white spaces in a stream.

Parameters:

stream

A input stream for skipping white spaces.

note:

This function has SSE2/SSE4.2 specialization.