15 #ifndef CEREAL_RAPIDJSON_DOCUMENT_H_
16 #define CEREAL_RAPIDJSON_DOCUMENT_H_
27 #ifdef __cpp_lib_three_way_comparison
31 CEREAL_RAPIDJSON_DIAG_PUSH
33 CEREAL_RAPIDJSON_DIAG_OFF(padded)
34 CEREAL_RAPIDJSON_DIAG_OFF(
switch-
enum)
35 CEREAL_RAPIDJSON_DIAG_OFF(c++98-compat)
36 #elif defined(_MSC_VER)
37 CEREAL_RAPIDJSON_DIAG_OFF(4127)
38 CEREAL_RAPIDJSON_DIAG_OFF(4244)
42 CEREAL_RAPIDJSON_DIAG_OFF(effc++)
45 #ifndef CEREAL_RAPIDJSON_NOMEMBERITERATORCLASS
49 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
56 template <
typename Encoding,
typename Allocator>
59 template <
typename Encoding,
typename Allocator,
typename StackAllocator>
68 template <
typename Encoding,
typename Allocator>
76 a.value.Swap(b.value);
83 #ifndef CEREAL_RAPIDJSON_NOMEMBERITERATORCLASS
104 template <
bool Const,
typename Encoding,
typename Allocator>
188 #ifdef __cpp_lib_three_way_comparison
214 template <
bool Const,
typename Encoding,
typename Allocator>
218 template <
typename Encoding,
typename Allocator>
224 template <
typename Encoding,
typename Allocator>
262 template<
typename CharType>
334 operator const Ch *()
const {
return s; }
355 template<
typename CharType>
370 template<
typename CharType>
390 template<
typename CharType>
395 #if CEREAL_RAPIDJSON_HAS_STDSTRING
408 template<
typename CharType>
418 template <
typename T,
typename Encoding =
void,
typename Allocator =
void>
423 : IsBaseOf<GenericValue<typename T::EncodingType, typename T::AllocatorType>, T>
::Type {};
435 template <
typename ValueType,
typename T>
438 template<
typename ValueType>
440 static bool Is(
const ValueType& v) {
return v.IsBool(); }
441 static bool Get(
const ValueType& v) {
return v.GetBool(); }
442 static ValueType&
Set(ValueType& v,
bool data) {
return v.SetBool(data); }
443 static ValueType&
Set(ValueType& v,
bool data,
typename ValueType::AllocatorType&) {
return v.SetBool(data); }
446 template<
typename ValueType>
448 static bool Is(
const ValueType& v) {
return v.IsInt(); }
449 static int Get(
const ValueType& v) {
return v.GetInt(); }
450 static ValueType&
Set(ValueType& v,
int data) {
return v.SetInt(data); }
451 static ValueType&
Set(ValueType& v,
int data,
typename ValueType::AllocatorType&) {
return v.SetInt(data); }
454 template<
typename ValueType>
456 static bool Is(
const ValueType& v) {
return v.IsUint(); }
457 static unsigned Get(
const ValueType& v) {
return v.GetUint(); }
458 static ValueType&
Set(ValueType& v,
unsigned data) {
return v.SetUint(data); }
459 static ValueType&
Set(ValueType& v,
unsigned data,
typename ValueType::AllocatorType&) {
return v.SetUint(data); }
464 template<
typename ValueType>
465 struct TypeHelper<ValueType, long> {
466 static bool Is(
const ValueType& v) {
return v.IsInt(); }
467 static long Get(
const ValueType& v) {
return v.GetInt(); }
468 static ValueType& Set(ValueType& v,
long data) {
return v.SetInt(data); }
469 static ValueType& Set(ValueType& v,
long data,
typename ValueType::AllocatorType&) {
return v.SetInt(data); }
473 template<
typename ValueType>
474 struct TypeHelper<ValueType, unsigned long> {
475 static bool Is(
const ValueType& v) {
return v.IsUint(); }
476 static unsigned long Get(
const ValueType& v) {
return v.GetUint(); }
477 static ValueType& Set(ValueType& v,
unsigned long data) {
return v.SetUint(data); }
478 static ValueType& Set(ValueType& v,
unsigned long data,
typename ValueType::AllocatorType&) {
return v.SetUint(data); }
482 template<
typename ValueType>
484 static bool Is(
const ValueType& v) {
return v.IsInt64(); }
485 static int64_t Get(
const ValueType& v) {
return v.GetInt64(); }
486 static ValueType&
Set(ValueType& v,
int64_t data) {
return v.SetInt64(data); }
487 static ValueType&
Set(ValueType& v,
int64_t data,
typename ValueType::AllocatorType&) {
return v.SetInt64(data); }
490 template<
typename ValueType>
492 static bool Is(
const ValueType& v) {
return v.IsUint64(); }
494 static ValueType&
Set(ValueType& v,
uint64_t data) {
return v.SetUint64(data); }
495 static ValueType&
Set(ValueType& v,
uint64_t data,
typename ValueType::AllocatorType&) {
return v.SetUint64(data); }
498 template<
typename ValueType>
500 static bool Is(
const ValueType& v) {
return v.IsDouble(); }
501 static double Get(
const ValueType& v) {
return v.GetDouble(); }
502 static ValueType&
Set(ValueType& v,
double data) {
return v.SetDouble(data); }
503 static ValueType&
Set(ValueType& v,
double data,
typename ValueType::AllocatorType&) {
return v.SetDouble(data); }
506 template<
typename ValueType>
508 static bool Is(
const ValueType& v) {
return v.IsFloat(); }
509 static float Get(
const ValueType& v) {
return v.GetFloat(); }
510 static ValueType&
Set(ValueType& v,
float data) {
return v.SetFloat(data); }
511 static ValueType&
Set(ValueType& v,
float data,
typename ValueType::AllocatorType&) {
return v.SetFloat(data); }
514 template<
typename ValueType>
517 static bool Is(
const ValueType& v) {
return v.IsString(); }
519 static ValueType&
Set(ValueType& v,
const StringType data) {
return v.SetString(
typename ValueType::StringRefType(data)); }
520 static ValueType&
Set(ValueType& v,
const StringType data,
typename ValueType::AllocatorType&
a) {
return v.SetString(data,
a); }
523 #if CEREAL_RAPIDJSON_HAS_STDSTRING
524 template<
typename ValueType>
525 struct TypeHelper<ValueType,
std::basic_string<typename ValueType::Ch> > {
526 typedef std::basic_string<typename ValueType::Ch> StringType;
527 static bool Is(
const ValueType& v) {
return v.IsString(); }
528 static StringType Get(
const ValueType& v) {
return StringType(v.GetString(), v.GetStringLength()); }
529 static ValueType& Set(ValueType& v,
const StringType& data,
typename ValueType::AllocatorType&
a) {
return v.SetString(data,
a); }
533 template<
typename ValueType>
536 static bool Is(
const ValueType& v) {
return v.IsArray(); }
538 static ValueType&
Set(ValueType& v,
ArrayType data) {
return v = data; }
539 static ValueType&
Set(ValueType& v,
ArrayType data,
typename ValueType::AllocatorType&) {
return v = data; }
542 template<
typename ValueType>
543 struct TypeHelper<ValueType, typename ValueType::ConstArray> {
545 static bool Is(
const ValueType& v) {
return v.IsArray(); }
549 template<
typename ValueType>
552 static bool Is(
const ValueType& v) {
return v.IsObject(); }
555 static ValueType&
Set(ValueType& v,
ObjectType data,
typename ValueType::AllocatorType&) {
return v = data; }
558 template<
typename ValueType>
559 struct TypeHelper<ValueType, typename ValueType::ConstObject> {
561 static bool Is(
const ValueType& v) {
return v.IsObject(); }
584 template <
typename Encoding,
typename Allocator = MemoryPoolAllocator<> >
591 typedef typename Encoding::Ch
Ch;
609 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
620 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
622 template <
typename StackAllocator>
626 template <
typename StackAllocator>
638 static const uint16_t defaultFlags[] = {
658 template <
typename SourceAllocator>
660 switch (rhs.GetType()) {
665 for (
SizeType i = 0; i < count; i++) {
678 for (
SizeType i = 0; i < count; i++)
679 new (&le[i])
GenericValue(re[i], allocator, copyConstStrings);
706 #ifndef CEREAL_RAPIDJSON_DOXYGEN_RUNNING
707 template <
typename T>
708 explicit GenericValue(T b, CEREAL_RAPIDJSON_ENABLEIF((internal::IsSame<bool, T>))) CEREAL_RAPIDJSON_NOEXCEPT
775 #if CEREAL_RAPIDJSON_HAS_STDSTRING
789 a.value_.data_ =
Data();
800 o.value_.data_ =
Data();
808 if (Allocator::kNeedFree) {
851 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
854 return *
this = rhs.Move();
880 template <
typename T>
894 template <
typename SourceAllocator>
898 new (
this)
GenericValue(rhs, allocator, copyConstStrings);
911 other.RawAssign(temp);
931 GenericValue& Move() CEREAL_RAPIDJSON_NOEXCEPT {
return *
this; }
941 template <
typename SourceAllocator>
944 if (GetType() != rhs.GetType())
951 for (
ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) {
952 typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
953 if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)
962 if ((*
this)[i] != rhs[i])
970 if (IsDouble() || rhs.IsDouble()) {
971 double a = GetDouble();
972 double b = rhs.GetDouble();
973 return a >= b &&
a <= b;
986 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1001 template <
typename SourceAllocator>
1005 bool operator!=(
const Ch* rhs)
const {
return !(*
this == rhs); }
1042 bool IsLosslessDouble()
const {
1043 if (!IsNumber())
return false;
1046 volatile double d =
static_cast<double>(u);
1048 && (d < static_cast<double>((std::numeric_limits<uint64_t>::max)()))
1053 volatile double d =
static_cast<double>(i);
1054 return (
d >=
static_cast<double>((std::numeric_limits<int64_t>::min)()))
1055 && (
d <
static_cast<double>((std::numeric_limits<int64_t>::max)()))
1062 bool IsFloat()
const {
1065 double d = GetDouble();
1066 return d >= -3.4028234e38 &&
d <= 3.4028234e38;
1069 bool IsLosslessFloat()
const {
1070 if (!IsNumber())
return false;
1071 double a = GetDouble();
1072 if (
a <
static_cast<double>(-(std::numeric_limits<float>::max)())
1073 ||
a >
static_cast<double>((std::numeric_limits<float>::max)()))
1075 double b =
static_cast<double>(
static_cast<float>(
a));
1076 return a >= b &&
a <= b;
1123 template <
typename T>
1128 template <
typename T>
1140 template <
typename SourceAllocator>
1143 if (member != MemberEnd())
1144 return member->value;
1157 template <
typename SourceAllocator>
1160 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1202 bool HasMember(
const Ch* name)
const {
return FindMember(name) != MemberEnd(); }
1204 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1213 bool HasMember(
const std::basic_string<Ch>& name)
const {
return FindMember(name) != MemberEnd(); }
1225 template <
typename SourceAllocator>
1242 return FindMember(n);
1260 template <
typename SourceAllocator>
1265 for ( ; member != MemberEnd(); ++member)
1266 if (name.StringEqual(member->name))
1272 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1299 if (o.size >= o.capacity)
1300 MemberReserve(o.capacity == 0 ?
kDefaultObjectCapacity : (o.capacity + (o.capacity + 1) / 2), allocator);
1302 members[o.size].name.RawAssign(name);
1303 members[o.size].value.RawAssign(
value);
1319 return AddMember(name, v, allocator);
1322 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1334 return AddMember(name, v, allocator);
1355 template <
typename T>
1359 return AddMember(name, v, allocator);
1362 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
1364 return AddMember(name,
value, allocator);
1367 return AddMember(name,
value, allocator);
1370 return AddMember(name,
value, allocator);
1374 return AddMember(n,
value, allocator);
1391 return AddMember(n,
value, allocator);
1405 return AddMember(name, v, allocator);
1425 template <
typename T>
1429 return AddMember(n,
value, allocator);
1436 void RemoveAllMembers() {
1451 bool RemoveMember(
const Ch* name) {
1453 return RemoveMember(n);
1456 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1457 bool RemoveMember(
const std::basic_string<Ch>& name) {
return RemoveMember(
GenericValue(
StringRef(name))); }
1460 template <
typename SourceAllocator>
1463 if (m != MemberEnd()) {
1504 return EraseMember(
pos,
pos +1);
1527 std::memmove(
static_cast<void*
>(&*
pos), &*last,
static_cast<size_t>(MemberEnd() - last) *
sizeof(
Member));
1537 bool EraseMember(
const Ch* name) {
1539 return EraseMember(n);
1542 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1543 bool EraseMember(
const std::basic_string<Ch>& name) {
return EraseMember(
GenericValue(
StringRef(name))); }
1546 template <
typename SourceAllocator>
1549 if (m != MemberEnd()) {
1648 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
1650 return PushBack(
value, allocator);
1664 return (*this).template PushBack<StringRefType>(
value, allocator);
1684 template <
typename T>
1688 return PushBack(v, allocator);
1710 return Erase(
pos,
pos + 1);
1730 itr->~GenericValue();
1731 std::memmove(
static_cast<void*
>(
pos), last,
static_cast<size_t>(End() - last) *
sizeof(
GenericValue));
1752 double GetDouble()
const {
1764 float GetFloat()
const {
1765 return static_cast<float>(GetDouble());
1830 #if CEREAL_RAPIDJSON_HAS_STDSTRING
1850 template <
typename T>
1853 template <
typename T>
1856 template <
typename T>
1859 template<
typename T>
1862 template<
typename T>
1874 template <
typename Handler>
1875 bool Accept(
Handler& handler)
const {
1879 case kTrueType:
return handler.Bool(
true);
1906 if (IsDouble())
return handler.Double(
data_.
n.
d);
1907 else if (IsInt())
return handler.Int(
data_.
n.
i.
i);
1908 else if (IsUint())
return handler.Uint(
data_.
n.
u.
u);
1909 else if (IsInt64())
return handler.Int64(
data_.
n.
i64);
1910 else return handler.Uint64(
data_.
n.
u64);
1915 template <
typename,
typename>
friend class GenericValue;
1953 #if CEREAL_RAPIDJSON_48BITPOINTER_OPTIMIZATION
1955 #elif CEREAL_RAPIDJSON_64BIT
1988 #if CEREAL_RAPIDJSON_ENDIAN == CEREAL_RAPIDJSON_LITTLEENDIAN
2046 std::memcpy(
static_cast<void*
>(e), values, count *
sizeof(
GenericValue));
2059 std::memcpy(
static_cast<void*
>(m), members, count *
sizeof(
Member));
2083 str =
static_cast<Ch *
>(allocator.Malloc((s.
length + 1) *
sizeof(
Ch)));
2086 std::memcpy(str, s, s.
length *
sizeof(
Ch));
2097 template <
typename SourceAllocator>
2102 const SizeType len1 = GetStringLength();
2103 const SizeType len2 = rhs.GetStringLength();
2104 if(len1 != len2) {
return false; }
2106 const Ch*
const str1 = GetString();
2107 const Ch*
const str2 = rhs.GetString();
2108 if(str1 == str2) {
return true; }
2110 return (std::memcmp(str1, str2,
sizeof(
Ch) * len1) == 0);
2130 template <
typename Encoding,
typename Allocator = MemoryPoolAllocator<>,
typename StackAllocator = CrtAllocator>
2133 typedef typename Encoding::Ch
Ch;
2164 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
2167 :
ValueType(std::forward<ValueType>(rhs)),
2170 stack_(std::move(rhs.stack_)),
2174 rhs.ownAllocator_ = 0;
2183 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
2196 stack_ = std::move(rhs.stack_);
2200 rhs.ownAllocator_ = 0;
2245 template <
typename Generator>
2265 template <
unsigned parseFlags,
typename SourceEncoding,
typename InputStream>
2270 parseResult_ = reader.template Parse<parseFlags>(is, *
this);
2284 template <
unsigned parseFlags,
typename InputStream>
2286 return ParseStream<parseFlags, Encoding, InputStream>(is);
2294 template <
typename InputStream>
2296 return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
2308 template <
unsigned parseFlags>
2311 return ParseStream<parseFlags | kParseInsituFlag>(s);
2319 return ParseInsitu<kParseDefaultFlags>(str);
2331 template <
unsigned parseFlags,
typename SourceEncoding>
2335 return ParseStream<parseFlags, SourceEncoding>(s);
2342 template <
unsigned parseFlags>
2344 return Parse<parseFlags, Encoding>(str);
2351 return Parse<kParseDefaultFlags>(str);
2354 template <
unsigned parseFlags,
typename SourceEncoding>
2357 MemoryStream ms(
reinterpret_cast<const char*
>(str), length *
sizeof(
typename SourceEncoding::Ch));
2359 ParseStream<parseFlags, SourceEncoding>(is);
2363 template <
unsigned parseFlags>
2365 return Parse<parseFlags, Encoding>(str, length);
2369 return Parse<kParseDefaultFlags>(str, length);
2372 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2373 template <
unsigned parseFlags,
typename SourceEncoding>
2376 return Parse<parseFlags, SourceEncoding>(str.c_str());
2379 template <
unsigned parseFlags>
2381 return Parse<parseFlags, Encoding>(str.c_str());
2385 return Parse<kParseDefaultFlags>(str);
2474 stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount,
GetAllocator());
2482 stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount,
GetAllocator());
2493 if (Allocator::kNeedFree)
2520 template <
bool Const,
typename ValueT>
2532 template <
typename,
typename>
2548 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
2557 #if CEREAL_RAPIDJSON_HAS_CXX11_RANGE_FOR
2573 template <
bool Const,
typename ValueT>
2585 typedef typename ValueType::Ch
Ch;
2587 template <
typename,
typename>
2599 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2606 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2607 bool HasMember(
const std::basic_string<Ch>& name)
const {
return value_.HasMember(name); }
2612 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2617 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2621 #if CEREAL_RAPIDJSON_HAS_CXX11_RVALUE_REFS
2632 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2633 bool RemoveMember(
const std::basic_string<Ch>& name)
const {
return value_.RemoveMember(name); }
2640 #if CEREAL_RAPIDJSON_HAS_STDSTRING
2645 #if CEREAL_RAPIDJSON_HAS_CXX11_RANGE_FOR
2657 CEREAL_RAPIDJSON_DIAG_POP
#define CEREAL_RAPIDJSON_ASSERT(x)
Definition: json.hpp:50
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition: json.hpp:15536
EncodingType
Definition: Xml.h:26
Helper class for accessing Value of array type.
Definition: document.h:2521
const ValueT * ConstValueIterator
Definition: document.h:2528
GenericArray PushBack(ValueType &value, AllocatorType &allocator) const
Definition: document.h:2547
CEREAL_RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(const GenericArray &)) PushBack(T value
ValueIterator End() const
Definition: document.h:2545
ValueIterator Begin() const
Definition: document.h:2544
void Clear() const
Definition: document.h:2542
SizeType Size() const
Definition: document.h:2539
GenericArray< false, ValueT > Array
Definition: document.h:2524
GenericArray Reserve(SizeType newCapacity, AllocatorType &allocator) const
Definition: document.h:2546
GenericArray< true, ValueT > ConstArray
Definition: document.h:2523
ValueType::StringRefType StringRefType
Definition: document.h:2530
internal::MaybeAddConst< Const, PlainType >::Type ValueType
Definition: document.h:2526
~GenericArray()
Definition: document.h:2537
ValueType & operator[](SizeType index) const
Definition: document.h:2543
GenericArray(const GenericArray &rhs)
Definition: document.h:2535
SizeType Capacity() const
Definition: document.h:2540
ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) const
Definition: document.h:2555
GenericArray & operator=(const GenericArray &rhs)
Definition: document.h:2536
GenericArray PushBack(StringRefType value, AllocatorType &allocator) const
Definition: document.h:2551
ValueT PlainType
Definition: document.h:2525
ValueIterator Erase(ConstValueIterator pos) const
Definition: document.h:2554
GenericArray(ValueType &value)
Definition: document.h:2564
bool Empty() const
Definition: document.h:2541
ValueType::AllocatorType AllocatorType
Definition: document.h:2529
ValueType & value_
Definition: document.h:2565
ValueType * ValueIterator
Definition: document.h:2527
GenericArray PopBack() const
Definition: document.h:2553
A document for parsing JSON text as DOM.
Definition: document.h:2131
bool EndArray(SizeType elementCount)
Definition: document.h:2480
GenericDocument & ParseInsitu(Ch *str)
Parse JSON text from a mutable string.
Definition: document.h:2309
friend void swap(GenericDocument &a, GenericDocument &b) CEREAL_RAPIDJSON_NOEXCEPT
free-standing swap function helper
Definition: document.h:2238
Allocator AllocatorType
Allocator type from template parameter.
Definition: document.h:2135
GenericDocument & Populate(Generator &g)
Populate this document by a generator which produces SAX events.
Definition: document.h:2246
GenericDocument(Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
Constructor.
Definition: document.h:2144
bool EndObject(SizeType memberCount)
Definition: document.h:2472
GenericDocument & Parse(const typename SourceEncoding::Ch *str, size_t length)
Definition: document.h:2355
ParseResult parseResult_
Definition: document.h:2509
GenericDocument & Parse(const Ch *str)
Parse JSON text from a read-only string (with kParseDefaultFlags)
Definition: document.h:2350
bool Bool(bool b)
Definition: document.h:2445
bool Uint64(uint64_t i)
Definition: document.h:2449
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
Definition: document.h:2395
bool Uint(unsigned i)
Definition: document.h:2447
GenericDocument(const GenericDocument &)
Prohibit copying.
GenericDocument & Parse(const Ch *str)
Parse JSON text from a read-only string.
Definition: document.h:2343
bool Key(const Ch *str, SizeType length, bool copy)
Definition: document.h:2470
GenericDocument(Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
Constructor.
Definition: document.h:2157
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream.
Definition: document.h:2285
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:2133
GenericDocument & ParseInsitu(Ch *str)
Parse JSON text from a mutable string (with kParseDefaultFlags)
Definition: document.h:2318
bool Null()
Definition: document.h:2444
GenericValue< Encoding, Allocator > ValueType
Value type of the document.
Definition: document.h:2134
bool Int(int i)
Definition: document.h:2446
static const size_t kDefaultStackCapacity
Definition: document.h:2505
bool Int64(int64_t i)
Definition: document.h:2448
bool Double(double d)
Definition: document.h:2450
GenericDocument & Parse(const Ch *str, size_t length)
Definition: document.h:2364
ParseErrorCode GetParseError() const
Get the ParseErrorCode of last parsing.
Definition: document.h:2398
Allocator * allocator_
Definition: document.h:2506
size_t GetStackCapacity() const
Get the capacity of stack in bytes.
Definition: document.h:2425
GenericDocument & Swap(GenericDocument &rhs) CEREAL_RAPIDJSON_NOEXCEPT
Exchange the contents of this document with those of another.
Definition: document.h:2213
Allocator & GetAllocator()
Get the allocator of this document.
Definition: document.h:2419
void ClearStack()
Definition: document.h:2492
~GenericDocument()
Definition: document.h:2179
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
Definition: document.h:2332
GenericDocument & Parse(const Ch *str, size_t length)
Definition: document.h:2368
bool StartObject()
Definition: document.h:2468
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream (with kParseDefaultFlags)
Definition: document.h:2295
internal::Stack< StackAllocator > stack_
Definition: document.h:2508
bool String(const Ch *str, SizeType length, bool copy)
Definition: document.h:2460
void Destroy()
Definition: document.h:2501
Allocator * ownAllocator_
Definition: document.h:2507
bool StartArray()
Definition: document.h:2478
size_t GetErrorOffset() const
Get the position of last parsing error in input, 0 otherwise.
Definition: document.h:2401
GenericDocument & operator=(const GenericDocument &)
Prohibit assignment.
bool RawNumber(const Ch *str, SizeType length, bool copy)
Definition: document.h:2452
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream (with Encoding conversion)
Definition: document.h:2266
(Constant) member iterator for a JSON object value
Definition: document.h:105
internal::MaybeAddConst< Const, PlainType >::Type ValueType
Definition: document.h:111
ValueType & reference
Definition: document.h:125
bool operator>(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:186
bool operator<=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:183
Iterator & operator+=(DifferenceType n)
Definition: document.h:175
GenericMemberIterator(const NonConstIterator &it)
Iterator conversions to more const.
Definition: document.h:159
GenericMemberIterator()
Default constructor (singular value)
Definition: document.h:141
Iterator operator-(DifferenceType n) const
Definition: document.h:173
std::random_access_iterator_tag iterator_category
Definition: document.h:127
Reference operator[](DifferenceType n) const
Definition: document.h:197
Iterator operator--(int)
Definition: document.h:167
Iterator operator+(DifferenceType n) const
Definition: document.h:172
Iterator & operator=(const NonConstIterator &it)
Definition: document.h:160
Reference operator*() const
Definition: document.h:195
Iterator & operator--()
Definition: document.h:165
GenericMemberIterator(Pointer p)
Internal constructor from plain pointer.
Definition: document.h:205
ValueType value_type
Definition: document.h:123
bool operator==(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:181
ValueType * pointer
Definition: document.h:124
Iterator & operator-=(DifferenceType n)
Definition: document.h:176
reference Reference
Reference to (const) GenericMember.
Definition: document.h:133
Iterator operator++(int)
Definition: document.h:166
Pointer ptr_
raw pointer
Definition: document.h:207
difference_type DifferenceType
Signed integer type (e.g. ptrdiff_t)
Definition: document.h:135
bool operator<(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:185
bool operator>=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:184
GenericMemberIterator< false, Encoding, Allocator > NonConstIterator
Non-constant iterator type.
Definition: document.h:119
Pointer operator->() const
Definition: document.h:196
pointer Pointer
Pointer to (const) GenericMember.
Definition: document.h:131
GenericMember< Encoding, Allocator > PlainType
Definition: document.h:110
GenericMemberIterator Iterator
Iterator type itself.
Definition: document.h:115
bool operator!=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:182
DifferenceType operator-(ConstIterator that) const
Distance.
Definition: document.h:201
GenericMemberIterator< true, Encoding, Allocator > ConstIterator
Constant iterator type.
Definition: document.h:117
std::ptrdiff_t difference_type
Definition: document.h:126
Iterator & operator++()
Definition: document.h:164
Helper class for accessing Value of object type.
Definition: document.h:2574
MemberIterator RemoveMember(MemberIterator m) const
Definition: document.h:2636
ValueType::AllocatorType AllocatorType
Definition: document.h:2582
GenericObject AddMember(StringRefType name, ValueType &value, AllocatorType &allocator) const
Definition: document.h:2627
SizeType MemberCapacity() const
Definition: document.h:2595
bool HasMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2609
GenericObject(const GenericObject &rhs)
Definition: document.h:2590
void RemoveAllMembers()
Definition: document.h:2630
MemberIterator FindMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2611
T value
Definition: document.h:2620
SizeType MemberCount() const
Definition: document.h:2594
ValueType & operator[](const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2598
GenericMemberIterator< Const, typename ValueT::EncodingType, typename ValueT::AllocatorType > MemberIterator
Definition: document.h:2580
ValueType & value_
Definition: document.h:2653
MemberIterator EraseMember(ConstMemberIterator pos) const
Definition: document.h:2637
ValueType & operator[](T *name) const
Definition: document.h:2597
GenericObject AddMember(ValueType &name, ValueType &value, AllocatorType &allocator) const
Definition: document.h:2615
GenericObject AddMember(StringRefType name, StringRefType value, AllocatorType &allocator) const
Definition: document.h:2628
ValueT PlainType
Definition: document.h:2578
bool EraseMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2643
GenericObject(ValueType &value)
Definition: document.h:2652
MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) const
Definition: document.h:2638
MemberIterator MemberEnd() const
Definition: document.h:2603
~GenericObject()
Definition: document.h:2592
bool RemoveMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2635
internal::MaybeAddConst< Const, PlainType >::Type ValueType
Definition: document.h:2579
ValueType::EncodingType EncodingType
Definition: document.h:2584
MemberIterator FindMember(const Ch *name) const
Definition: document.h:2610
bool HasMember(const Ch *name) const
Definition: document.h:2605
ValueType::StringRefType StringRefType
Definition: document.h:2583
bool ObjectEmpty() const
Definition: document.h:2596
CEREAL_RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) AddMember(ValueType &name
CEREAL_RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(GenericObject)) AddMember(StringRefType name
ValueType::Ch Ch
Definition: document.h:2585
GenericObject AddMember(ValueType &name, StringRefType value, AllocatorType &allocator) const
Definition: document.h:2616
GenericObject< false, ValueT > Object
Definition: document.h:2577
bool RemoveMember(const Ch *name) const
Definition: document.h:2631
GenericObject< true, ValueT > ConstObject
Definition: document.h:2576
bool EraseMember(const Ch *name) const
Definition: document.h:2639
GenericMemberIterator< true, typename ValueT::EncodingType, typename ValueT::AllocatorType > ConstMemberIterator
Definition: document.h:2581
MemberIterator MemberBegin() const
Definition: document.h:2602
GenericObject MemberReserve(SizeType newCapacity, AllocatorType &allocator) const
Definition: document.h:2604
GenericObject & operator=(const GenericObject &rhs)
Definition: document.h:2591
SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.
Definition: reader.h:537
Represents a JSON value. Use Value for UTF8 encoding and default allocator.
Definition: document.h:585
GenericValue(int64_t i64) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for int64_t value.
Definition: document.h:731
void RawAssign(GenericValue &rhs) CEREAL_RAPIDJSON_NOEXCEPT
Assignment without calling destructor.
Definition: document.h:2091
GenericArray< false, ValueType > Array
Definition: document.h:598
GenericValue & operator=(GenericValue &rhs) CEREAL_RAPIDJSON_NOEXCEPT
Assignment with move semantics.
Definition: document.h:843
void SetStringRaw(StringRefType s) CEREAL_RAPIDJSON_NOEXCEPT
Initialize this value as constant string, without calling destructor.
Definition: document.h:2067
static const SizeType kDefaultArrayCapacity
Definition: document.h:1949
GenericValue(double d) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for double value.
Definition: document.h:758
~GenericValue()
Destructor.
Definition: document.h:807
void SetObjectRaw(Member *members, SizeType count, Allocator &allocator)
Initialize this value as object with initial data, without calling destructor.
Definition: document.h:2054
static const SizeType kDefaultObjectCapacity
Definition: document.h:1950
Encoding EncodingType
Encoding type from template parameter.
Definition: document.h:589
GenericStringRef< Ch > StringRefType
Reference to a constant string.
Definition: document.h:592
GenericMemberIterator< false, Encoding, Allocator >::Iterator MemberIterator
Member iterator for iterating in object.
Definition: document.h:593
GenericValue(float f) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for float value.
Definition: document.h:761
CEREAL_RAPIDJSON_FORCEINLINE GenericValue * SetElementsPointer(GenericValue *elements)
Definition: document.h:2036
GenericValue< Encoding, Allocator > ValueType
Value type of itself.
Definition: document.h:597
const GenericValue * ConstValueIterator
Constant value iterator for iterating in array.
Definition: document.h:596
GenericValue(T b, CEREAL_RAPIDJSON_ENABLEIF((internal::IsSame< bool, T >))) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for boolean value.
Definition: document.h:708
GenericValue(unsigned u) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for unsigned value.
Definition: document.h:725
GenericObject< true, ValueType > ConstObject
Definition: document.h:601
GenericValue & operator=(StringRefType str) CEREAL_RAPIDJSON_NOEXCEPT
Assignment of constant string reference (no copy)
Definition: document.h:863
CEREAL_RAPIDJSON_FORCEINLINE const Ch * SetStringPointer(const Ch *str)
Definition: document.h:2034
GenericValue(const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator, bool copyConstStrings=false)
Explicit copy constructor (with allocator)
Definition: document.h:659
Allocator AllocatorType
Allocator type from template parameter.
Definition: document.h:590
GenericValue() CEREAL_RAPIDJSON_NOEXCEPT
Default constructor creates a null value.
Definition: document.h:607
GenericMember< Encoding, Allocator > Member
Name-value pair in an object.
Definition: document.h:588
GenericValue(StringRefType s) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for constant string (i.e. do not make a copy of string)
Definition: document.h:767
GenericArray< true, ValueType > ConstArray
Definition: document.h:599
CEREAL_RAPIDJSON_FORCEINLINE const Ch * GetStringPointer() const
Definition: document.h:2033
void SetArrayRaw(GenericValue *values, SizeType count, Allocator &allocator)
Definition: document.h:2041
GenericValue(const Ch *s, Allocator &allocator)
Constructor for copy-string (i.e. do make a copy of string)
Definition: document.h:773
GenericValue(const Ch *s, SizeType length, Allocator &allocator)
Constructor for copy-string (i.e. do make a copy of string)
Definition: document.h:770
CEREAL_RAPIDJSON_DISABLEIF_RETURN((internal::IsPointer< T >),(GenericValue &)) operator
Assignment with primitive types.
GenericValue(int i) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for int value.
Definition: document.h:719
GenericMemberIterator< true, Encoding, Allocator >::Iterator ConstMemberIterator
Constant member iterator for iterating in object.
Definition: document.h:594
@ kCopyStringFlag
Definition: document.h:1941
@ kCopyFlag
Definition: document.h:1927
@ kNumberDoubleFlag
Definition: document.h:1938
@ kConstStringFlag
Definition: document.h:1940
@ kFalseFlag
Definition: document.h:1933
@ kDoubleFlag
Definition: document.h:1925
@ kTrueFlag
Definition: document.h:1932
@ kTypeMask
Definition: document.h:1946
@ kUintFlag
Definition: document.h:1922
@ kInt64Flag
Definition: document.h:1923
@ kNullFlag
Definition: document.h:1931
@ kNumberFlag
Definition: document.h:1920
@ kNumberUint64Flag
Definition: document.h:1937
@ kNumberAnyFlag
Definition: document.h:1939
@ kObjectFlag
Definition: document.h:1943
@ kBoolFlag
Definition: document.h:1919
@ kUint64Flag
Definition: document.h:1924
@ kShortStringFlag
Definition: document.h:1942
@ kNumberIntFlag
Definition: document.h:1934
@ kNumberInt64Flag
Definition: document.h:1936
@ kIntFlag
Definition: document.h:1921
@ kInlineStrFlag
Definition: document.h:1928
@ kNumberUintFlag
Definition: document.h:1935
@ kStringFlag
Definition: document.h:1926
@ kArrayFlag
Definition: document.h:1944
CEREAL_RAPIDJSON_FORCEINLINE Member * GetMembersPointer() const
Definition: document.h:2037
Data data_
Definition: document.h:2113
friend class GenericDocument
Definition: document.h:1916
CEREAL_RAPIDJSON_FORCEINLINE Member * SetMembersPointer(Member *members)
Definition: document.h:2038
GenericValue(const Ch *s, SizeType length) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for constant string (i.e. do not make a copy of string)
Definition: document.h:764
CEREAL_RAPIDJSON_FORCEINLINE GenericValue * GetElementsPointer() const
Definition: document.h:2035
GenericValue(const GenericValue &rhs)
Copy constructor is not permitted.
GenericValue(Array a) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for Array.
Definition: document.h:788
void SetStringRaw(StringRefType s, Allocator &allocator)
Initialize this value as copy string with initial data, without calling destructor.
Definition: document.h:2074
bool StringEqual(const GenericValue< Encoding, SourceAllocator > &rhs) const
Definition: document.h:2098
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:591
GenericValue(Type type) CEREAL_RAPIDJSON_NOEXCEPT
Constructor with JSON value type.
Definition: document.h:637
GenericValue(Object o) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for Object.
Definition: document.h:799
GenericValue * ValueIterator
Value iterator for iterating in array.
Definition: document.h:595
GenericObject< false, ValueType > Object
Definition: document.h:600
GenericValue(uint64_t u64) CEREAL_RAPIDJSON_NOEXCEPT
Constructor for uint64_t value.
Definition: document.h:746
void Clear()
Definition: stack.h:99
void ShrinkToFit()
Definition: stack.h:101
bool HasAllocator() const
Definition: stack.h:168
size_t GetCapacity() const
Definition: stack.h:179
Allocator & GetAllocator()
Definition: stack.h:172
size_t GetSize() const
Definition: stack.h:178
void Swap(Stack &rhs) CEREAL_RAPIDJSON_NOEXCEPT
Definition: stack.h:90
Concept for allocating, resizing and freeing memory block.
Concept for encoding of Unicode characters.
Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Definition: document.h:2117
GenericStringRef< CharType > StringRef(const CharType *str)
Mark a character pointer as constant string.
Definition: document.h:371
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
Definition: document.h:2513
#define CEREAL_RAPIDJSON_NOEXCEPT_ASSERT(x)
Assertion (in non-throwing contexts).
Definition: rapidjson.h:618
#define CEREAL_RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
#define CEREAL_RAPIDJSON_UNLIKELY(x)
Compiler branching hint for expression with low probability to be true.
Definition: rapidjson.h:476
#define CEREAL_RAPIDJSON_LIKELY(x)
Compiler branching hint for expression with high probability to be true.
Definition: rapidjson.h:463
#define CEREAL_RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124
ParseErrorCode
Error code of parsing.
Definition: error.h:64
bool operator==(const cp< d > &a, const cp< d > &b)
Contact equivalence is based solely on the index of objects in contact i and j.
Definition: ContactList.h:291
@ pos
Definition: Typedefs.h:19
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
Definition: document.h:416
SizeType StrLen(const Ch *s)
Custom strlen() which works on different character types.
Definition: strfunc.h:31
void Swap(T &a, T &b) CEREAL_RAPIDJSON_NOEXCEPT
Custom swap() to avoid dependency on C++ <algorithm> header.
Definition: swap.h:33
Definition: json.hpp:5678
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1282
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
void swap(T &lhs, T &rhs)
Definition: pugixml.cpp:7597
#define CEREAL_RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:445
Type
Type of JSON value.
Definition: rapidjson.h:644
@ kFalseType
false
Definition: rapidjson.h:646
@ kObjectType
object
Definition: rapidjson.h:648
@ kTrueType
true
Definition: rapidjson.h:647
@ kStringType
string
Definition: rapidjson.h:650
@ kNullType
null
Definition: rapidjson.h:645
@ kArrayType
array
Definition: rapidjson.h:649
@ kNumberType
number
Definition: rapidjson.h:651
#define CEREAL_RAPIDJSON_GETPOINTER(type, p)
Definition: rapidjson.h:319
#define CEREAL_RAPIDJSON_DELETE(x)
! customization point for global delete
Definition: rapidjson.h:631
#define CEREAL_RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
Definition: rapidjson.h:289
#define CEREAL_RAPIDJSON_SETPOINTER(type, p, x)
Definition: rapidjson.h:318
#define CEREAL_RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition: rapidjson.h:627
CEREAL_RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:384
@ kParseInsituFlag
In-situ(destructive) parsing.
Definition: reader.h:147
unsigned short uint16_t
Definition: stdint.h:125
signed __int64 int64_t
Definition: stdint.h:135
unsigned __int64 uint64_t
Definition: stdint.h:136
Definition: document.h:2429
ClearStackOnExit & operator=(const ClearStackOnExit &)
GenericDocument & d_
Definition: document.h:2435
ClearStackOnExit(GenericDocument &d)
Definition: document.h:2430
~ClearStackOnExit()
Definition: document.h:2431
ClearStackOnExit(const ClearStackOnExit &)
A read-write string stream.
Definition: stream.h:188
Name-value pair in a JSON object value.
Definition: document.h:69
friend void swap(GenericMember &a, GenericMember &b) CEREAL_RAPIDJSON_NOEXCEPT
Definition: document.h:74
GenericValue< Encoding, Allocator > name
name of member (must be a string)
Definition: document.h:70
GenericValue< Encoding, Allocator > value
value of member.
Definition: document.h:71
Reference to a constant string (not taking a copy)
Definition: document.h:263
CharType Ch
character type of the string
Definition: document.h:264
GenericStringRef(const CharType(&str)[N]) CEREAL_RAPIDJSON_NOEXCEPT
Create string reference from const character array.
Definition: document.h:292
GenericStringRef & operator=(const GenericStringRef &rhs)
Copy assignment operator not permitted - immutable type.
const SizeType length
length of the string (excluding the trailing NULL terminator)
Definition: document.h:337
GenericStringRef< CharType > StringRef(const CharType *str, size_t length)
Mark a character pointer as constant string.
Definition: document.h:391
GenericStringRef(const CharType *str, SizeType len)
Create constant string reference from pointer and length.
Definition: document.h:328
GenericStringRef(const CharType *str)
Explicitly create string reference from const character pointer.
Definition: document.h:316
GenericStringRef< CharType > StringRef(const CharType *str)
Mark a character pointer as constant string.
Definition: document.h:371
GenericStringRef(const GenericStringRef &rhs)
Definition: document.h:331
GenericStringRef(CharType(&str)[N])
Disallow construction from non-const array.
const Ch *const s
plain CharType pointer
Definition: document.h:336
static const Ch emptyString[]
Empty string - used when passing in a NULL pointer.
Definition: document.h:346
SizeType NotNullStrLen(const CharType *str)
Definition: document.h:340
Read-only string stream.
Definition: stream.h:154
Definition: document.h:2018
SizeType capacity
Definition: document.h:2020
SizeType size
Definition: document.h:2019
GenericValue * elements
Definition: document.h:2021
Definition: document.h:1952
uint16_t flags
Definition: document.h:1960
char payload[sizeof(SizeType) *2+sizeof(void *)+2]
Definition: document.h:1958
Definition: document.h:1989
int i
Definition: document.h:1990
char padding[4]
Definition: document.h:1991
Definition: document.h:1993
unsigned u
Definition: document.h:1994
char padding2[4]
Definition: document.h:1995
Definition: document.h:2012
Member * members
Definition: document.h:2015
SizeType capacity
Definition: document.h:2014
SizeType size
Definition: document.h:2013
Definition: document.h:1977
Ch str[MaxChars]
Definition: document.h:1979
SizeType GetLength() const
Definition: document.h:1983
static bool Usable(SizeType len)
Definition: document.h:1981
@ MaxChars
Definition: document.h:1978
@ MaxSize
Definition: document.h:1978
@ LenPos
Definition: document.h:1978
void SetLength(SizeType len)
Definition: document.h:1982
Definition: document.h:1963
const Ch * str
Definition: document.h:1966
SizeType hashcode
reserved
Definition: document.h:1965
SizeType length
Definition: document.h:1964
Represents an in-memory input byte stream.
Definition: memorystream.h:40
Result of parsing (wraps ParseErrorCode)
Definition: error.h:106
ParseErrorCode Code() const
Get the error code.
Definition: error.h:116
bool IsError() const
Whether the result is an error.
Definition: error.h:123
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Definition: error.h:118
Definition: document.h:419
Definition: document.h:426
static ValueType & Set(ValueType &v, bool data, typename ValueType::AllocatorType &)
Definition: document.h:443
static ValueType & Set(ValueType &v, bool data)
Definition: document.h:442
static bool Is(const ValueType &v)
Definition: document.h:440
static bool Get(const ValueType &v)
Definition: document.h:441
static StringType Get(const ValueType &v)
Definition: document.h:518
const ValueType::Ch * StringType
Definition: document.h:516
static ValueType & Set(ValueType &v, const StringType data, typename ValueType::AllocatorType &a)
Definition: document.h:520
static bool Is(const ValueType &v)
Definition: document.h:517
static ValueType & Set(ValueType &v, const StringType data)
Definition: document.h:519
static ValueType & Set(ValueType &v, double data)
Definition: document.h:502
static ValueType & Set(ValueType &v, double data, typename ValueType::AllocatorType &)
Definition: document.h:503
static bool Is(const ValueType &v)
Definition: document.h:500
static double Get(const ValueType &v)
Definition: document.h:501
static bool Is(const ValueType &v)
Definition: document.h:508
static ValueType & Set(ValueType &v, float data)
Definition: document.h:510
static ValueType & Set(ValueType &v, float data, typename ValueType::AllocatorType &)
Definition: document.h:511
static float Get(const ValueType &v)
Definition: document.h:509
static ValueType & Set(ValueType &v, int64_t data)
Definition: document.h:486
static bool Is(const ValueType &v)
Definition: document.h:484
static ValueType & Set(ValueType &v, int64_t data, typename ValueType::AllocatorType &)
Definition: document.h:487
static int64_t Get(const ValueType &v)
Definition: document.h:485
static ValueType & Set(ValueType &v, int data, typename ValueType::AllocatorType &)
Definition: document.h:451
static int Get(const ValueType &v)
Definition: document.h:449
static bool Is(const ValueType &v)
Definition: document.h:448
static ValueType & Set(ValueType &v, int data)
Definition: document.h:450
static ArrayType Get(ValueType &v)
Definition: document.h:537
static bool Is(const ValueType &v)
Definition: document.h:536
static ValueType & Set(ValueType &v, ArrayType data)
Definition: document.h:538
ValueType::Array ArrayType
Definition: document.h:535
static ValueType & Set(ValueType &v, ArrayType data, typename ValueType::AllocatorType &)
Definition: document.h:539
static ArrayType Get(const ValueType &v)
Definition: document.h:546
static bool Is(const ValueType &v)
Definition: document.h:545
ValueType::ConstArray ArrayType
Definition: document.h:544
static bool Is(const ValueType &v)
Definition: document.h:561
ValueType::ConstObject ObjectType
Definition: document.h:560
static ObjectType Get(const ValueType &v)
Definition: document.h:562
static ValueType & Set(ValueType &v, ObjectType data, typename ValueType::AllocatorType &)
Definition: document.h:555
static bool Is(const ValueType &v)
Definition: document.h:552
static ValueType & Set(ValueType &v, ObjectType data)
Definition: document.h:554
ValueType::Object ObjectType
Definition: document.h:551
static ObjectType Get(ValueType &v)
Definition: document.h:553
static uint64_t Get(const ValueType &v)
Definition: document.h:493
static ValueType & Set(ValueType &v, uint64_t data)
Definition: document.h:494
static ValueType & Set(ValueType &v, uint64_t data, typename ValueType::AllocatorType &)
Definition: document.h:495
static bool Is(const ValueType &v)
Definition: document.h:492
static ValueType & Set(ValueType &v, unsigned data)
Definition: document.h:458
static unsigned Get(const ValueType &v)
Definition: document.h:457
static ValueType & Set(ValueType &v, unsigned data, typename ValueType::AllocatorType &)
Definition: document.h:459
static bool Is(const ValueType &v)
Definition: document.h:456
Definition: document.h:436
Definition: document.h:2024
Number n
Definition: document.h:2027
ShortString ss
Definition: document.h:2026
String s
Definition: document.h:2025
Flag f
Definition: document.h:2030
ArrayData a
Definition: document.h:2029
ObjectData o
Definition: document.h:2028
Definition: document.h:1987
struct GenericValue::Number::I i
uint64_t u64
Definition: document.h:2008
struct GenericValue::Number::U u
double d
Definition: document.h:2009
int64_t i64
Definition: document.h:2007
#define const
Definition: zconf.h:233