template <typename Encoding, typename Allocator>

class GenericValue

Defined at line 668 of file ../../third_party/rapidjson/include/rapidjson/document.h

Forward declaration.

Public Methods

void GenericValue<Encoding, Allocator> ()

Default constructor creates a null value.

Defined at line 690 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (GenericValue<Encoding, Allocator> && rhs)

Move constructor in C++11

Defined at line 694 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (Type type)

Constructor with JSON value type.

This creates a Value of specified type with default content.

Parameters

type Type of the value.

Defined at line 720 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
void GenericValue<Encoding, Allocator> (const GenericValue<Encoding, SourceAllocator> & rhs, Allocator & allocator, bool copyConstStrings)

Explicit copy constructor (with allocator)

Creates a copy of a Value by using the given Allocator

Parameters

rhs Value to copy from (read-only)
allocator Allocator for allocating copied elements and buffers. Commonly use GenericDocument::GetAllocator().
copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)

Template Parameters

SourceAllocator allocator of

Defined at line 742 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
void GenericValue<Encoding, Allocator> (T b, typename ::rapidjson::internal::EnableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::IsSame<bool, T>)>::Type>::Type * )

Defined at line 781 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (int i)

Constructor for int value.

Defined at line 792 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (unsigned int u)

Constructor for unsigned value.

Defined at line 798 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (int64_t i64)

Constructor for int64_t value.

Defined at line 804 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (uint64_t u64)

Constructor for uint64_t value.

Defined at line 819 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (double d)

Constructor for double value.

Defined at line 831 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (float f)

Constructor for float value.

Defined at line 834 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (const Ch * s, SizeType length)

Constructor for constant string (i.e. do not make a copy of string)

Defined at line 837 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (StringRefType s)

Constructor for constant string (i.e. do not make a copy of string)

Defined at line 840 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (const Ch * s, SizeType length, Allocator & allocator)

Constructor for copy-string (i.e. do make a copy of string)

Defined at line 843 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (const Ch * s, Allocator & allocator)

Constructor for copy-string (i.e. do make a copy of string)

Defined at line 846 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (const std::basic_string<Ch> & s, Allocator & allocator)

Constructor for copy-string from a string object (i.e. do make a copy of string)

Defined at line 852 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (Array a)

Constructor for Array.

Parameters

a An array obtained by

Defined at line 861 of file ../../third_party/rapidjson/include/rapidjson/document.h

void GenericValue<Encoding, Allocator> (Object o)

Constructor for Object.

Parameters

o An object obtained by

Defined at line 872 of file ../../third_party/rapidjson/include/rapidjson/document.h

void ~GenericValue<Encoding, Allocator> ()

Destructor.

Need to destruct elements of array, members of object, or copy-string.

Defined at line 880 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & operator= (GenericValue<Encoding, Allocator> & rhs)

Assignment with move semantics.

Parameters

rhs Source of the assignment. It will become a null value after assignment.

Defined at line 921 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & operator= (GenericValue<Encoding, Allocator> && rhs)

Move assignment in C++11

Defined at line 936 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & operator= (StringRefType str)

Assignment of constant string reference (no copy)

Parameters

str Constant string reference to be assigned

Defined at line 946 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::IsPointer<T>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(GenericValue<Encoding, Allocator> &)>::Type>::Type operator= (T value)

Assignment with primitive types.

Parameters

value The value to be assigned.

Template Parameters

T Either

Defined at line 964 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
GenericValue<Encoding, Allocator> & CopyFrom (const GenericValue<Encoding, SourceAllocator> & rhs, Allocator & allocator, bool copyConstStrings)

Deep-copy assignment from Value

Assigns a

of the Value to the current Value object

Parameters

rhs Value to copy from (read-only)
allocator Allocator to use for copying
copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)

Template Parameters

SourceAllocator Allocator type of

Defined at line 978 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & Swap (GenericValue<Encoding, Allocator> & other)

Exchange the contents of this value with those of other.

Parameters

other Another value.

Defined at line 990 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & Move ()

Prepare Value for move semantics

Returns

*this

Defined at line 1014 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
bool operator== (const GenericValue<Encoding, SourceAllocator> & rhs)

@

