Torque3D Documentation / _generateds / rapidjson::GenericDocument

rapidjson::GenericDocument

Engine/source/persistence/rapidjson/document.h

A document for parsing JSON text as DOM.

More...

Public Types

AllocatorType 

Allocator type from template parameter.

Encoding::Ch
Ch 

Character type derived from Encoding.

ValueType 

Value type of the document.

Private Static Attributes

Private Attributes

Public Functions

GenericDocument(Allocator * allocator, size_t stackCapacity)

Constructor.

Bool(bool b)
Double(double d)
EndArray(SizeType elementCount)
EndObject(SizeType memberCount)

Get the allocator of this document.

size_t

Get the offset in character of the parsing error.

const char *

Get the message of parsing error.

size_t

Get the capacity of stack in bytes.

bool

Whether a parse error was occured in the last parsing.

Int(int i)
Parse(const Ch * str)

Parse JSON text from a read-only string.

ParseInsitu(Ch * str)

Parse JSON text from a mutable string.

ParseStream(InputStream & is)

Parse JSON text from an input stream.

String(const Ch * str, SizeType length, bool copy)
Uint(unsigned i)

Detailed Description

A document for parsing JSON text as DOM.

Parameters:

encoding for both parsing and string storage.

Alloactor

allocator for allocating memory for the DOM, and the stack during parsing.

Public Types

typedef Allocator AllocatorType 

Allocator type from template parameter.

typedef Encoding::Ch Ch 

Character type derived from Encoding.

typedef GenericValue< Encoding, Allocator > ValueType 

Value type of the document.

Private Static Attributes

const size_t kDefaultStackCapacity 

Private Attributes

size_t errorOffset_ 
const char * parseError_ 
internal::Stack< Allocator > stack_ 

Public Functions

GenericDocument(Allocator * allocator, size_t stackCapacity)

Constructor.

Parameters:

allocator

Optional allocator for allocating stack memory.

stackCapacity

Initial capacity of stack in bytes.

Bool(bool b)

Double(double d)

EndArray(SizeType elementCount)

EndObject(SizeType memberCount)

GetAllocator()

Get the allocator of this document.

GetErrorOffset()

Get the offset in character of the parsing error.

GetParseError()

Get the message of parsing error.

GetStackCapacity()

Get the capacity of stack in bytes.

HasParseError()

Whether a parse error was occured in the last parsing.

Int(int i)

Int64(int64_t i)

Null()

Parse(const Ch * str)

Parse JSON text from a read-only string.

Parameters:

parseFlags

Combination of ParseFlag (must not contain kParseInsituFlag).

Parameters:
str

Read-only zero-terminated string to be parsed.

Parse(const Ch * str)

ParseInsitu(Ch * str)

Parse JSON text from a mutable string.

Parameters:

parseFlags

Combination of ParseFlag.

Parameters:
str

Mutable zero-terminated string to be parsed.

return:

The document itself for fluent API.

ParseInsitu(Ch * str)

ParseStream(InputStream & is)

Parse JSON text from an input stream.

Parameters:

parseFlags

Combination of ParseFlag.

Parameters:
stream

Input stream to be parsed.

return:

The document itself for fluent API.

StartArray()

StartObject()

String(const Ch * str, SizeType length, bool copy)

Uint(unsigned i)

Uint64(uint64_t i)

Private Functions

ClearStack()

operator=(const GenericDocument & )