 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
15 #ifndef RAPIDJSON_DOCUMENT_H_
16 #define RAPIDJSON_DOCUMENT_H_
27 #ifdef __cpp_lib_three_way_comparison
33 RAPIDJSON_DIAG_OFF(padded)
34 RAPIDJSON_DIAG_OFF(
switch-
enum)
35 RAPIDJSON_DIAG_OFF(c++98-compat)
36 #elif defined(_MSC_VER)
37 RAPIDJSON_DIAG_OFF(4127)
38 RAPIDJSON_DIAG_OFF(4244)
42 RAPIDJSON_DIAG_OFF(effc++)
49 #pragma push_macro("GetObject")
50 #define RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED
54 #ifndef RAPIDJSON_NOMEMBERITERATORCLASS
58 #if RAPIDJSON_USE_MEMBERSMAP
65 template <
typename Encoding,
typename Allocator>
68 template <
typename Encoding,
typename Allocator,
typename StackAllocator>
77 #ifndef RAPIDJSON_DEFAULT_ALLOCATOR
78 #define RAPIDJSON_DEFAULT_ALLOCATOR MemoryPoolAllocator<CrtAllocator>
87 #ifndef RAPIDJSON_DEFAULT_STACK_ALLOCATOR
88 #define RAPIDJSON_DEFAULT_STACK_ALLOCATOR CrtAllocator
97 #ifndef RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY
99 #define RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY 16
108 #ifndef RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY
110 #define RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY 16
119 template <
typename Encoding,
typename Allocator>
125 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
128 :
name(std::move(rhs.name)),
129 value(std::move(rhs.value))
153 a.value.Swap(b.value);
164 #ifndef RAPIDJSON_NOMEMBERITERATORCLASS
185 template <
bool Const,
typename Encoding,
typename Allocator>
269 #ifdef __cpp_lib_three_way_comparison
291 #else // RAPIDJSON_NOMEMBERITERATORCLASS
295 template <
bool Const,
typename Encoding,
typename Allocator>
299 template <
typename Encoding,
typename Allocator>
306 template <
typename Encoding,
typename Allocator>
313 #endif // RAPIDJSON_NOMEMBERITERATORCLASS
345 template<
typename CharType>
350 #ifndef __clang__ // -Wdocumentation
379 #ifndef __clang__ // -Wdocumentation
400 :
s(str),
length(NotNullStrLen(str)) {}
403 #ifndef __clang__ // -Wdocumentation
417 operator const Ch *()
const {
return s; }
423 SizeType NotNullStrLen(
const CharType* str) {
429 static const Ch emptyString[];
438 template<
typename CharType>
453 template<
typename CharType>
473 template<
typename CharType>
478 #if RAPIDJSON_HAS_STDSTRING
491 template<
typename CharType>
501 template <
typename T,
typename Encoding =
void,
typename Allocator =
void>
506 : IsBaseOf<GenericValue<typename T::EncodingType, typename T::AllocatorType>, T>
::Type {};
518 template <
typename ValueType,
typename T>
521 template<
typename ValueType>
523 static bool Is(
const ValueType& v) {
return v.IsBool(); }
524 static bool Get(
const ValueType& v) {
return v.GetBool(); }
525 static ValueType&
Set(ValueType& v,
bool data) {
return v.SetBool(data); }
526 static ValueType&
Set(ValueType& v,
bool data,
typename ValueType::AllocatorType&) {
return v.SetBool(data); }
529 template<
typename ValueType>
531 static bool Is(
const ValueType& v) {
return v.IsInt(); }
532 static int Get(
const ValueType& v) {
return v.GetInt(); }
533 static ValueType&
Set(ValueType& v,
int data) {
return v.SetInt(data); }
534 static ValueType&
Set(ValueType& v,
int data,
typename ValueType::AllocatorType&) {
return v.SetInt(data); }
537 template<
typename ValueType>
539 static bool Is(
const ValueType& v) {
return v.IsUint(); }
540 static unsigned Get(
const ValueType& v) {
return v.GetUint(); }
541 static ValueType&
Set(ValueType& v,
unsigned data) {
return v.SetUint(data); }
542 static ValueType&
Set(ValueType& v,
unsigned data,
typename ValueType::AllocatorType&) {
return v.SetUint(data); }
547 template<
typename ValueType>
548 struct TypeHelper<ValueType, long> {
549 static bool Is(
const ValueType& v) {
return v.IsInt(); }
550 static long Get(
const ValueType& v) {
return v.GetInt(); }
551 static ValueType& Set(ValueType& v,
long data) {
return v.SetInt(data); }
552 static ValueType& Set(ValueType& v,
long data,
typename ValueType::AllocatorType&) {
return v.SetInt(data); }
556 template<
typename ValueType>
557 struct TypeHelper<ValueType, unsigned long> {
558 static bool Is(
const ValueType& v) {
return v.IsUint(); }
559 static unsigned long Get(
const ValueType& v) {
return v.GetUint(); }
560 static ValueType& Set(ValueType& v,
unsigned long data) {
return v.SetUint(data); }
561 static ValueType& Set(ValueType& v,
unsigned long data,
typename ValueType::AllocatorType&) {
return v.SetUint(data); }
565 template<
typename ValueType>
567 static bool Is(
const ValueType& v) {
return v.IsInt64(); }
568 static int64_t Get(
const ValueType& v) {
return v.GetInt64(); }
569 static ValueType&
Set(ValueType& v,
int64_t data) {
return v.SetInt64(data); }
570 static ValueType&
Set(ValueType& v,
int64_t data,
typename ValueType::AllocatorType&) {
return v.SetInt64(data); }
573 template<
typename ValueType>
575 static bool Is(
const ValueType& v) {
return v.IsUint64(); }
577 static ValueType&
Set(ValueType& v,
uint64_t data) {
return v.SetUint64(data); }
578 static ValueType&
Set(ValueType& v,
uint64_t data,
typename ValueType::AllocatorType&) {
return v.SetUint64(data); }
581 template<
typename ValueType>
583 static bool Is(
const ValueType& v) {
return v.IsDouble(); }
584 static double Get(
const ValueType& v) {
return v.GetDouble(); }
585 static ValueType&
Set(ValueType& v,
double data) {
return v.SetDouble(data); }
586 static ValueType&
Set(ValueType& v,
double data,
typename ValueType::AllocatorType&) {
return v.SetDouble(data); }
589 template<
typename ValueType>
591 static bool Is(
const ValueType& v) {
return v.IsFloat(); }
592 static float Get(
const ValueType& v) {
return v.GetFloat(); }
593 static ValueType&
Set(ValueType& v,
float data) {
return v.SetFloat(data); }
594 static ValueType&
Set(ValueType& v,
float data,
typename ValueType::AllocatorType&) {
return v.SetFloat(data); }
597 template<
typename ValueType>
598 struct TypeHelper<ValueType, const typename ValueType::Ch*> {
600 static bool Is(
const ValueType& v) {
return v.IsString(); }
601 static StringType
Get(
const ValueType& v) {
return v.GetString(); }
602 static ValueType&
Set(ValueType& v,
const StringType data) {
return v.SetString(
typename ValueType::StringRefType(data)); }
603 static ValueType&
Set(ValueType& v,
const StringType data,
typename ValueType::AllocatorType&
a) {
return v.SetString(data,
a); }
606 #if RAPIDJSON_HAS_STDSTRING
607 template<
typename ValueType>
608 struct TypeHelper<ValueType, std::basic_string<typename ValueType::Ch> > {
609 typedef std::basic_string<typename ValueType::Ch> StringType;
610 static bool Is(
const ValueType& v) {
return v.IsString(); }
611 static StringType Get(
const ValueType& v) {
return StringType(v.GetString(), v.GetStringLength()); }
612 static ValueType& Set(ValueType& v,
const StringType& data,
typename ValueType::AllocatorType&
a) {
return v.SetString(data,
a); }
616 template<
typename ValueType>
619 static bool Is(
const ValueType& v) {
return v.IsArray(); }
621 static ValueType&
Set(ValueType& v,
ArrayType data) {
return v = data; }
622 static ValueType&
Set(ValueType& v,
ArrayType data,
typename ValueType::AllocatorType&) {
return v = data; }
625 template<
typename ValueType>
626 struct TypeHelper<ValueType, typename ValueType::ConstArray> {
628 static bool Is(
const ValueType& v) {
return v.IsArray(); }
632 template<
typename ValueType>
635 static bool Is(
const ValueType& v) {
return v.IsObject(); }
638 static ValueType&
Set(ValueType& v,
ObjectType data,
typename ValueType::AllocatorType&) {
return v = data; }
641 template<
typename ValueType>
642 struct TypeHelper<ValueType, typename ValueType::ConstObject> {
644 static bool Is(
const ValueType& v) {
return v.IsObject(); }
667 template <
typename Encoding,
typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR >
674 typedef typename Encoding::Ch
Ch;
692 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
703 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
704 template <
typename StackAllocator>
709 template <
typename StackAllocator>
721 static const uint16_t defaultFlags[] = {
741 template <
typename SourceAllocator>
743 switch (rhs.GetType()) {
751 for (
SizeType i = 0; i < count; i++)
761 data_ = *
reinterpret_cast<const Data*
>(&rhs.
data_);
768 data_ = *
reinterpret_cast<const Data*
>(&rhs.
data_);
779 #ifndef RAPIDJSON_DOXYGEN_RUNNING // hide SFINAE from Doxygen
780 template <
typename T>
781 explicit GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame<bool, T>))) RAPIDJSON_NOEXCEPT
848 #if RAPIDJSON_HAS_STDSTRING
862 a.value_.data_ = Data();
873 o.value_.data_ = Data();
891 if (Allocator::kNeedFree) {
902 if (Allocator::kNeedFree) {
934 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
937 return *
this = rhs.Move();
963 template <
typename T>
977 template <
typename SourceAllocator>
979 RAPIDJSON_ASSERT(
static_cast<void*
>(
this) !=
static_cast<void const*
>(&rhs));
994 other.RawAssign(temp);
1014 GenericValue& Move() RAPIDJSON_NOEXCEPT {
return *
this; }
1024 template <
typename SourceAllocator>
1027 if (GetType() != rhs.GetType())
1030 switch (GetType()) {
1034 for (
ConstMemberIterator lhsMemberItr = MemberBegin(); lhsMemberItr != MemberEnd(); ++lhsMemberItr) {
1035 typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
1036 if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)
1045 if ((*
this)[i] != rhs[i])
1053 if (IsDouble() || rhs.IsDouble()) {
1054 double a = GetDouble();
1055 double b = rhs.GetDouble();
1056 return a >= b &&
a <= b;
1069 #if RAPIDJSON_HAS_STDSTRING
1073 bool operator==(
const std::basic_string<Ch>& rhs)
const {
return *
this ==
GenericValue(
StringRef(rhs)); }
1084 template <
typename SourceAllocator>
1088 bool operator!=(
const Ch* rhs)
const {
return !(*
this == rhs); }
1095 #ifndef __cpp_lib_three_way_comparison
1127 bool IsLosslessDouble()
const {
1128 if (!IsNumber())
return false;
1131 volatile double d =
static_cast<double>(u);
1133 && (d < static_cast<double>((std::numeric_limits<uint64_t>::max)()))
1134 && (u ==
static_cast<uint64_t>(d));
1138 volatile double d =
static_cast<double>(i);
1139 return (d >=
static_cast<double>((std::numeric_limits<int64_t>::min)()))
1140 && (d <
static_cast<double>((std::numeric_limits<int64_t>::max)()))
1141 && (i ==
static_cast<int64_t>(d));
1147 bool IsFloat()
const {
1150 double d = GetDouble();
1151 return d >= -3.4028234e38 && d <= 3.4028234e38;
1154 bool IsLosslessFloat()
const {
1155 if (!IsNumber())
return false;
1156 double a = GetDouble();
1157 if (
a <
static_cast<double>(-(std::numeric_limits<float>::max)())
1158 ||
a >
static_cast<double>((std::numeric_limits<float>::max)()))
1160 double b =
static_cast<double>(
static_cast<float>(
a));
1161 return a >= b &&
a <= b;
1208 template <
typename T>
1213 template <
typename T>
1225 template <
typename SourceAllocator>
1228 if (member != MemberEnd())
1229 return member->value;
1242 template <
typename SourceAllocator>
1245 #if RAPIDJSON_HAS_STDSTRING
1284 bool HasMember(
const Ch*
name)
const {
return FindMember(
name) != MemberEnd(); }
1286 #if RAPIDJSON_HAS_STDSTRING
1295 bool HasMember(
const std::basic_string<Ch>&
name)
const {
return FindMember(
name) != MemberEnd(); }
1307 template <
typename SourceAllocator>
1324 return FindMember(n);
1342 template <
typename SourceAllocator>
1350 #if RAPIDJSON_HAS_STDSTRING
1393 #if RAPIDJSON_HAS_STDSTRING
1426 template <
typename T>
1433 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
1447 #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
1496 template <
typename T>
1507 void RemoveAllMembers() {
1520 bool RemoveMember(
const Ch*
name) {
1522 return RemoveMember(n);
1525 #if RAPIDJSON_HAS_STDSTRING
1529 template <
typename SourceAllocator>
1532 if (m != MemberEnd()) {
1566 return EraseMember(pos, pos +1);
1593 bool EraseMember(
const Ch*
name) {
1595 return EraseMember(n);
1598 #if RAPIDJSON_HAS_STDSTRING
1602 template <
typename SourceAllocator>
1605 if (m != MemberEnd()) {
1706 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
1710 #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
1722 return (*this).template PushBack<StringRefType>(
value,
allocator);
1742 template <
typename T>
1768 return Erase(pos, pos + 1);
1788 itr->~GenericValue();
1789 std::memmove(
static_cast<void*
>(pos), last,
static_cast<size_t>(
End() - last) *
sizeof(
GenericValue));
1810 double GetDouble()
const {
1822 float GetFloat()
const {
1823 return static_cast<float>(GetDouble());
1888 #if RAPIDJSON_HAS_STDSTRING
1908 template <
typename T>
1911 template <
typename T>
1914 template <
typename T>
1917 template<
typename T>
1920 template<
typename T>
1932 template <
typename Handler>
1933 bool Accept(
Handler& handler)
const {
1937 case kTrueType:
return handler.Bool(
true);
1964 if (IsDouble())
return handler.Double(
data_.
n.
d);
1965 else if (IsInt())
return handler.Int(
data_.
n.
i.
i);
1966 else if (IsUint())
return handler.Uint(
data_.
n.
u.
u);
1967 else if (IsInt64())
return handler.Int64(
data_.
n.
i64);
1968 else return handler.Uint64(
data_.
n.
u64);
1973 template <
typename,
typename>
friend class GenericValue;
2012 #if RAPIDJSON_48BITPOINTER_OPTIMIZATION
2014 #elif RAPIDJSON_64BIT
2047 #if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN
2096 return (data.f.flags &
kInlineStrFlag) ? data.ss.GetLength() : data.s.length;
2106 #if RAPIDJSON_USE_MEMBERSMAP
2110 bool operator()(
const Data& s1,
const Data& s2)
const {
2113 return cmp < 0 || (cmp == 0 && n1 < n2);
2116 typedef std::pair<const Data, SizeType> Pair;
2117 typedef std::multimap<Data, SizeType, Less, StdAllocator<Pair, Allocator> > Map;
2118 typedef typename Map::iterator Iterator;
2120 typedef typename MapTraits::Map Map;
2121 typedef typename MapTraits::Less MapLess;
2122 typedef typename MapTraits::Pair MapPair;
2123 typedef typename MapTraits::Iterator MapIterator;
2133 static RAPIDJSON_FORCEINLINE
size_t GetMapLayoutSize(
SizeType capacity) {
2137 capacity *
sizeof(MapIterator);
2140 static RAPIDJSON_FORCEINLINE
SizeType &GetMapCapacity(Map* &map) {
2145 static RAPIDJSON_FORCEINLINE
Member* GetMapMembers(Map* &map) {
2151 static RAPIDJSON_FORCEINLINE MapIterator* GetMapIterators(Map* &map) {
2152 return reinterpret_cast<MapIterator*
>(
reinterpret_cast<uintptr_t>(&map) +
2158 static RAPIDJSON_FORCEINLINE Map* &GetMap(
Member* members) {
2160 return *
reinterpret_cast<Map**
>(
reinterpret_cast<uintptr_t>(members) -
2166 RAPIDJSON_FORCEINLINE MapIterator DropMapIterator(MapIterator& rhs) {
2167 #if RAPIDJSON_HAS_CXX11
2168 MapIterator ret = std::move(rhs);
2170 MapIterator ret = rhs;
2177 Map **newMap =
static_cast<Map**
>(
allocator.Malloc(GetMapLayoutSize(newCapacity)));
2178 GetMapCapacity(*newMap) = newCapacity;
2184 size_t count = (*oldMap)->size();
2185 std::memcpy(
static_cast<void*
>(GetMapMembers(*newMap)),
2186 static_cast<void*
>(GetMapMembers(*oldMap)),
2188 MapIterator *oldIt = GetMapIterators(*oldMap),
2189 *newIt = GetMapIterators(*newMap);
2191 new (&newIt[count]) MapIterator(DropMapIterator(oldIt[count]));
2199 return GetMapMembers(DoReallocMap(0, capacity,
allocator));
2204 if (newCapacity > o.capacity) {
2206 Map **oldMap = oldMembers ? &GetMap(oldMembers) : 0,
2207 *&newMap = DoReallocMap(oldMap, newCapacity,
allocator);
2209 o.capacity = newCapacity;
2213 template <
typename SourceAllocator>
2216 Map* &map = GetMap(members);
2217 MapIterator mit = map->find(
reinterpret_cast<const Data&
>(
name.data_));
2218 if (mit != map->end()) {
2227 Map* &map = GetMap(members);
2228 MapIterator* mit = GetMapIterators(map);
2230 map->erase(DropMapIterator(mit[i]));
2231 members[i].~Member();
2239 GetMap(members)->~Map();
2241 members[i].~Member();
2243 if (Allocator::kNeedFree) {
2244 Map** map = &GetMap(members);
2251 #else // !RAPIDJSON_USE_MEMBERSMAP
2254 return Malloc<Member>(
allocator, capacity);
2259 if (newCapacity > o.capacity) {
2262 o.capacity = newCapacity;
2266 template <
typename SourceAllocator>
2269 for ( ; member != MemberEnd(); ++member)
2270 if (
name.StringEqual(member->name))
2287 #endif // !RAPIDJSON_USE_MEMBERSMAP
2291 if (o.size >= o.capacity)
2294 Member* m = members + o.size;
2297 #if RAPIDJSON_USE_MEMBERSMAP
2298 Map* &map = GetMap(members);
2299 MapIterator* mit = GetMapIterators(map);
2300 new (&mit[o.size]) MapIterator(map->insert(MapPair(m->
name.data_, o.size)));
2308 #if RAPIDJSON_USE_MEMBERSMAP
2309 Map* &map = GetMap(members);
2310 MapIterator* mit = GetMapIterators(map);
2312 map->erase(DropMapIterator(mit[mpos]));
2315 if (o.size > 1 && m != last) {
2316 #if RAPIDJSON_USE_MEMBERSMAP
2317 new (&mit[mpos]) MapIterator(DropMapIterator(mit[&*last - members]));
2318 mit[mpos]->second = mpos;
2332 pos = beg + (first - beg),
2334 #if RAPIDJSON_USE_MEMBERSMAP
2336 MapIterator* mit = GetMapIterators(map);
2339 #if RAPIDJSON_USE_MEMBERSMAP
2340 map->erase(DropMapIterator(mit[itr - beg]));
2344 #if RAPIDJSON_USE_MEMBERSMAP
2345 if (first != last) {
2349 std::memcpy(
static_cast<void*
>(&*itr), &*next,
sizeof(
Member));
2351 new (&mit[mpos]) MapIterator(DropMapIterator(mit[next - beg]));
2352 mit[mpos]->second = mpos;
2356 std::memmove(
static_cast<void*
>(&*pos), &*last,
2357 static_cast<size_t>(end - last) *
sizeof(
Member));
2359 o.size -=
static_cast<SizeType>(last - first);
2363 template <
typename SourceAllocator>
2371 #if RAPIDJSON_USE_MEMBERSMAP
2372 Map* &map = GetMap(lm);
2373 MapIterator* mit = GetMapIterators(map);
2375 for (
SizeType i = 0; i < count; i++) {
2378 #if RAPIDJSON_USE_MEMBERSMAP
2379 new (&mit[i]) MapIterator(map->insert(MapPair(lm[i].
name.data_, i)));
2392 std::memcpy(
static_cast<void*
>(e), values, count *
sizeof(
GenericValue));
2405 std::memcpy(
static_cast<void*
>(m), members, count *
sizeof(
Member));
2406 #if RAPIDJSON_USE_MEMBERSMAP
2407 Map* &map = GetMap(m);
2408 MapIterator* mit = GetMapIterators(map);
2409 for (
SizeType i = 0; i < count; i++) {
2410 new (&mit[i]) MapIterator(map->insert(MapPair(m[i].
name.data_, i)));
2439 std::memcpy(str, s, s.
length *
sizeof(
Ch));
2450 template <
typename SourceAllocator>
2455 const SizeType len1 = GetStringLength();
2456 const SizeType len2 = rhs.GetStringLength();
2457 if(len1 != len2) {
return false; }
2459 const Ch*
const str1 = GetString();
2460 const Ch*
const str2 = rhs.GetString();
2461 if(str1 == str2) {
return true; }
2463 return (std::memcmp(str1, str2,
sizeof(
Ch) * len1) == 0);
2483 template <
typename Encoding,
typename Allocator = RAPIDJSON_DEFAULT_ALLOCATOR,
typename StackAllocator = RAPIDJSON_DEFAULT_STACK_ALLOCATOR >
2486 typedef typename Encoding::Ch
Ch;
2511 allocator_(
allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_()
2517 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
2520 :
ValueType(std::forward<ValueType>(rhs)),
2521 allocator_(rhs.allocator_),
2522 ownAllocator_(rhs.ownAllocator_),
2523 stack_(std::move(rhs.stack_)),
2524 parseResult_(rhs.parseResult_)
2527 rhs.ownAllocator_ = 0;
2537 if (ownAllocator_) {
2538 ValueType::SetNull();
2543 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
2554 allocator_ = rhs.allocator_;
2555 ownAllocator_ = rhs.ownAllocator_;
2556 stack_ = std::move(rhs.stack_);
2557 parseResult_ = rhs.parseResult_;
2560 rhs.ownAllocator_ = 0;
2575 stack_.
Swap(rhs.stack_);
2605 template <
typename Generator>
2607 ClearStackOnExit scope(*
this);
2625 template <
unsigned parseFlags,
typename SourceEncoding,
typename InputStream>
2629 ClearStackOnExit scope(*
this);
2630 parseResult_ = reader.template Parse<parseFlags>(is, *
this);
2644 template <
unsigned parseFlags,
typename InputStream>
2646 return ParseStream<parseFlags, Encoding, InputStream>(is);
2654 template <
typename InputStream>
2656 return ParseStream<kParseDefaultFlags, Encoding, InputStream>(is);
2668 template <
unsigned parseFlags>
2671 return ParseStream<parseFlags | kParseInsituFlag>(s);
2679 return ParseInsitu<kParseDefaultFlags>(str);
2691 template <
unsigned parseFlags,
typename SourceEncoding>
2695 return ParseStream<parseFlags, SourceEncoding>(s);
2702 template <
unsigned parseFlags>
2704 return Parse<parseFlags, Encoding>(str);
2711 return Parse<kParseDefaultFlags>(str);
2714 template <
unsigned parseFlags,
typename SourceEncoding>
2717 MemoryStream ms(
reinterpret_cast<const char*
>(str), length *
sizeof(
typename SourceEncoding::Ch));
2719 ParseStream<parseFlags, SourceEncoding>(is);
2723 template <
unsigned parseFlags>
2725 return Parse<parseFlags, Encoding>(str, length);
2729 return Parse<kParseDefaultFlags>(str, length);
2732 #if RAPIDJSON_HAS_STDSTRING
2733 template <
unsigned parseFlags,
typename SourceEncoding>
2736 return Parse<parseFlags, SourceEncoding>(str.c_str());
2739 template <
unsigned parseFlags>
2741 return Parse<parseFlags, Encoding>(str.c_str());
2745 return Parse<kParseDefaultFlags>(str);
2747 #endif // RAPIDJSON_HAS_STDSTRING
2764 #ifndef __clang // -Wdocumentation
2789 struct ClearStackOnExit {
2791 ~ClearStackOnExit() { d_.ClearStack(); }
2793 ClearStackOnExit(
const ClearStackOnExit&);
2794 ClearStackOnExit& operator=(
const ClearStackOnExit&);
2804 bool Null() {
new (stack_.template Push<ValueType>())
ValueType();
return true; }
2805 bool Bool(
bool b) {
new (stack_.template Push<ValueType>())
ValueType(b);
return true; }
2806 bool Int(
int i) {
new (stack_.template Push<ValueType>())
ValueType(i);
return true; }
2807 bool Uint(
unsigned i) {
new (stack_.template Push<ValueType>())
ValueType(i);
return true; }
2810 bool Double(
double d) {
new (stack_.template Push<ValueType>())
ValueType(d);
return true; }
2816 new (stack_.template Push<ValueType>())
ValueType(str, length);
2824 new (stack_.template Push<ValueType>())
ValueType(str, length);
2833 typename ValueType::Member* members = stack_.template Pop<typename ValueType::Member>(memberCount);
2834 stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount,
GetAllocator());
2841 ValueType* elements = stack_.template Pop<ValueType>(elementCount);
2842 stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount,
GetAllocator());
2853 if (Allocator::kNeedFree)
2855 (stack_.template Pop<ValueType>(1))->~
ValueType();
2865 static const size_t kDefaultStackCapacity = 1024;
2881 template <
bool Const,
typename ValueT>
2893 template <
typename,
typename>
2903 bool Empty()
const {
return value_.Empty(); }
2910 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
2912 #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
2919 #if RAPIDJSON_HAS_CXX11_RANGE_FOR
2935 template <
bool Const,
typename ValueT>
2947 typedef typename ValueType::Ch
Ch;
2949 template <
typename,
typename>
2962 #if RAPIDJSON_HAS_STDSTRING
2969 #if RAPIDJSON_HAS_STDSTRING
2970 bool HasMember(
const std::basic_string<Ch>&
name)
const {
return value_.HasMember(
name); }
2975 #if RAPIDJSON_HAS_STDSTRING
2980 #if RAPIDJSON_HAS_STDSTRING
2984 #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
2989 #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS
2995 #if RAPIDJSON_HAS_STDSTRING
2996 bool RemoveMember(
const std::basic_string<Ch>&
name)
const {
return value_.RemoveMember(
name); }
3003 #if RAPIDJSON_HAS_STDSTRING
3008 #if RAPIDJSON_HAS_CXX11_RANGE_FOR
3022 #ifdef RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED
3023 #pragma pop_macro("GetObject")
3024 #undef RAPIDJSON_WINDOWS_GETOBJECT_WORKAROUND_APPLIED
3027 #endif // RAPIDJSON_DOCUMENT_H_
GenericMemberIterator< false, Encoding, Allocator >::Iterator MemberIterator
Member iterator for iterating in object.
Definition: document.h:676
MemberIterator DoFindMember(const GenericValue< Encoding, SourceAllocator > &name)
Definition: document.h:2267
@ kNumberUintFlag
Definition: document.h:1994
MemberIterator FindMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2974
ValueType::EncodingType EncodingType
Definition: document.h:2946
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream (with Encoding conversion)
Definition: document.h:2626
CharType Ch
character type of the string
Definition: document.h:347
GenericObject MemberReserve(SizeType newCapacity, AllocatorType &allocator) const
Definition: document.h:2967
pointer Pointer
Pointer to (const) GenericMember.
Definition: document.h:212
GenericObject AddMember(StringRefType name, ValueType &value, AllocatorType &allocator) const
Definition: document.h:2990
GenericMemberIterator< true, typename ValueT::EncodingType, typename ValueT::AllocatorType > ConstMemberIterator
Definition: document.h:2943
Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
Definition: fwd.h:126
Iterator & operator+=(DifferenceType n)
Definition: document.h:256
bool StringEqual(const GenericValue< Encoding, SourceAllocator > &rhs) const
Definition: document.h:2451
Definition: document.h:519
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124
GenericObject(const GenericObject &rhs)
Definition: document.h:2952
std::ptrdiff_t difference_type
Definition: document.h:207
difference_type DifferenceType
Signed integer type (e.g. ptrdiff_t)
Definition: document.h:216
AllocatorType &const allocator
Definition: document.h:2914
GenericObject AddMember(ValueType &name, StringRefType value, AllocatorType &allocator) const
Definition: document.h:2979
Definition: document.h:2011
GenericObject< true, ValueType > ConstObject
Definition: document.h:684
@ kStringFlag
Definition: document.h:1984
ValueType::ConstArray ArrayType
Definition: document.h:627
@ kNullType
null
Definition: rapidjson.h:730
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
Member * members
Definition: document.h:2074
@ MaxChars
Definition: document.h:2037
Definition: document.h:509
GenericArray Reserve(SizeType newCapacity, AllocatorType &allocator) const
Definition: document.h:2908
@ kBoolFlag
Definition: document.h:1977
A document for parsing JSON text as DOM.
Definition: document.h:69
GenericStringRef(const GenericStringRef &rhs)
Definition: document.h:414
Definition: document.h:2022
bool HasMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2972
ParseErrorCode GetParseError() const
Get the ParseErrorCode of last parsing.
Definition: document.h:2758
ValueType::Ch Ch
Definition: document.h:2947
@ kFalseType
false
Definition: rapidjson.h:731
GenericStringRef(const CharType *str, SizeType len)
Create constant string reference from pointer and length.
Definition: document.h:411
@ kNumberIntFlag
Definition: document.h:1993
RAPIDJSON_FORCEINLINE GenericValue * SetElementsPointer(GenericValue *elements)
Definition: document.h:2102
SizeType GetLength() const
Definition: document.h:2042
Concept for allocating, resizing and freeing memory block.
bool StartObject()
Definition: document.h:2828
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
Definition: document.h:2873
size_t GetCapacity() const
Definition: stack.h:179
@ kArrayType
array
Definition: rapidjson.h:734
const typedef GenericValue * ConstValueIterator
Constant value iterator for iterating in array.
Definition: document.h:679
Definition: document.h:2046
static ValueType & Set(ValueType &v, int data, typename ValueType::AllocatorType &)
Definition: document.h:534
@ kNumberDoubleFlag
Definition: document.h:1997
SizeType capacity
Definition: document.h:2079
GenericValue * elements
Definition: document.h:2080
static ValueType & Set(ValueType &v, float data, typename ValueType::AllocatorType &)
Definition: document.h:594
bool Int64(int64_t i)
Definition: document.h:2808
const typedef ValueT * ConstValueIterator
Definition: document.h:2889
static const SizeType kDefaultArrayCapacity
Definition: document.h:2008
GenericStringRef(const CharType *str)
Explicitly create string reference from const character pointer.
Definition: document.h:399
bool Bool(bool b)
Definition: document.h:2805
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream.
Definition: document.h:2645
@ kObjectFlag
Definition: document.h:2002
Type
Type of JSON value.
Definition: rapidjson.h:729
struct GenericValue::Number::I i
bool operator<=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:264
void Clear()
Definition: stack.h:99
@ kNumberAnyFlag
Definition: document.h:1998
internal::MaybeAddConst< Const, PlainType >::Type ValueType
Definition: document.h:2941
MemberIterator FindMember(const Ch *name) const
Definition: document.h:2973
GenericDocument & Parse(const typename SourceEncoding::Ch *str, size_t length)
Definition: document.h:2715
GenericDocument & ParseInsitu(Ch *str)
Parse JSON text from a mutable string.
Definition: document.h:2669
static ObjectType Get(const ValueType &v)
Definition: document.h:645
const Ch *const s
plain CharType pointer
Definition: document.h:419
static uint64_t Get(const ValueType &v)
Definition: document.h:576
bool operator>(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:267
@ kNumberFlag
Definition: document.h:1978
GenericDocument & Parse(const Ch *str, size_t length)
Definition: document.h:2728
ValueIterator Erase(ConstValueIterator first, ConstValueIterator last) const
Definition: document.h:2917
Definition: document.h:502
GenericArray< true, ValueT > ConstArray
Definition: document.h:2884
static bool Is(const ValueType &v)
Definition: document.h:635
@ kArrayFlag
Definition: document.h:2003
MemberIterator EraseMember(ConstMemberIterator first, ConstMemberIterator last) const
Definition: document.h:3001
const SizeType length
length of the string (excluding the trailing NULL terminator)
Definition: document.h:420
const Ch * str
Definition: document.h:2025
Reference operator*() const
Definition: document.h:276
ValueType value_type
Definition: document.h:204
@ kIntFlag
Definition: document.h:1979
GenericStringRef< Ch > StringRefType
Reference to a constant string.
Definition: document.h:675
static ValueType & Set(ValueType &v, uint64_t data, typename ValueType::AllocatorType &)
Definition: document.h:578
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(const GenericArray &)) PushBack(T value
@ kObjectType
object
Definition: rapidjson.h:733
RAPIDJSON_FORCEINLINE Member * DoAllocMembers(SizeType capacity, Allocator &allocator)
Definition: document.h:2253
GenericValue(Object o) RAPIDJSON_NOEXCEPT
Constructor for Object.
Definition: document.h:872
Iterator & operator=(const NonConstIterator &it)
Definition: document.h:241
Helper class for accessing Value of array type.
Definition: document.h:651
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause when started running for such interactive use in the most ordinary to print or display an announcement including an appropriate copyright notice and a notice that there is no and telling the user how to view a copy of this License These requirements apply to the modified work as a whole If identifiable sections of that work are not derived from the and can be reasonably considered independent and separate works in then this License and its do not apply to those sections when you distribute them as separate works mere aggregation of another work not based on the Font with the Font on a volume of a storage or distribution medium does not bring the other work under the scope of this License Condition Subsequent You may not copy
Definition: ARPHICPL.TXT:41
GenericMemberIterator< true, Encoding, Allocator >::Iterator ConstMemberIterator
Constant member iterator for iterating in object.
Definition: document.h:677
const RAPIDJSON_FORCEINLINE Ch * SetStringPointer(const Ch *str)
Definition: document.h:2100
GenericObject AddMember(ValueType &name, ValueType &value, AllocatorType &allocator) const
Definition: document.h:2978
IMGUI_API void End()
Definition: imgui.cpp:6016
size_t GetErrorOffset() const
Get the position of last parsing error in input, 0 otherwise.
Definition: document.h:2761
SizeType Capacity() const
Definition: document.h:2902
static ValueType & Set(ValueType &v, float data)
Definition: document.h:593
ValueT PlainType
Definition: document.h:2886
static bool Is(const ValueType &v)
Definition: document.h:644
friend void swap(GenericMember &a, GenericMember &b) RAPIDJSON_NOEXCEPT
Definition: document.h:151
static ValueType & Set(ValueType &v, int64_t data, typename ValueType::AllocatorType &)
Definition: document.h:570
Iterator operator--(int)
Definition: document.h:248
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Definition: error.h:118
ValueIterator Erase(ConstValueIterator pos) const
Definition: document.h:2916
static bool Is(const ValueType &v)
Definition: document.h:567
void DoFreeMembers()
Definition: document.h:2281
Represents an in-memory input byte stream.
Definition: memorystream.h:40
bool operator<(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:266
ValueType::AllocatorType AllocatorType
Definition: document.h:2944
bool ObjectEmpty() const
Definition: document.h:2959
SizeType length
Definition: document.h:2023
MemberIterator DoRemoveMember(MemberIterator m)
Definition: document.h:2305
bool RemoveMember(const Ch *name) const
Definition: document.h:2994
A read-write string stream.
Definition: fwd.h:52
static bool Is(const ValueType &v)
Definition: document.h:600
char padding2[4]
Definition: document.h:2054
@ kNumberInt64Flag
Definition: document.h:1995
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
Definition: rapidjson.h:415
ValueType * ValueIterator
Definition: document.h:2888
GenericObject< true, ValueT > ConstObject
Definition: document.h:2938
@ LenPos
Definition: document.h:2037
static ValueType & Set(ValueType &v, unsigned data)
Definition: document.h:541
static StringType Get(const ValueType &v)
Definition: document.h:601
static ValueType & Set(ValueType &v, ArrayType data, typename ValueType::AllocatorType &)
Definition: document.h:622
bool IsError() const
Whether the result is an error.
Definition: error.h:123
bool Empty() const
Definition: document.h:2903
void DoClearMembers()
Definition: document.h:2275
ObjectData o
Definition: document.h:2087
GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT
Constructor for int64_t value.
Definition: document.h:804
GenericValue & operator=(StringRefType str) RAPIDJSON_NOEXCEPT
Assignment of constant string reference (no copy)
Definition: document.h:946
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:674
GenericStringRef< CharType > StringRef(const CharType *str)
Mark a character pointer as constant string.
Definition: document.h:454
GenericValue< Encoding, Allocator > value
value of member.
Definition: document.h:123
@ kInt64Flag
Definition: document.h:1981
ValueType::ConstObject ObjectType
Definition: document.h:643
bool EndArray(SizeType elementCount)
Definition: document.h:2840
@ kUintFlag
Definition: document.h:1980
Blam::LinearAllocator allocator
– TO BE FILLED IN BY VERTIGO –
Definition: main.cpp:76
friend class GenericMemberIterator
Definition: document.h:189
GenericValue(const Ch *s, SizeType length) RAPIDJSON_NOEXCEPT
Constructor for constant string (i.e. do not make a copy of string)
Definition: document.h:837
@ kParseInsituFlag
In-situ(destructive) parsing.
Definition: reader.h:148
bool Key(const Ch *str, SizeType length, bool copy)
Definition: document.h:2830
@ kStringType
string
Definition: rapidjson.h:735
SizeType MemberCount() const
Definition: document.h:2957
void SetArrayRaw(GenericValue *values, SizeType count, Allocator &allocator)
Definition: document.h:2387
MemberIterator RemoveMember(MemberIterator m) const
Definition: document.h:2999
unsigned long long uint64_t
Definition: stdint.h:18
static bool Is(const ValueType &v)
Definition: document.h:583
MemberIterator MemberBegin() const
Definition: document.h:2965
bool Null()
Definition: document.h:2804
Read-only string stream.
Definition: fwd.h:47
GenericValue & operator=(GenericValue &rhs) RAPIDJSON_NOEXCEPT
Assignment with move semantics.
Definition: document.h:921
uint16_t flags
Definition: document.h:2019
Iterator & operator-=(DifferenceType n)
Definition: document.h:257
GenericValue(const Ch *s, Allocator &allocator)
Constructor for copy-string (i.e. do make a copy of string)
Definition: document.h:846
GenericDocument(Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
Constructor.
Definition: document.h:2510
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
static ValueType & Set(ValueType &v, const StringType data)
Definition: document.h:602
@ kTrueFlag
Definition: document.h:1991
Allocator & GetAllocator()
Get the allocator of this document.
Definition: document.h:2779
const typedef ValueType::Ch * StringType
Definition: document.h:599
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:437
b output the Images to a print format other than for collateral and the you may copy and distribute your animations and renderings incorporating the Images All other rights with respect to the Images and their use are reserved to Company The Images are protected by United States copyright international treaty and other laws TERM You may use the Images for incorporation in a single product or or for visualization purposes within a single project of duration not more than three years INFRINGEMENT WARRANTY NVIDIA warrants to you that
Definition: TextureUsageAgreement.txt:16
static bool Is(const ValueType &v)
Definition: document.h:523
Definition: document.h:2052
static unsigned Get(const ValueType &v)
Definition: document.h:540
static ValueType & Set(ValueType &v, ObjectType data)
Definition: document.h:637
static const RAPIDJSON_FORCEINLINE Ch * DataString(const Data &data)
Definition: document.h:2092
Definition: document.h:2077
static ValueType & Set(ValueType &v, double data)
Definition: document.h:585
static bool Is(const ValueType &v)
Definition: document.h:628
@ kConstStringFlag
Definition: document.h:1999
GenericStringRef< CharType > StringRef(const CharType *str)
Mark a character pointer as constant string.
Definition: document.h:454
GenericValue< Encoding, Allocator > name
name of member (must be a string)
Definition: document.h:122
static const SizeType kDefaultObjectCapacity
Definition: document.h:2009
unsigned u
Definition: document.h:2053
GenericValue(unsigned u) RAPIDJSON_NOEXCEPT
Constructor for unsigned value.
Definition: document.h:798
ParseErrorCode
Error code of parsing.
Definition: error.h:64
bool EndObject(SizeType memberCount)
Definition: document.h:2832
static ArrayType Get(const ValueType &v)
Definition: document.h:629
@ kTypeMask
Definition: document.h:2005
static int64_t Get(const ValueType &v)
Definition: document.h:568
static ValueType & Set(ValueType &v, bool data, typename ValueType::AllocatorType &)
Definition: document.h:526
bool StartArray()
Definition: document.h:2838
MemberIterator DoEraseMembers(ConstMemberIterator first, ConstMemberIterator last)
Definition: document.h:2329
GenericDocument & Populate(Generator &g)
Populate this document by a generator which produces SAX events.
Definition: document.h:2606
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1249
bool RawNumber(const Ch *str, SizeType length, bool copy)
Definition: document.h:2812
GenericDocument & ParseInsitu(Ch *str)
Parse JSON text from a mutable string (with kParseDefaultFlags)
Definition: document.h:2678
@ kNumberType
number
Definition: rapidjson.h:736
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) AddMember(ValueType &name
static ValueType & Set(ValueType &v, unsigned data, typename ValueType::AllocatorType &)
Definition: document.h:542
GenericMember & operator=(GenericMember &rhs) RAPIDJSON_NOEXCEPT
Assignment with move semantics.
Definition: document.h:142
ValueType & operator[](T *name) const
Definition: document.h:2960
friend void swap(GenericDocument &a, GenericDocument &b) RAPIDJSON_NOEXCEPT
free-standing swap function helper
Definition: document.h:2598
ValueT PlainType
Definition: document.h:2940
Number n
Definition: document.h:2086
size_t GetStackCapacity() const
Get the capacity of stack in bytes.
Definition: document.h:2785
RAPIDJSON_DISABLEIF_RETURN((internal::IsPointer< T >),(GenericValue &)) operator
Assignment with primitive types.
GenericMemberIterator()
Default constructor (singular value)
Definition: document.h:222
static ValueType & Set(ValueType &v, bool data)
Definition: document.h:525
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
Definition: document.h:2755
SizeType size
Definition: document.h:2072
reference Reference
Reference to (const) GenericMember.
Definition: document.h:214
DifferenceType operator-(ConstIterator that) const
Distance.
Definition: document.h:282
Result of parsing (wraps ParseErrorCode)
Definition: error.h:106
void DoCopyMembers(const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator, bool copyConstStrings)
Definition: document.h:2364
GenericArray< true, ValueType > ConstArray
Definition: document.h:682
long long int64_t
Definition: stdint.h:14
size_t GetSize() const
Definition: stack.h:178
Encoding EncodingType
Encoding type from template parameter.
Definition: document.h:672
Definition: document.h:2071
ValueType & operator[](const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2961
GenericMemberIterator< false, Encoding, Allocator > NonConstIterator
Non-constant iterator type.
Definition: document.h:200
bool EraseMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:3006
ValueType & reference
Definition: document.h:206
GenericValue(T b, RAPIDJSON_ENABLEIF((internal::IsSame< bool, T >))) RAPIDJSON_NOEXCEPT
Constructor for boolean value.
Definition: document.h:781
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream (with kParseDefaultFlags)
Definition: document.h:2655
std::random_access_iterator_tag iterator_category
Definition: document.h:208
void DoReserveMembers(SizeType newCapacity, Allocator &allocator)
Definition: document.h:2257
#define RAPIDJSON_GETPOINTER(type, p)
Definition: rapidjson.h:350
SizeType capacity
Definition: document.h:2073
#define RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY
User defined kDefaultArrayCapacity value.
Definition: document.h:110
ValueType::StringRefType StringRefType
Definition: document.h:2891
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Definition: document.h:2470
~GenericArray()
Definition: document.h:2898
double d
Definition: document.h:2068
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
Definition: document.h:2083
@ Object
Unknown. Referenced within the hs_doc from Halo 2 Sapien.
Definition: globals.h:47
static ValueType & Set(ValueType &v, ObjectType data, typename ValueType::AllocatorType &)
Definition: document.h:638
T AllocatorType &const allocator
Definition: document.h:2983
ValueIterator End() const
Definition: document.h:2907
bool operator==(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:262
Allocator & GetAllocator()
Definition: stack.h:172
~GenericObject()
Definition: document.h:2954
bool operator>=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:265
GenericMemberIterator< true, Encoding, Allocator > ConstIterator
Constant iterator type.
Definition: document.h:198
@ kCopyFlag
Definition: document.h:1985
bool HasAllocator() const
Definition: stack.h:168
void Free(A &a, T *p, size_t n=1)
Definition: allocators.h:447
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition: rapidjson.h:712
ValueIterator Begin() const
Definition: document.h:2906
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition: rapidjson.h:716
GenericObject AddMember(StringRefType name, StringRefType value, AllocatorType &allocator) const
Definition: document.h:2991
static ValueType & Set(ValueType &v, uint64_t data)
Definition: document.h:577
SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator.
Definition: fwd.h:88
GenericValue(const Ch *s, SizeType length, Allocator &allocator)
Constructor for copy-string (i.e. do make a copy of string)
Definition: document.h:843
static ArrayType Get(ValueType &v)
Definition: document.h:620
static bool Usable(SizeType len)
Definition: document.h:2040
Pointer operator->() const
Definition: document.h:277
Represents a JSON value. Use Value for UTF8 encoding and default allocator.
Definition: document.h:66
Name-value pair in a JSON object value.
Definition: document.h:120
void RawAssign(GenericValue &rhs) RAPIDJSON_NOEXCEPT
Assignment without calling destructor.
Definition: document.h:2444
static ObjectType Get(ValueType &v)
Definition: document.h:636
static ValueType & Set(ValueType &v, const StringType data, typename ValueType::AllocatorType &a)
Definition: document.h:603
static float Get(const ValueType &v)
Definition: document.h:592
GenericValue(float f) RAPIDJSON_NOEXCEPT
Constructor for float value.
Definition: document.h:834
bool Uint(unsigned i)
Definition: document.h:2807
@ kShortStringFlag
Definition: document.h:2001
static bool Is(const ValueType &v)
Definition: document.h:619
GenericValue() RAPIDJSON_NOEXCEPT
Default constructor creates a null value.
Definition: document.h:690
ParseErrorCode Code() const
Get the error code.
Definition: error.h:116
internal::MaybeAddConst< Const, PlainType >::Type ValueType
Definition: document.h:2887
static bool Is(const ValueType &v)
Definition: document.h:539
@ kNumberUint64Flag
Definition: document.h:1996
ValueType::AllocatorType AllocatorType
Definition: document.h:2890
int64_t i64
Definition: document.h:2066
static ValueType & Set(ValueType &v, ArrayType data)
Definition: document.h:621
MemberIterator MemberEnd() const
Definition: document.h:2966
@ kTrueType
true
Definition: rapidjson.h:732
static bool Is(const ValueType &v)
Definition: document.h:575
Definition: allocators.h:424
bool Double(double d)
Definition: document.h:2810
@ kInlineStrFlag
Definition: document.h:1986
void Swap(T &a, T &b) RAPIDJSON_NOEXCEPT
Custom swap() to avoid dependency on C++ <algorithm> header.
Definition: swap.h:33
bool Uint64(uint64_t i)
Definition: document.h:2809
GenericDocument(Type type, Allocator *allocator=0, size_t stackCapacity=kDefaultStackCapacity, StackAllocator *stackAllocator=0)
Constructor.
Definition: document.h:2497
_W64 unsigned int uintptr_t
Definition: stdint.h:52
GenericObject & operator=(const GenericObject &rhs)
Definition: document.h:2953
int i
Definition: document.h:2049
Ch str[MaxChars]
Definition: document.h:2038
Definition: document.h:2036
SizeType size
Definition: document.h:2078
GenericArray PopBack() const
Definition: document.h:2915
static double Get(const ValueType &v)
Definition: document.h:584
~GenericValue()
Destructor.
Definition: document.h:880
Reference to a constant string (not taking a copy)
Definition: document.h:346
GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT
Constructor for constant string (i.e. do not make a copy of string)
Definition: document.h:840
#define RAPIDJSON_NOEXCEPT_ASSERT(x)
Assertion (in non-throwing contexts).
Definition: rapidjson.h:687
@ kNullFlag
Definition: document.h:1989
GenericMember< Encoding, Allocator > Member
Name-value pair in an object.
Definition: document.h:671
GenericArray(const GenericArray &rhs)
Definition: document.h:2896
GenericArray< false, ValueType > Array
Definition: document.h:681
Encoding::Ch Ch
Character type derived from Encoding.
Definition: document.h:2486
GenericValue< Encoding, Allocator > ValueType
Value type of itself.
Definition: document.h:680
@ kUint64Flag
Definition: document.h:1982
MemberIterator EraseMember(ConstMemberIterator pos) const
Definition: document.h:3000
static ValueType & Set(ValueType &v, int64_t data)
Definition: document.h:569
void Swap(Stack &rhs) RAPIDJSON_NOEXCEPT
Definition: stack.h:90
static bool Is(const ValueType &v)
Definition: document.h:531
Allocator AllocatorType
Allocator type from template parameter.
Definition: document.h:673
SizeType MemberCapacity() const
Definition: document.h:2958
ValueType::StringRefType StringRefType
Definition: document.h:2945
GenericArray< false, ValueT > Array
Definition: document.h:2885
#define RAPIDJSON_ALIGN(x)
Data alignment of the machine.
Definition: rapidjson.h:307
Helper class for accessing Value of object type.
Definition: document.h:652
@ kCopyStringFlag
Definition: document.h:2000
RAPIDJSON_FORCEINLINE GenericValue * GetElementsPointer() const
Definition: document.h:2101
GenericDocument & Parse(const Ch *str, size_t length)
Definition: document.h:2724
void Clear() const
Definition: document.h:2904
GenericDocument & Parse(const Ch *str)
Parse JSON text from a read-only string.
Definition: document.h:2703
Iterator operator++(int)
Definition: document.h:247
bool RemoveMember(const GenericValue< EncodingType, SourceAllocator > &name) const
Definition: document.h:2998
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
Definition: document.h:2692
ValueType * pointer
Definition: document.h:205
uint64_t u64
Definition: document.h:2067
(Constant) member iterator for a JSON object value
Definition: document.h:186
RAPIDJSON_FORCEINLINE Member * GetMembersPointer() const
Definition: document.h:2103
static ValueType & Set(ValueType &v, int data)
Definition: document.h:533
GenericValue * ValueIterator
Value iterator for iterating in array.
Definition: document.h:678
Iterator operator+(DifferenceType n) const
Definition: document.h:253
GenericArray PushBack(ValueType &value, AllocatorType &allocator) const
Definition: document.h:2909
GenericValue(int i) RAPIDJSON_NOEXCEPT
Constructor for int value.
Definition: document.h:792
struct GenericValue::Number::U u
GenericArray PushBack(StringRefType value, AllocatorType &allocator) const
Definition: document.h:2913
#define RAPIDJSON_LIKELY(x)
Compiler branching hint for expression with high probability to be true.
Definition: rapidjson.h:494
Definition: allocators.h:422
RAPIDJSON_FORCEINLINE Member * SetMembersPointer(Member *members)
Definition: document.h:2104
const RAPIDJSON_FORCEINLINE Ch * GetStringPointer() const
Definition: document.h:2099
ShortString ss
Definition: document.h:2085
T value
Definition: document.h:2983
static RAPIDJSON_FORCEINLINE SizeType DataStringLength(const Data &data)
Definition: document.h:2095
SizeType hashcode
reserved
Definition: document.h:2024
String s
Definition: document.h:2084
bool HasMember(const Ch *name) const
Definition: document.h:2968
GenericArray & operator=(const GenericArray &rhs)
Definition: document.h:2897
GenericValue(const GenericValue< Encoding, SourceAllocator > &rhs, Allocator &allocator, bool copyConstStrings=false)
Explicit copy constructor (with allocator)
Definition: document.h:742
#define RAPIDJSON_SETPOINTER(type, p, x)
Definition: rapidjson.h:349
#define RAPIDJSON_USE_MEMBERSMAP
Enable RapidJSON support for object members handling in a std::multimap.
Definition: rapidjson.h:180
bool operator!=(const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
Definition: document.h:263
ValueType::Array ArrayType
Definition: document.h:618
void SetObjectRaw(Member *members, SizeType count, Allocator &allocator)
Initialize this value as object with initial data, without calling destructor.
Definition: document.h:2400
SizeType Size() const
Definition: document.h:2901
void SetLength(SizeType len)
Definition: document.h:2041
ValueType::Object ObjectType
Definition: document.h:634
@ MaxSize
Definition: document.h:2037
char padding[4]
Definition: document.h:2050
GenericObject< false, ValueType > Object
Definition: document.h:683
static ValueType & Set(ValueType &v, double data, typename ValueType::AllocatorType &)
Definition: document.h:586
ArrayData a
Definition: document.h:2088
ValueType & operator[](SizeType index) const
Definition: document.h:2905
Reference operator[](DifferenceType n) const
Definition: document.h:278
GenericValue(Array a) RAPIDJSON_NOEXCEPT
Constructor for Array.
Definition: document.h:861
GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT
Constructor for uint64_t value.
Definition: document.h:819
GenericValue(Type type) RAPIDJSON_NOEXCEPT
Constructor with JSON value type.
Definition: document.h:720
#define RAPIDJSON_UNLIKELY(x)
Compiler branching hint for expression with low probability to be true.
Definition: rapidjson.h:507
unsigned short uint16_t
Definition: stdint.h:16
GenericObject< false, ValueT > Object
Definition: document.h:2939
Iterator operator-(DifferenceType n) const
Definition: document.h:254
GenericStringRef(const CharType(&str)[N]) RAPIDJSON_NOEXCEPT
Create string reference from const character array.
Definition: document.h:375
bool String(const Ch *str, SizeType length, bool copy)
Definition: document.h:2820
void DoAddMember(GenericValue &name, GenericValue &value, Allocator &allocator)
Definition: document.h:2289
void RemoveAllMembers()
Definition: document.h:2993
Allocator AllocatorType
Allocator type from template parameter.
Definition: document.h:2488
static bool Is(const ValueType &v)
Definition: document.h:591
GenericMemberIterator< Const, typename ValueT::EncodingType, typename ValueT::AllocatorType > MemberIterator
Definition: document.h:2942
~GenericDocument()
Definition: document.h:2532
void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT
Initialize this value as constant string, without calling destructor.
Definition: document.h:2420
Concept for encoding of Unicode characters.
GenericMemberIterator Iterator
Iterator type itself.
Definition: document.h:196
Data data_
Definition: document.h:2466
void ShrinkToFit()
Definition: stack.h:101
@ kDoubleFlag
Definition: document.h:1983
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font name
Definition: ARPHICPL.TXT:16
#define RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
Definition: rapidjson.h:320
GenericValue(double d) RAPIDJSON_NOEXCEPT
Constructor for double value.
Definition: document.h:831
GenericMemberIterator(const NonConstIterator &it)
Iterator conversions to more const.
Definition: document.h:240
Iterator & operator--()
Definition: document.h:246
static int Get(const ValueType &v)
Definition: document.h:532
SizeType StrLen(const Ch *s)
Custom strlen() which works on different character types.
Definition: strfunc.h:31
GenericDocument & Swap(GenericDocument &rhs) RAPIDJSON_NOEXCEPT
Exchange the contents of this document with those of another.
Definition: document.h:2573
static bool Get(const ValueType &v)
Definition: document.h:524
bool Int(int i)
Definition: document.h:2806
Iterator & operator++()
Definition: document.h:245
#define RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY
User defined kDefaultObjectCapacity value.
Definition: document.h:99
void SetStringRaw(StringRefType s, Allocator &allocator)
Initialize this value as copy string with initial data, without calling destructor.
Definition: document.h:2427
GenericValue< Encoding, Allocator > ValueType
Value type of the document.
Definition: document.h:2487
GenericDocument & Parse(const Ch *str)
Parse JSON text from a read-only string (with kParseDefaultFlags)
Definition: document.h:2710
Flag f
Definition: document.h:2089
Concept for receiving events from GenericReader upon parsing. The functions return true if no error o...
bool EraseMember(const Ch *name) const
Definition: document.h:3002
char payload[sizeof(SizeType) *2+sizeof(void *)+2]
Definition: document.h:2017
@ kFalseFlag
Definition: document.h:1992
Definition: document.h:2048
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:476