{

Equal-to operator

Defined at line 1025 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool operator== (const Ch * rhs)

Equal-to operator with const C-string pointer

Defined at line 1067 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool operator== (const std::basic_string<Ch> & rhs)

Equal-to operator with string object

Defined at line 1073 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(bool)>::Type>::Type operator== (const T & rhs)

Equal-to operator with primitive types

Template Parameters

T Either

Defined at line 1079 of file ../../third_party/rapidjson/include/rapidjson/document.h

Type GetType ()

@

{

Defined at line 1111 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsNull ()

Defined at line 1112 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsFalse ()

Defined at line 1113 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsTrue ()

Defined at line 1114 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsBool ()

Defined at line 1115 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsObject ()

Defined at line 1116 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsArray ()

Defined at line 1117 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsNumber ()

Defined at line 1118 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsInt ()

Defined at line 1119 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsUint ()

Defined at line 1120 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsInt64 ()

Defined at line 1121 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsUint64 ()

Defined at line 1122 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsDouble ()

Defined at line 1123 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsString ()

Defined at line 1124 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsLosslessDouble ()

Checks whether a number can be losslessly converted to a double.

Defined at line 1127 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsFloat ()

Checks whether a number is a float (possible lossy).

Defined at line 1147 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool IsLosslessFloat ()

Checks whether a number can be losslessly converted to a float.

Defined at line 1154 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetNull ()

@

{

Defined at line 1169 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool GetBool ()

@

{

Defined at line 1176 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetBool (bool b)

Defined at line 1179 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetObject ()

Set this value as an empty object.

Defined at line 1188 of file ../../third_party/rapidjson/include/rapidjson/document.h

SizeType MemberCount ()

Get the number of members in the object.

Defined at line 1191 of file ../../third_party/rapidjson/include/rapidjson/document.h

SizeType MemberCapacity ()

Get the capacity of object.

Defined at line 1194 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool ObjectEmpty ()

Check whether the object is empty.

Defined at line 1197 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(GenericValue<Encoding, Allocator> &)>::Type>::Type operator[] (T * name)

Get a value from an object associated with the name.

Template Parameters

T Either or (template used for disambiguation with

Defined at line 1209 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::Type, Ch>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(const GenericValue<Encoding, Allocator> &)>::Type>::Type operator[] (T * name)

Defined at line 1214 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
GenericValue<Encoding, Allocator> & operator[] (const GenericValue<Encoding, SourceAllocator> & name)

Get a value from an object associated with the name.

Template Parameters

SourceAllocator Allocator of the value

Defined at line 1226 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
const GenericValue<Encoding, Allocator> & operator[] (const GenericValue<Encoding, SourceAllocator> & name)

Defined at line 1258 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & operator[] (const std::basic_string<Ch> & name)

Get a value from an object associated with name (string object).

Defined at line 1262 of file ../../third_party/rapidjson/include/rapidjson/document.h

const GenericValue<Encoding, Allocator> & operator[] (const std::basic_string<Ch> & name)

Defined at line 1263 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstMemberIterator MemberBegin ()

Const member iterator

Defined at line 1268 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstMemberIterator MemberEnd ()

Const

member iterator

Defined at line 1271 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator MemberBegin ()

Member iterator

Defined at line 1274 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator MemberEnd ()

member iterator

Defined at line 1277 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & MemberReserve (SizeType newCapacity, Allocator & allocator)

Request the object to have enough capacity to store members.

Parameters

newCapacity The capacity that the object at least need to have.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1285 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool HasMember (const Ch * name)

Check whether a member exists in the object.

Parameters

name Member name to be searched.

Returns

Whether a member with that name exists.

Defined at line 1299 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool HasMember (const std::basic_string<Ch> & name)

Check whether a member exists in the object with string object.

Parameters

name Member name to be searched.

Returns

Whether a member with that name exists.

Defined at line 1310 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
bool HasMember (const GenericValue<Encoding, SourceAllocator> & name)

Check whether a member exists in the object with GenericValue name.

This version is faster because it does not need a StrLen(). It can also handle string with null character.

Parameters

name Member name to be searched.

Returns

Whether a member with that name exists.

Defined at line 1323 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator FindMember (const Ch * name)

Find member by name.

Parameters

name Member name to be searched.

Returns

Iterator to member, if it exists.

Otherwise returns

Defined at line 1337 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstMemberIterator FindMember (const Ch * name)

Defined at line 1342 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
MemberIterator FindMember (const GenericValue<Encoding, SourceAllocator> & name)

Find member by name.

This version is faster because it does not need a StrLen(). It can also handle string with null character.

Parameters

name Member name to be searched.

Returns

Iterator to member, if it exists.

Otherwise returns

Defined at line 1358 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
ConstMemberIterator FindMember (const GenericValue<Encoding, SourceAllocator> & name)

Defined at line 1363 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator FindMember (const std::basic_string<Ch> & name)

Find member by string object name.

Parameters

name Member name to be searched.

Returns

Iterator to member, if it exists.

Otherwise returns

Defined at line 1373 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstMemberIterator FindMember (const std::basic_string<Ch> & name)

Defined at line 1374 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> & name, GenericValue<Encoding, Allocator> & value, Allocator & allocator)

Add a member (name-value pair) to the object.

Parameters

name A string value as name of member.
value Value of any type.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1387 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> & name, StringRefType value, Allocator & allocator)

Add a constant string value as member (name-value pair) to the object.

Parameters

name A string value as name of member.
value constant string reference as value of member.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1403 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> & name, std::basic_string<Ch> & value, Allocator & allocator)

Add a string object as member (name-value pair) to the object.

Parameters

name A string value as name of member.
value constant string reference as value of member.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1418 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(GenericValue<Encoding, Allocator> &)>::Type>::Type AddMember (GenericValue<Encoding, Allocator> & name, T value, Allocator & allocator)

Add any primitive value as member (name-value pair) to the object.

Parameters

name A string value as name of member.
value Value of primitive type as value of member
allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().

Template Parameters

T Either

Returns

The value itself for fluent API.

Defined at line 1442 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> && name, GenericValue<Encoding, Allocator> && value, Allocator & allocator)

Defined at line 1449 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> && name, GenericValue<Encoding, Allocator> & value, Allocator & allocator)

