rapidjson::GenericDocument
Engine/source/persistence/rapidjson/document.h
A document for parsing JSON text as DOM.
Public Types
Private Static Attributes
const size_t
Private Attributes
Public Functions
GenericDocument(Allocator * allocator, size_t stackCapacity)
Constructor.
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.
ParseInsitu(Ch * str)
Parse JSON text from a mutable string.
ParseInsitu(Ch * str)
ParseStream(InputStream & is)
Parse JSON text from an input stream.
Private Functions
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). |
| 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. |
| str | Mutable zero-terminated string to be parsed. |
The document itself for fluent API.
ParseInsitu(Ch * str)
ParseStream(InputStream & is)
Parse JSON text from an input stream.
Parameters:
| parseFlags | Combination of ParseFlag. |
| stream | Input stream to be parsed. |
The document itself for fluent API.
StartArray()
StartObject()
String(const Ch * str, SizeType length, bool copy)
Uint(unsigned i)
Uint64(uint64_t i)
