|
| GenericDocument (Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. 更多...
|
|
| GenericDocument (Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0) |
| Constructor. 更多...
|
|
GenericDocument & | Swap (GenericDocument &rhs) RAPIDJSON_NOEXCEPT |
| Exchange the contents of this document with those of another. 更多...
|
|
Allocator & | GetAllocator () |
| Get the allocator of this document.
|
|
size_t | GetStackCapacity () const |
| Get the capacity of stack in bytes.
|
|
|
template<unsigned parseFlags, typename SourceEncoding , typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream (with Encoding conversion) 更多...
|
|
template<unsigned parseFlags, typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream. 更多...
|
|
template<typename InputStream > |
GenericDocument & | ParseStream (InputStream &is) |
| Parse JSON text from an input stream (with kParseDefaultFlags) 更多...
|
|
|
template<unsigned parseFlags> |
GenericDocument & | ParseInsitu (Ch *str) |
| Parse JSON text from a mutable string. 更多...
|
|
GenericDocument & | ParseInsitu (Ch *str) |
| Parse JSON text from a mutable string (with kParseDefaultFlags) 更多...
|
|
|
template<unsigned parseFlags, typename SourceEncoding > |
GenericDocument & | Parse (const Ch *str) |
| Parse JSON text from a read-only string (with Encoding conversion) 更多...
|
|
template<unsigned parseFlags> |
GenericDocument & | Parse (const Ch *str) |
| Parse JSON text from a read-only string. 更多...
|
|
GenericDocument & | Parse (const Ch *str) |
| Parse JSON text from a read-only string (with kParseDefaultFlags) 更多...
|
|
|
bool | HasParseError () const |
| Whether a parse error has occured in the last parsing.
|
|
ParseErrorCode | GetParseError () const |
| Get the ParseErrorCode of last parsing.
|
|
size_t | GetErrorOffset () const |
| Get the position of last parsing error in input, 0 otherwise.
|
|
template<typename Handler > |
bool | Accept (Handler &handler) const |
| Generate events of this value to a Handler. 更多...
|
|
Type | GetType () const |
|
bool | IsNull () const |
|
bool | IsFalse () const |
|
bool | IsTrue () const |
|
bool | IsBool () const |
|
bool | IsObject () const |
|
bool | IsArray () const |
|
bool | IsNumber () const |
|
bool | IsInt () const |
|
bool | IsUint () const |
|
bool | IsInt64 () const |
|
bool | IsUint64 () const |
|
bool | IsDouble () const |
|
bool | IsString () const |
|
GenericValue & | SetNull () |
|
bool | GetBool () const |
| Set boolean value.
|
|
GenericValue & | SetBool (bool b) |
|
GenericValue & | SetObject () |
| Set this value as an empty object. 更多...
|
|
SizeType | MemberCount () const |
| Get the number of members in the object.
|
|
bool | ObjectEmpty () const |
| Check whether the object is empty.
|
|
template<typename T > |
GenericValue & | operator[] (T *name) |
| Get a value from an object associated with the name. 更多...
|
|
template<typename T > |
const GenericValue & | operator[] (T *name) const |
|
template<typename SourceAllocator > |
GenericValue & | operator[] (const GenericValue< Encoding, SourceAllocator > &name) |
| Get a value from an object associated with the name. 更多...
|
|
template<typename SourceAllocator > |
const GenericValue & | operator[] (const GenericValue< Encoding, SourceAllocator > &name) const |
|
GenericValue & | operator[] (const std::basic_string< Ch > &name) |
| Get a value from an object associated with name (string object).
|
|
const GenericValue & | operator[] (const std::basic_string< Ch > &name) const |
|
ConstMemberIterator | MemberBegin () const |
| Const member iterator. 更多...
|
|
ConstMemberIterator | MemberEnd () const |
| Const past-the-end member iterator. 更多...
|
|
MemberIterator | MemberBegin () |
| Member iterator. 更多...
|
|
MemberIterator | MemberEnd () |
| Past-the-end member iterator 更多...
|
|
bool | HasMember (const Ch *name) const |
| Check whether a member exists in the object. 更多...
|
|
bool | HasMember (const std::basic_string< Ch > &name) const |
| Check whether a member exists in the object with string object. 更多...
|
|
template<typename SourceAllocator > |
bool | HasMember (const GenericValue< Encoding, SourceAllocator > &name) const |
| Check whether a member exists in the object with GenericValue name. 更多...
|
|
MemberIterator | FindMember (const Ch *name) |
| Find member by name. 更多...
|
|
ConstMemberIterator | FindMember (const Ch *name) const |
|
template<typename SourceAllocator > |
MemberIterator | FindMember (const GenericValue< Encoding, SourceAllocator > &name) |
| Find member by name. 更多...
|
|
template<typename SourceAllocator > |
ConstMemberIterator | FindMember (const GenericValue< Encoding, SourceAllocator > &name) const |
|
MemberIterator | FindMember (const std::basic_string< Ch > &name) |
| Find member by string object name. 更多...
|
|
ConstMemberIterator | FindMember (const std::basic_string< Ch > &name) const |
|
GenericValue & | AddMember (GenericValue &name, GenericValue &value, Allocator &allocator) |
| Add a member (name-value pair) to the object. 更多...
|
|
GenericValue & | AddMember (GenericValue &name, StringRefType value, Allocator &allocator) |
| Add a constant string value as member (name-value pair) to the object. 更多...
|
|
GenericValue & | AddMember (GenericValue &name, std::basic_string< Ch > &value, Allocator &allocator) |
| Add a string object as member (name-value pair) to the object. 更多...
|
|
template<typename T > |
GenericValue & | AddMember (GenericValue &name, T value, Allocator &allocator) |
| Add any primitive value as member (name-value pair) to the object. 更多...
|
|
GenericValue & | AddMember (StringRefType name, GenericValue &value, Allocator &allocator) |
| Add a member (name-value pair) to the object. 更多...
|
|
GenericValue & | AddMember (StringRefType name, StringRefType value, Allocator &allocator) |
| Add a constant string value as member (name-value pair) to the object. 更多...
|
|
template<typename T > |
GenericValue & | AddMember (StringRefType name, T value, Allocator &allocator) |
| Add any primitive value as member (name-value pair) to the object. 更多...
|
|
void | RemoveAllMembers () |
| Remove all members in the object. 更多...
|
|
bool | RemoveMember (const Ch *name) |
| Remove a member in object by its name. 更多...
|
|
bool | RemoveMember (const std::basic_string< Ch > &name) |
|
template<typename SourceAllocator > |
bool | RemoveMember (const GenericValue< Encoding, SourceAllocator > &name) |
|
MemberIterator | RemoveMember (MemberIterator m) |
| Remove a member in object by iterator. 更多...
|
|
MemberIterator | EraseMember (ConstMemberIterator pos) |
| Remove a member from an object by iterator. 更多...
|
|
MemberIterator | EraseMember (ConstMemberIterator first, ConstMemberIterator last) |
| Remove members in the range [first, last) from an object. 更多...
|
|
bool | EraseMember (const Ch *name) |
| Erase a member in object by its name. 更多...
|
|
bool | EraseMember (const std::basic_string< Ch > &name) |
|
template<typename SourceAllocator > |
bool | EraseMember (const GenericValue< Encoding, SourceAllocator > &name) |
|
GenericValue & | SetArray () |
| Set this value as an empty array. 更多...
|
|
SizeType | Size () const |
| Get the number of elements in array.
|
|
SizeType | Capacity () const |
| Get the capacity of array.
|
|
bool | Empty () const |
| Check whether the array is empty.
|
|
void | Clear () |
| Remove all elements in the array. 更多...
|
|
GenericValue & | operator[] (SizeType index) |
| Get an element from array by index. 更多...
|
|
const GenericValue & | operator[] (SizeType index) const |
|
ValueIterator | Begin () |
| Element iterator. 更多...
|
|
ValueIterator | End () |
| Past-the-end element iterator 更多...
|
|
ConstValueIterator | Begin () const |
| Constant element iterator. 更多...
|
|
ConstValueIterator | End () const |
| Constant past-the-end element iterator. 更多...
|
|
GenericValue & | Reserve (SizeType newCapacity, Allocator &allocator) |
| Request the array to have enough capacity to store elements. 更多...
|
|
GenericValue & | PushBack (GenericValue &value, Allocator &allocator) |
| Append a GenericValue at the end of the array. 更多...
|
|
GenericValue & | PushBack (StringRefType value, Allocator &allocator) |
| Append a constant string reference at the end of the array. 更多...
|
|
template<typename T > |
GenericValue & | PushBack (T value, Allocator &allocator) |
| Append a primitive value at the end of the array. 更多...
|
|
GenericValue & | PopBack () |
| Remove the last element in the array. 更多...
|
|
ValueIterator | Erase (ConstValueIterator pos) |
| Remove an element of array by iterator. 更多...
|
|
ValueIterator | Erase (ConstValueIterator first, ConstValueIterator last) |
| Remove elements in the range [first, last) of the array. 更多...
|
|
int | GetInt () const |
|
unsigned | GetUint () const |
|
int64_t | GetInt64 () const |
|
uint64_t | GetUint64 () const |
|
double | GetDouble () const |
|
GenericValue & | SetInt (int i) |
|
GenericValue & | SetUint (unsigned u) |
|
GenericValue & | SetInt64 (int64_t i64) |
|
GenericValue & | SetUint64 (uint64_t u64) |
|
GenericValue & | SetDouble (double d) |
|
const Ch * | GetString () const |
|
SizeType | GetStringLength () const |
| Get the length of string. 更多...
|
|
GenericValue & | SetString (const Ch *s, SizeType length) |
| Set this value as a string without copying source string. 更多...
|
|
GenericValue & | SetString (StringRefType s) |
| Set this value as a string without copying source string. 更多...
|
|
GenericValue & | SetString (const Ch *s, SizeType length, Allocator &allocator) |
| Set this value as a string by copying from source string. 更多...
|
|
GenericValue & | SetString (const Ch *s, Allocator &allocator) |
| Set this value as a string by copying from source string. 更多...
|
|
GenericValue & | SetString (const std::basic_string< Ch > &s, Allocator &allocator) |
| Set this value as a string by copying from source string. 更多...
|
|
GenericValue & | operator= (GenericValue &rhs) RAPIDJSON_NOEXCEPT |
| Assignment with move semantics. 更多...
|
|
GenericValue & | operator= (StringRefType str) RAPIDJSON_NOEXCEPT |
| Assignment of constant string reference (no copy) 更多...
|
|
template<typename T > |
GenericValue & | operator= (T value) |
| Assignment with primitive types. 更多...
|
|
template<typename SourceAllocator > |
GenericValue & | CopyFrom (const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator) |
| Deep-copy assignment from Value. 更多...
|
|
GenericValue & | Swap (GenericValue &other) RAPIDJSON_NOEXCEPT |
| Exchange the contents of this value with those of other. 更多...
|
|
GenericValue & | Move () RAPIDJSON_NOEXCEPT |
| Prepare Value for move semantics. 更多...
|
|
template<typename SourceAllocator > |
bool | operator== (const GenericValue< Encoding, SourceAllocator > &rhs) const |
| Equal-to operator. 更多...
|
|
bool | operator== (const Ch *rhs) const |
| Equal-to operator with const C-string pointer.
|
|
bool | operator== (const std::basic_string< Ch > &rhs) const |
| Equal-to operator with string object. 更多...
|
|
template<typename T > |
bool | operator== (const T &rhs) const |
| Equal-to operator with primitive types. 更多...
|
|
template<typename SourceAllocator > |
bool | operator!= (const GenericValue< Encoding, SourceAllocator > &rhs) const |
| Not-equal-to operator. 更多...
|
|
bool | operator!= (const Ch *rhs) const |
| Not-equal-to operator with const C-string pointer.
|
|
template<typename T > |
bool | operator!= (const T &rhs) const |
| Not-equal-to operator with arbitrary types. 更多...
|
|
| GenericValue () RAPIDJSON_NOEXCEPT |
| Default constructor creates a null value.
|
|
| GenericValue (Type type) RAPIDJSON_NOEXCEPT |
| Constructor with JSON value type. 更多...
|
|
template<typename SourceAllocator > |
| GenericValue (const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator) |
| Explicit copy constructor (with allocator) 更多...
|
|
| GenericValue (bool b) RAPIDJSON_NOEXCEPT |
| Constructor for boolean value. 更多...
|
|
| GenericValue (int i) RAPIDJSON_NOEXCEPT |
| Constructor for int value.
|
|
| GenericValue (unsigned u) RAPIDJSON_NOEXCEPT |
| Constructor for unsigned value.
|
|
| GenericValue (int64_t i64) RAPIDJSON_NOEXCEPT |
| Constructor for int64_t value.
|
|
| GenericValue (uint64_t u64) RAPIDJSON_NOEXCEPT |
| Constructor for uint64_t value.
|
|
| GenericValue (double d) RAPIDJSON_NOEXCEPT |
| Constructor for double value.
|
|
| GenericValue (const Ch *s, SizeType length) RAPIDJSON_NOEXCEPT |
| Constructor for constant string (i.e. do not make a copy of string)
|
|
| GenericValue (StringRefType s) RAPIDJSON_NOEXCEPT |
| Constructor for constant string (i.e. do not make a copy of string)
|
|
| GenericValue (const Ch *s, SizeType length, Allocator &allocator) |
| Constructor for copy-string (i.e. do make a copy of string)
|
|
| GenericValue (const Ch *s, Allocator &allocator) |
| Constructor for copy-string (i.e. do make a copy of string)
|
|
| GenericValue (const std::basic_string< Ch > &s, Allocator &allocator) |
| Constructor for copy-string from a string object (i.e. do make a copy of string) 更多...
|
|
| ~GenericValue () |
| Destructor. 更多...
|
|