Defined at line 1452 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (GenericValue<Encoding, Allocator> & name, GenericValue<Encoding, Allocator> && value, Allocator & allocator)

Defined at line 1455 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (StringRefType name, GenericValue<Encoding, Allocator> && value, Allocator & allocator)

Defined at line 1458 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (StringRefType name, GenericValue<Encoding, Allocator> & value, Allocator & allocator)

Add a member (name-value pair) to the object.

Parameters

name A constant string reference as name of member.
value Value of any type.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1475 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & AddMember (StringRefType name, StringRefType value, Allocator & allocator)

Add a constant string value as member (name-value pair) to the object.

Parameters

name A constant string reference as name of member.
value constant string reference as value of member.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1489 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(GenericValue<Encoding, Allocator> &)>::Type>::Type AddMember (StringRefType name, T value, Allocator & allocator)

Add any primitive value as member (name-value pair) to the object.

Parameters

name A constant string reference as name of member.
value Value of primitive type as value of member
allocator Allocator for reallocating memory. Commonly use GenericDocument::GetAllocator().

Template Parameters

T Either

Returns

The value itself for fluent API.

Defined at line 1512 of file ../../third_party/rapidjson/include/rapidjson/document.h

void RemoveAllMembers ()

Remove all members in the object.

This function do not deallocate memory in the object, i.e. the capacity is unchanged.

Defined at line 1522 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool RemoveMember (const Ch * name)

Remove a member in object by its name.

Parameters

name Name of member to be removed.

Returns

Whether the member existed.

Defined at line 1535 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool RemoveMember (const std::basic_string<Ch> & name)

Defined at line 1541 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
bool RemoveMember (const GenericValue<Encoding, SourceAllocator> & name)

Defined at line 1545 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator RemoveMember (MemberIterator m)

Remove a member in object by iterator.

Parameters

m member iterator (obtained by FindMember() or MemberBegin()).

Returns

the new iterator after removal.

Defined at line 1563 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator EraseMember (ConstMemberIterator pos)

Remove a member from an object by iterator.

Parameters

pos iterator to the member to remove

Returns

Iterator following the removed element.

If the iterator

refers to the last element, the

iterator is returned.

Defined at line 1580 of file ../../third_party/rapidjson/include/rapidjson/document.h

