|
typedef Allocator | AllocatorType |
| Allocator type from template parameter. More...
|
|
typedef GenericArray< false, ValueType > | Array |
|
typedef Encoding::Ch | Ch |
| Character type derived from Encoding. More...
|
|
typedef GenericArray< true, ValueType > | ConstArray |
|
typedef GenericMemberIterator< true, Encoding, RAPIDJSON_DEFAULT_ALLOCATOR >::Iterator | ConstMemberIterator |
| Constant member iterator for iterating in object. More...
|
|
typedef GenericObject< true, ValueType > | ConstObject |
|
typedef const GenericValue * | ConstValueIterator |
| Constant value iterator for iterating in array. More...
|
|
typedef Encoding | EncodingType |
| Encoding type from template parameter. More...
|
|
typedef GenericMember< Encoding, RAPIDJSON_DEFAULT_ALLOCATOR > | Member |
| Name-value pair in an object. More...
|
|
typedef GenericMemberIterator< false, Encoding, RAPIDJSON_DEFAULT_ALLOCATOR >::Iterator | MemberIterator |
| Member iterator for iterating in object. More...
|
|
typedef GenericObject< false, ValueType > | Object |
|
typedef GenericStringRef< Ch > | StringRefType |
| Reference to a constant string. More...
|
|
typedef GenericValue * | ValueIterator |
| Value iterator for iterating in array. More...
|
|
typedef GenericValue< Encoding, Allocator > | ValueType |
| Value type of the document. More...
|
|
|
bool | Bool (bool b) |
|
bool | Double (double d) |
|
bool | EndArray (SizeType elementCount) |
|
bool | EndObject (SizeType memberCount) |
|
| GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. More...
|
|
| GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. More...
|
|
Allocator & | GetAllocator () |
| Get the allocator of this document. More...
|
|
size_t | GetStackCapacity () const |
| Get the capacity of stack in bytes. More...
|
|
bool | Int (int i) |
|
bool | Int64 (int64_t i) |
|
bool | Key (const Ch *str, SizeType length, bool copy) |
|
bool | Null () |
|
template<typename Generator > |
GenericDocument & | Populate (Generator &g) |
| Populate this document by a generator which produces SAX events. More...
|
|
bool | RawNumber (const Ch *str, SizeType length, bool copy) |
|
bool | StartArray () |
|
bool | StartObject () |
|
bool | String (const Ch *str, SizeType length, bool copy) |
|
GenericDocument & | Swap (GenericDocument &rhs) RAPIDJSON_NOEXCEPT |
| Exchange the contents of this document with those of another. More...
|
|
bool | Uint (unsigned i) |
|
bool | Uint64 (uint64_t i) |
|
|
template<unsigned parseFlags, typename SourceEncoding , typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream (with Encoding conversion) More...
|
|
template<unsigned parseFlags, typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream. More...
|
|
template<typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream (with kParseDefaultFlags) More...
|
|
|
template<unsigned parseFlags> |
GenericDocument & | ParseInsitu (Ch *str) |
| Parse JSON text from a mutable string. More...
|
|
GenericDocument & | ParseInsitu (Ch *str) |
| Parse JSON text from a mutable string (with kParseDefaultFlags) More...
|
|
|
template<unsigned parseFlags, typename SourceEncoding > |
GenericDocument & | Parse (const typename SourceEncoding::Ch *str) |
| Parse JSON text from a read-only string (with Encoding conversion) More...
|
|
template<unsigned parseFlags> |
GenericDocument & | Parse (const Ch *str) |
| Parse JSON text from a read-only string. More...
|
|
GenericDocument & | Parse (const Ch *str) |
| Parse JSON text from a read-only string (with kParseDefaultFlags) More...
|
|
template<unsigned parseFlags, typename SourceEncoding > |
GenericDocument & | Parse (const typename SourceEncoding::Ch *str, size_t length) |
|
template<unsigned parseFlags> |
GenericDocument & | Parse (const Ch *str, size_t length) |
|
GenericDocument & | Parse (const Ch *str, size_t length) |
|
|
bool | HasParseError () const |
| Whether a parse error has occurred in the last parsing. More...
|
|
ParseErrorCode | GetParseError () const |
| Get the ParseErrorCode of last parsing. More...
|
|
size_t | GetErrorOffset () const |
| Get the position of last parsing error in input, 0 otherwise. More...
|
|
| operator ParseResult () const |
| Implicit conversion to get the last parse result. More...
|
|
|
enum | |
|
| RAPIDJSON_DISABLEIF_RETURN ((internal::IsPointer< T >),(GenericValue &)) operator |
| Assignment with primitive types. More...
|
|
RAPIDJSON_FORCEINLINE const Ch * | GetStringPointer () const |
|
RAPIDJSON_FORCEINLINE const Ch * | SetStringPointer (const Ch *str) |
|
RAPIDJSON_FORCEINLINE GenericValue * | GetElementsPointer () const |
|
RAPIDJSON_FORCEINLINE GenericValue * | SetElementsPointer (GenericValue *elements) |
|
RAPIDJSON_FORCEINLINE Member * | GetMembersPointer () const |
|
RAPIDJSON_FORCEINLINE Member * | SetMembersPointer (Member *members) |
|
void | SetArrayRaw (GenericValue *values, SizeType count, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
|
void | SetObjectRaw (Member *members, SizeType count, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
| Initialize this value as object with initial data, without calling destructor. More...
|
|
void | SetStringRaw (StringRefType s) RAPIDJSON_NOEXCEPT |
| Initialize this value as constant string, without calling destructor. More...
|
|
void | SetStringRaw (StringRefType s, RAPIDJSON_DEFAULT_ALLOCATOR &allocator) |
| Initialize this value as copy string with initial data, without calling destructor. More...
|
|
void | RawAssign (GenericValue &rhs) RAPIDJSON_NOEXCEPT |
| Assignment without calling destructor. More...
|
|
bool | StringEqual (const GenericValue< Encoding, SourceAllocator > &rhs) const |
|
static const SizeType | kDefaultArrayCapacity |
|
static const SizeType | kDefaultObjectCapacity |
|
Data | data_ |
|
template<typename Encoding, typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR>
class GenericDocument< Encoding, Allocator, StackAllocator >
A document for parsing JSON text as DOM.
- Note
- implements Handler concept
- Template Parameters
-
Encoding | Encoding for both parsing and string storage. |
Allocator | Allocator for allocating memory for the DOM |
StackAllocator | Allocator for allocating memory for stack during parsing. |
- Warning
- Although GenericDocument inherits from GenericValue, the API does not provide any virtual functions, especially no virtual destructor. To avoid memory leaks, do not
delete
a GenericDocument object via a pointer to a GenericValue.
Definition at line 2203 of file document.h.
template<typename Encoding , typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR>
template<unsigned parseFlags, typename SourceEncoding >
Parse JSON text from a read-only string (with Encoding conversion)
- Template Parameters
-
- Parameters
-
str | Read-only zero-terminated string to be parsed. |
Definition at line 2404 of file document.h.
template<typename Encoding , typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR>
template<unsigned parseFlags, typename SourceEncoding , typename InputStream >
Parse JSON text from an input stream (with Encoding conversion)
- Template Parameters
-
parseFlags | Combination of ParseFlag. |
SourceEncoding | Encoding of input stream |
InputStream | Type of input stream, implementing Stream concept |
- Parameters
-
is | Input stream to be parsed. |
- Returns
- The document itself for fluent API.
Definition at line 2338 of file document.h.
template<typename Encoding , typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR>
template<unsigned parseFlags, typename InputStream >
Parse JSON text from an input stream.
- Template Parameters
-
parseFlags | Combination of ParseFlag. |
InputStream | Type of input stream, implementing Stream concept |
- Parameters
-
is | Input stream to be parsed. |
- Returns
- The document itself for fluent API.
Definition at line 2357 of file document.h.
template<typename Encoding , typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR, typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR>
template<typename Generator >
Populate this document by a generator which produces SAX events.
- Template Parameters
-
Generator | A functor with bool f(Handler) prototype. |
- Parameters
-
g | Generator functor which sends SAX events to the parameter. |
- Returns
- The document itself for fluent API.
Definition at line 2318 of file document.h.