|
typedef Encoding::Ch | Ch |
| Character type derived from Encoding. More...
|
|
typedef GenericValue< Encoding, Allocator > | ValueType |
| Value type of the document. More...
|
|
typedef Allocator | AllocatorType |
| Allocator type from template parameter. More...
|
|
typedef GenericMember< Encoding, MemoryPoolAllocator<> > | Member |
| Name-value pair in an object. More...
|
|
typedef Encoding | EncodingType |
| Encoding type from template parameter. More...
|
|
typedef MemoryPoolAllocator<> | AllocatorType |
| Allocator type from template parameter. More...
|
|
typedef Encoding::Ch | Ch |
| Character type derived from Encoding. More...
|
|
typedef GenericStringRef< Ch > | StringRefType |
| Reference to a constant string. More...
|
|
typedef GenericMemberIterator< false, Encoding, MemoryPoolAllocator<> >::Iterator | MemberIterator |
| Member iterator for iterating in object. More...
|
|
typedef GenericMemberIterator< true, Encoding, MemoryPoolAllocator<> >::Iterator | ConstMemberIterator |
| Constant member iterator for iterating in object. More...
|
|
typedef GenericValue * | ValueIterator |
| Value iterator for iterating in array. More...
|
|
typedef const GenericValue * | ConstValueIterator |
| Constant value iterator for iterating in array. More...
|
|
typedef GenericValue< Encoding, MemoryPoolAllocator<> > | ValueType |
| Value type of itself. More...
|
|
typedef GenericArray< false, ValueType > | Array |
|
typedef GenericArray< true, ValueType > | ConstArray |
|
typedef GenericObject< false, ValueType > | Object |
|
typedef GenericObject< true, ValueType > | ConstObject |
|
enum | |
|
|
| GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. More...
|
|
| GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. More...
|
|
| ~GenericDocument () |
|
GenericDocument & | Swap (GenericDocument &rhs) CEREAL_RAPIDJSON_NOEXCEPT |
| Exchange the contents of this document with those of another. More...
|
|
template<typename Generator > |
GenericDocument & | Populate (Generator &g) |
| Populate this document by a generator which produces SAX events. More...
|
|
Allocator & | GetAllocator () |
| Get the allocator of this document. More...
|
|
size_t | GetStackCapacity () const |
| Get the capacity of stack in bytes. More...
|
|
bool | Null () |
|
bool | Bool (bool b) |
|
bool | Int (int i) |
|
bool | Uint (unsigned i) |
|
bool | Int64 (int64_t i) |
|
bool | Uint64 (uint64_t i) |
|
bool | Double (double d) |
|
bool | RawNumber (const Ch *str, SizeType length, bool copy) |
|
bool | String (const Ch *str, SizeType length, bool copy) |
|
bool | StartObject () |
|
bool | Key (const Ch *str, SizeType length, bool copy) |
|
bool | EndObject (SizeType memberCount) |
|
bool | StartArray () |
|
bool | EndArray (SizeType elementCount) |
|
|
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...
|
|
GenericValue & | operator= (GenericValue &rhs) CEREAL_RAPIDJSON_NOEXCEPT |
| Assignment with move semantics. More...
|
|
GenericValue & | operator= (StringRefType str) CEREAL_RAPIDJSON_NOEXCEPT |
| Assignment of constant string reference (no copy) More...
|
|
| CEREAL_RAPIDJSON_DISABLEIF_RETURN ((internal::IsPointer< T >),(GenericValue &)) operator |
| Assignment with primitive types. More...
|
|
CEREAL_RAPIDJSON_FORCEINLINE const Ch * | GetStringPointer () const |
|
CEREAL_RAPIDJSON_FORCEINLINE const Ch * | SetStringPointer (const Ch *str) |
|
CEREAL_RAPIDJSON_FORCEINLINE GenericValue * | GetElementsPointer () const |
|
CEREAL_RAPIDJSON_FORCEINLINE GenericValue * | SetElementsPointer (GenericValue *elements) |
|
CEREAL_RAPIDJSON_FORCEINLINE Member * | GetMembersPointer () const |
|
CEREAL_RAPIDJSON_FORCEINLINE Member * | SetMembersPointer (Member *members) |
|
void | SetArrayRaw (GenericValue *values, SizeType count, MemoryPoolAllocator<> &allocator) |
|
void | SetObjectRaw (Member *members, SizeType count, MemoryPoolAllocator<> &allocator) |
| Initialize this value as object with initial data, without calling destructor. More...
|
|
void | SetStringRaw (StringRefType s) CEREAL_RAPIDJSON_NOEXCEPT |
| Initialize this value as constant string, without calling destructor. More...
|
|
void | SetStringRaw (StringRefType s, MemoryPoolAllocator<> &allocator) |
| Initialize this value as copy string with initial data, without calling destructor. More...
|
|
void | RawAssign (GenericValue &rhs) CEREAL_RAPIDJSON_NOEXCEPT |
| Assignment without calling destructor. More...
|
|
bool | StringEqual (const GenericValue< Encoding, SourceAllocator > &rhs) const |
|
| GenericValue () CEREAL_RAPIDJSON_NOEXCEPT |
| Default constructor creates a null value. More...
|
|
| GenericValue (Type type) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor with JSON value type. More...
|
|
| GenericValue (const GenericValue< Encoding, SourceAllocator > &rhs, MemoryPoolAllocator<> &allocator, bool copyConstStrings=false) |
| Explicit copy constructor (with allocator) More...
|
|
| GenericValue (T b, CEREAL_RAPIDJSON_ENABLEIF((internal::IsSame< bool, T >))) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for boolean value. More...
|
|
| GenericValue (int i) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for int value. More...
|
|
| GenericValue (unsigned u) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for unsigned value. More...
|
|
| GenericValue (int64_t i64) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for int64_t value. More...
|
|
| GenericValue (uint64_t u64) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for uint64_t value. More...
|
|
| GenericValue (double d) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for double value. More...
|
|
| GenericValue (float f) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for float value. More...
|
|
| GenericValue (const Ch *s, SizeType length) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for constant string (i.e. do not make a copy of string) More...
|
|
| GenericValue (StringRefType s) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for constant string (i.e. do not make a copy of string) More...
|
|
| GenericValue (const Ch *s, SizeType length, MemoryPoolAllocator<> &allocator) |
| Constructor for copy-string (i.e. do make a copy of string) More...
|
|
| GenericValue (const Ch *s, MemoryPoolAllocator<> &allocator) |
| Constructor for copy-string (i.e. do make a copy of string) More...
|
|
| GenericValue (Array a) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for Array. More...
|
|
| GenericValue (Object o) CEREAL_RAPIDJSON_NOEXCEPT |
| Constructor for Object. More...
|
|
| ~GenericValue () |
| Destructor. More...
|
|
template<typename Encoding, typename Allocator = MemoryPoolAllocator<>, typename StackAllocator = CrtAllocator>
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.