MemberIterator EraseMember (ConstMemberIterator first, ConstMemberIterator last)

Remove members in the range [first, last) from an object.

Parameters

first iterator to the first member to remove
last iterator following the last member to remove

Returns

Iterator following the last removed element.

Defined at line 1593 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool EraseMember (const Ch * name)

Erase a member in object by its name.

Parameters

name Name of member to be removed.

Returns

Whether the member existed.

Defined at line 1608 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool EraseMember (const std::basic_string<Ch> & name)

Defined at line 1614 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename SourceAllocator>
bool EraseMember (const GenericValue<Encoding, SourceAllocator> & name)

Defined at line 1618 of file ../../third_party/rapidjson/include/rapidjson/document.h

Object GetObject ()

Defined at line 1628 of file ../../third_party/rapidjson/include/rapidjson/document.h

Object GetObj ()

Defined at line 1629 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstObject GetObject ()

Defined at line 1630 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstObject GetObj ()

Defined at line 1631 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetArray ()

Set this value as an empty array.

Defined at line 1640 of file ../../third_party/rapidjson/include/rapidjson/document.h

SizeType Size ()

Get the number of elements in array.

Defined at line 1643 of file ../../third_party/rapidjson/include/rapidjson/document.h

SizeType Capacity ()

Get the capacity of array.

Defined at line 1646 of file ../../third_party/rapidjson/include/rapidjson/document.h

bool Empty ()

Check whether the array is empty.

Defined at line 1649 of file ../../third_party/rapidjson/include/rapidjson/document.h

void Clear ()

Remove all elements in the array.

This function do not deallocate memory in the array, i.e. the capacity is unchanged.

Defined at line 1655 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & operator[] (SizeType index)

Get an element from array by index.

Parameters

index Zero-based index of element.

Defined at line 1668 of file ../../third_party/rapidjson/include/rapidjson/document.h

const GenericValue<Encoding, Allocator> & operator[] (SizeType index)

Defined at line 1673 of file ../../third_party/rapidjson/include/rapidjson/document.h

ValueIterator Begin ()

Element iterator

Defined at line 1677 of file ../../third_party/rapidjson/include/rapidjson/document.h

ValueIterator End ()

element iterator

Defined at line 1680 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstValueIterator Begin ()

Constant element iterator

Defined at line 1683 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstValueIterator End ()

Constant

element iterator

Defined at line 1686 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & Reserve (SizeType newCapacity, Allocator & allocator)

Request the array to have enough capacity to store elements.

Parameters

newCapacity The capacity that the array at least need to have.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1694 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & PushBack (GenericValue<Encoding, Allocator> & value, Allocator & allocator)

Append a GenericValue at the end of the array.

Parameters

value Value to be appended.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1713 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & PushBack (GenericValue<Encoding, Allocator> && value, Allocator & allocator)

Defined at line 1722 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & PushBack (StringRefType value, Allocator & allocator)

Append a constant string reference at the end of the array.

Parameters

value Constant string reference to be appended.
allocator Allocator for reallocating memory. It must be the same one used previously. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1736 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
typename ::rapidjson::internal::DisableIf<typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>)>::Type, typename ::rapidjson::internal::RemoveSfinaeTag< ::rapidjson::internal::SfinaeTag &(*)(GenericValue<Encoding, Allocator> &)>::Type>::Type PushBack (T value, Allocator & allocator)

Append a primitive value at the end of the array.

Parameters

value Value of primitive type T to be appended.
allocator Allocator for reallocating memory. It must be the same one as used before. Commonly use GenericDocument::GetAllocator().

Template Parameters

T Either

Returns

The value itself for fluent API.

Defined at line 1758 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & PopBack ()

Remove the last element in the array.

Defined at line 1768 of file ../../third_party/rapidjson/include/rapidjson/document.h

ValueIterator Erase (ConstValueIterator pos)

Remove an element of array by iterator.

Parameters

pos iterator to the element to remove

Returns

Iterator following the removed element. If the iterator pos refers to the last element, the End() iterator is returned.

Defined at line 1782 of file ../../third_party/rapidjson/include/rapidjson/document.h

ValueIterator Erase (ConstValueIterator first, ConstValueIterator last)

Remove elements in the range [first, last) of the array.

Parameters

first iterator to the first element to remove
last iterator following the last element to remove

Returns

Iterator following the last removed element.

Defined at line 1794 of file ../../third_party/rapidjson/include/rapidjson/document.h

Array GetArray ()

Defined at line 1809 of file ../../third_party/rapidjson/include/rapidjson/document.h

ConstArray GetArray ()

Defined at line 1810 of file ../../third_party/rapidjson/include/rapidjson/document.h

int GetInt ()

@

{

Defined at line 1817 of file ../../third_party/rapidjson/include/rapidjson/document.h

unsigned int GetUint ()

Defined at line 1818 of file ../../third_party/rapidjson/include/rapidjson/document.h

int64_t GetInt64 ()

Defined at line 1819 of file ../../third_party/rapidjson/include/rapidjson/document.h

uint64_t GetUint64 ()

Defined at line 1820 of file ../../third_party/rapidjson/include/rapidjson/document.h

double GetDouble ()

Get the value as double type.

Defined at line 1825 of file ../../third_party/rapidjson/include/rapidjson/document.h

float GetFloat ()

Get the value as float type.

Defined at line 1837 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetInt (int i)

Defined at line 1841 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetUint (unsigned int u)

Defined at line 1842 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetInt64 (int64_t i64)

Defined at line 1843 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetUint64 (uint64_t u64)

Defined at line 1844 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetDouble (double d)

Defined at line 1845 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetFloat (float f)

Defined at line 1846 of file ../../third_party/rapidjson/include/rapidjson/document.h

const Ch * GetString ()

@

{

Defined at line 1853 of file ../../third_party/rapidjson/include/rapidjson/document.h

SizeType GetStringLength ()

Get the length of string.

Since rapidjson permits "\\u0000" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength().

Defined at line 1858 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (const Ch * s, SizeType length)

Set this value as a string without copying source string.

This version has better performance with supplied length, and also support string containing null character.

Parameters

s source string pointer.
length The length of source string, excluding the trailing null terminator.

Returns

The value itself for fluent API.

Defined at line 1868 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (StringRefType s)

Set this value as a string without copying source string.

Parameters

s source string reference

Returns

The value itself for fluent API.

Defined at line 1875 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (const Ch * s, SizeType length, Allocator & allocator)

Set this value as a string by copying from source string.

This version has better performance with supplied length, and also support string containing null character.

Parameters

s source string.
length The length of source string, excluding the trailing null terminator.
allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1885 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (const Ch * s, Allocator & allocator)

Set this value as a string by copying from source string.

Parameters

s source string.
allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1893 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (StringRefType s, Allocator & allocator)

Set this value as a string by copying from source string.

Parameters

s source string reference
allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1901 of file ../../third_party/rapidjson/include/rapidjson/document.h

GenericValue<Encoding, Allocator> & SetString (const std::basic_string<Ch> & s, Allocator & allocator)

Set this value as a string by copying from source string.

Parameters

s source string.
allocator Allocator for allocating copied buffer. Commonly use GenericDocument::GetAllocator().

Returns

The value itself for fluent API.

Defined at line 1911 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
bool Is ()

Templated version for checking whether this value is type T.

Template Parameters

T Either

Defined at line 1924 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
T Get ()

Defined at line 1927 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
T Get ()

Defined at line 1930 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
ValueType & Set (const T & data)

Defined at line 1933 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename T>
ValueType & Set (const T & data, AllocatorType & allocator)

Defined at line 1936 of file ../../third_party/rapidjson/include/rapidjson/document.h

template <typename Handler>
bool Accept (Handler & handler)

Generate events of this value to a Handler.

This function adopts the GoF visitor pattern.

Typical usage is to output this JSON value as JSON text via Writer, which is a Handler.

It can also be used to deep clone this value via GenericDocument, which is also a Handler.

Parameters

handler An object implementing concept Handler.

Template Parameters

Handler type of handler.

Defined at line 1948 of file ../../third_party/rapidjson/include/rapidjson/document.h

Friends

template <typename, typename, typename>
class GenericDocument
template <typename, typename>
class GenericValue
template <typename Encodingtypename Allocator>
void GenericValue (GenericValue<Encoding, Allocator> & aGenericValue<Encoding, Allocator> & b)