15#ifndef RAPIDJSON_POINTER_H_
16#define RAPIDJSON_POINTER_H_
25RAPIDJSON_DIAG_OFF(
switch -
enum)
26#elif defined(_MSC_VER)
28RAPIDJSON_DIAG_OFF(4512)
31#if defined(RAPIDJSON_CPLUSPLUS) && RAPIDJSON_CPLUSPLUS >= 201703L
32#define RAPIDJSON_IF_CONSTEXPR if constexpr
34#define RAPIDJSON_IF_CONSTEXPR if
39static const SizeType kPointerInvalidIndex =
74template <
typename ValueType,
typename Allocator = CrtAllocator>
79 typedef typename ValueType::Ch
Ch;
136#if RAPIDJSON_HAS_STDSTRING
203 tokens_(const_cast<Token*>(tokens)),
313 Ch* p = r.CopyFromRaw(*
this, 1, token.length + 1);
314 std::memcpy(p, token.name, (token.length + 1) *
sizeof(
Ch));
330 Token token = {name, length, kPointerInvalidIndex};
340 template <
typename T>
342 (internal::NotExpr<internal::IsSame<
typename internal::RemoveConst<T>::Type,
Ch>>),
349#if RAPIDJSON_HAS_STDSTRING
374 buffer[length] =
'\0';
378 Token token = {
reinterpret_cast<Ch*
>(buffer), length, index};
384 for(
size_t i = 0; i <= length; i++)
385 name[i] =
static_cast<Ch>(buffer[i]);
386 Token token = {name, length, index};
424 Allocator& GetAllocator() {
return *
allocator_; }
433 size_t GetTokenCount()
const {
return tokenCount_; }
492 if(
int cmp = std::memcmp(
510 template <
typename OutputStream>
511 bool Stringify(OutputStream& os)
const
513 return Stringify<false, OutputStream>(os);
521 template <
typename OutputStream>
522 bool StringifyUriFragment(OutputStream& os)
const
524 return Stringify<true, OutputStream>(os);
548 ValueType& Create(ValueType& root,
549 typename ValueType::AllocatorType&
allocator,
550 bool* alreadyExist = 0)
const
553 ValueType* v = &root;
557 if(v->IsArray() && t->name[0] ==
'-' && t->length == 1)
559 v->PushBack(ValueType().Move(),
allocator);
560 v = &((*v)[v->Size() - 1]);
565 if(t->index == kPointerInvalidIndex)
572 if(!v->IsArray() && !v->IsObject())
578 if(t->index >= v->Size())
581 while(t->index >= v->Size())
582 v->PushBack(ValueType().Move(),
allocator);
585 v = &((*v)[t->index]);
589 typename ValueType::MemberIterator m = v->FindMember(
590 GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
591 if(m == v->MemberEnd())
593 v->AddMember(ValueType(t->name, t->length,
allocator).Move(),
607 *alreadyExist = exist;
618 template <
typename stackAllocator>
620 GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
621 bool* alreadyExist = 0)
const
623 return Create(document, document.
GetAllocator(), alreadyExist);
648 UriType GetUri(ValueType& root,
650 size_t* unresolvedTokenIndex = 0,
653 static const Ch kIdString[] = {
'i',
'd',
'\0'};
654 static const ValueType kIdValue(kIdString, 2);
657 ValueType* v = &root;
664 typename ValueType::MemberIterator m = v->FindMember(kIdValue);
665 if(m != v->MemberEnd() && (m->value).IsString())
671 GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
672 if(m == v->MemberEnd())
678 if(t->index == kPointerInvalidIndex || t->index >= v->Size())
680 v = &((*v)[t->index]);
686 if(unresolvedTokenIndex)
687 *unresolvedTokenIndex =
static_cast<size_t>(t -
tokens_);
693 UriType GetUri(
const ValueType& root,
695 size_t* unresolvedTokenIndex = 0,
698 return GetUri(
const_cast<ValueType&
>(root), rootUri, unresolvedTokenIndex,
allocator);
719 ValueType* Get(ValueType& root,
size_t* unresolvedTokenIndex = 0)
const
722 ValueType* v = &root;
728 typename ValueType::MemberIterator m = v->FindMember(
729 GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
730 if(m == v->MemberEnd())
736 if(t->index == kPointerInvalidIndex || t->index >= v->Size())
738 v = &((*v)[t->index]);
744 if(unresolvedTokenIndex)
745 *unresolvedTokenIndex =
static_cast<size_t>(t -
tokens_);
756 const ValueType* Get(
const ValueType& root,
size_t* unresolvedTokenIndex = 0)
const
758 return Get(
const_cast<ValueType&
>(root), unresolvedTokenIndex);
776 ValueType& GetWithDefault(ValueType& root,
778 typename ValueType::AllocatorType&
allocator)
const
781 ValueType& v = Create(root,
allocator, &alreadyExist);
786 ValueType& GetWithDefault(ValueType& root,
788 typename ValueType::AllocatorType&
allocator)
const
791 ValueType& v = Create(root,
allocator, &alreadyExist);
795#if RAPIDJSON_HAS_STDSTRING
797 ValueType& GetWithDefault(ValueType& root,
799 typename ValueType::AllocatorType&
allocator)
const
802 ValueType& v = Create(root,
allocator, &alreadyExist);
811 template <
typename T>
813 (internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>), (ValueType&))
814 GetWithDefault(ValueType& root,
816 typename ValueType::AllocatorType&
allocator)
const
822 template <
typename stackAllocator>
823 ValueType& GetWithDefault(
824 GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
831 template <
typename stackAllocator>
832 ValueType& GetWithDefault(
833 GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
839#if RAPIDJSON_HAS_STDSTRING
841 template <
typename stackAllocator>
842 ValueType& GetWithDefault(
843 GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
854 template <
typename T,
typename stackAllocator>
856 (internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>), (ValueType&))
858 GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
879 Set(ValueType& root, ValueType&
value,
typename ValueType::AllocatorType&
allocator)
const
886 Set(ValueType& root,
const ValueType&
value,
typename ValueType::AllocatorType&
allocator)
const
898#if RAPIDJSON_HAS_STDSTRING
900 ValueType&
Set(ValueType& root,
901 const std::basic_string<Ch>&
value,
902 typename ValueType::AllocatorType&
allocator)
const
912 template <
typename T>
914 (internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>), (ValueType&))
915 Set(ValueType& root, T
value,
typename ValueType::AllocatorType&
allocator)
const
921 template <
typename stackAllocator>
923 Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
924 ValueType&
value)
const
926 return Create(document) =
value;
930 template <
typename stackAllocator>
932 Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
933 const ValueType&
value)
const
939 template <
typename stackAllocator>
941 Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
947#if RAPIDJSON_HAS_STDSTRING
949 template <
typename stackAllocator>
951 Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
952 const std::basic_string<Ch>&
value)
const
962 template <
typename T,
typename stackAllocator>
964 (internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T>>), (ValueType&))
965 Set(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
968 return Create(document) =
value;
986 Swap(ValueType& root, ValueType&
value,
typename ValueType::AllocatorType&
allocator)
const
992 template <
typename stackAllocator>
994 Swap(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
995 ValueType&
value)
const
1010 bool Erase(ValueType& root)
const
1016 ValueType* v = &root;
1020 switch(v->GetType())
1023 typename ValueType::MemberIterator m = v->FindMember(
1024 GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
1025 if(m == v->MemberEnd())
1031 if(t->index == kPointerInvalidIndex || t->index >= v->Size())
1033 v = &((*v)[t->index]);
1035 default:
return false;
1039 switch(v->GetType())
1041 case kObjectType:
return v->EraseMember(GenericStringRef<Ch>(last->name, last->length));
1043 if(last->index == kPointerInvalidIndex || last->index >= v->Size())
1045 v->Erase(v->Begin() + last->index);
1047 default:
return false;
1060 CopyFromRaw(
const GenericPointer& rhs,
size_t extraToken = 0,
size_t extraNameBufferSize = 0)
1067 nameBufferSize += t->length;
1077 if(nameBufferSize > 0)
1102 bool NeedPercentEncode(
Ch c)
const
1104 return !((c >=
'0' && c <=
'9') || (c >=
'A' && c <=
'Z') || (c >=
'a' && c <=
'z') ||
1105 c ==
'-' || c ==
'.' || c ==
'_' || c ==
'~');
1116 void Parse(
const Ch*
source,
size_t length)
1138 bool uriFragment =
false;
1145 if(i != length &&
source[i] !=
'/')
1157 bool isNumber =
true;
1159 while(i < length &&
source[i] !=
'/')
1168 GenericInsituStringStream<EncodingType> os(name);
1169 Ch* begin = os.PutBegin();
1170 if(!Transcoder<UTF8<>,
EncodingType>().Validate(is, os) || !is.IsValid())
1175 size_t len = os.PutEnd(begin);
1187 else if(NeedPercentEncode(c))
1221 if(c <
'0' || c >
'9')
1226 token->length =
static_cast<SizeType>(name - token->name);
1227 if(token->length == 0)
1232 if(isNumber && token->length > 1 && token->name[0] ==
'0')
1239 for(
size_t j = 0; j < token->length; j++)
1251 token->index = isNumber ? n : kPointerInvalidIndex;
1273 template <
bool uriFragment,
typename OutputStream>
1274 bool Stringify(OutputStream& os)
const
1284 for(
size_t j = 0; j < t->length; j++)
1297 else if(uriFragment && NeedPercentEncode(c))
1300 GenericStringStream<typename ValueType::EncodingType>
source(&t->name[j]);
1319 class PercentDecodeStream
1322 typedef typename ValueType::Ch Ch;
1329 PercentDecodeStream(
const Ch*
source,
const Ch* end)
1336 if(*src_ !=
'%' || src_ + 3 > end_)
1343 for(
int j = 0; j < 2; j++)
1345 c =
static_cast<Ch
>(c << 4);
1347 if(h >=
'0' && h <=
'9')
1348 c =
static_cast<Ch
>(c + h -
'0');
1349 else if(h >=
'A' && h <=
'F')
1350 c =
static_cast<Ch
>(c + h -
'A' + 10);
1351 else if(h >=
'a' && h <=
'f')
1352 c =
static_cast<Ch
>(c + h -
'a' + 10);
1363 size_t Tell()
const {
return static_cast<size_t>(src_ - head_); }
1364 bool IsValid()
const {
return valid_; }
1374 template <
typename OutputStream>
1381 unsigned char u =
static_cast<unsigned char>(c);
1382 static const char hexDigits[16] = {
1383 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
1385 os_.Put(
static_cast<typename OutputStream::Ch
>(hexDigits[u >> 4]));
1386 os_.Put(
static_cast<typename OutputStream::Ch
>(hexDigits[u & 15]));
1411template <
typename T>
1414 typename T::AllocatorType&
a)
1419template <
typename T,
typename CharType,
size_t N>
1420typename T::ValueType&
1428template <
typename DocumentType>
1429typename DocumentType::ValueType&
1433 return pointer.Create(document);
1436template <
typename DocumentType,
typename CharType,
size_t N>
1438 const CharType (&
source)[N])
1445template <
typename T>
1448 size_t* unresolvedTokenIndex = 0)
1450 return pointer.Get(root, unresolvedTokenIndex);
1453template <
typename T>
1456 size_t* unresolvedTokenIndex = 0)
1458 return pointer.Get(root, unresolvedTokenIndex);
1461template <
typename T,
typename CharType,
size_t N>
1462typename T::ValueType*
1468template <
typename T,
typename CharType,
size_t N>
1469const typename T::ValueType*
1477template <
typename T>
1478typename T::ValueType&
1482 typename T::AllocatorType&
a)
1487template <
typename T>
1488typename T::ValueType&
1492 typename T::AllocatorType&
a)
1497#if RAPIDJSON_HAS_STDSTRING
1498template <
typename T>
1499typename T::ValueType&
1503 typename T::AllocatorType&
a)
1509template <
typename T,
typename T2>
1512 (
typename T::ValueType&))
1516 typename T::AllocatorType&
a)
1521template <
typename T,
typename CharType,
size_t N>
1523 const CharType (&
source)[N],
1525 typename T::AllocatorType&
a)
1531template <
typename T,
typename CharType,
size_t N>
1533 const CharType (&
source)[N],
1535 typename T::AllocatorType&
a)
1541#if RAPIDJSON_HAS_STDSTRING
1542template <
typename T,
typename CharType,
size_t N>
1543typename T::ValueType&
1545 const CharType (&
source)[N],
1547 typename T::AllocatorType&
a)
1554template <
typename T,
typename CharType,
size_t N,
typename T2>
1557 (
typename T::ValueType&))
1561 typename T::AllocatorType&
a)
1569template <
typename DocumentType>
1570typename DocumentType::ValueType&
1578template <
typename DocumentType>
1579typename DocumentType::ValueType&
1587#if RAPIDJSON_HAS_STDSTRING
1588template <
typename DocumentType>
1589typename DocumentType::ValueType&
1592 const std::basic_string<typename DocumentType::Ch>&
defaultValue)
1598template <
typename DocumentType,
typename T2>
1601 (
typename DocumentType::ValueType&))
1609template <
typename DocumentType,
typename CharType,
size_t N>
1610typename DocumentType::ValueType&
1612 const CharType (&
source)[N],
1619template <
typename DocumentType,
typename CharType,
size_t N>
1620typename DocumentType::ValueType&
1622 const CharType (&
source)[N],
1629#if RAPIDJSON_HAS_STDSTRING
1630template <
typename DocumentType,
typename CharType,
size_t N>
1631typename DocumentType::ValueType&
1633 const CharType (&
source)[N],
1634 const std::basic_string<typename DocumentType::Ch>&
defaultValue)
1641template <
typename DocumentType,
typename CharType,
size_t N,
typename T2>
1644 (
typename DocumentType::ValueType&))
1653template <
typename T>
1656 typename T::ValueType&
value,
1657 typename T::AllocatorType&
a)
1662template <
typename T>
1665 const typename T::ValueType&
value,
1666 typename T::AllocatorType&
a)
1671template <
typename T>
1674 const typename T::Ch*
value,
1675 typename T::AllocatorType&
a)
1680#if RAPIDJSON_HAS_STDSTRING
1681template <
typename T>
1684 const std::basic_string<typename T::Ch>&
value,
1685 typename T::AllocatorType&
a)
1691template <
typename T,
typename T2>
1694 (
typename T::ValueType&))
1698 typename T::AllocatorType&
a)
1703template <
typename T,
typename CharType,
size_t N>
1705 const CharType (&
source)[N],
1706 typename T::ValueType&
value,
1707 typename T::AllocatorType&
a)
1712template <
typename T,
typename CharType,
size_t N>
1714 const CharType (&
source)[N],
1715 const typename T::ValueType&
value,
1716 typename T::AllocatorType&
a)
1721template <
typename T,
typename CharType,
size_t N>
1723 const CharType (&
source)[N],
1724 const typename T::Ch*
value,
1725 typename T::AllocatorType&
a)
1730#if RAPIDJSON_HAS_STDSTRING
1731template <
typename T,
typename CharType,
size_t N>
1733 const CharType (&
source)[N],
1734 const std::basic_string<typename T::Ch>&
value,
1735 typename T::AllocatorType&
a)
1741template <
typename T,
typename CharType,
size_t N,
typename T2>
1744 (
typename T::ValueType&))
1752template <
typename DocumentType>
1753typename DocumentType::ValueType&
1756 typename DocumentType::ValueType&
value)
1761template <
typename DocumentType>
1762typename DocumentType::ValueType&
1765 const typename DocumentType::ValueType&
value)
1770template <
typename DocumentType>
1771typename DocumentType::ValueType&
1774 const typename DocumentType::Ch*
value)
1779#if RAPIDJSON_HAS_STDSTRING
1780template <
typename DocumentType>
1781typename DocumentType::ValueType&
1784 const std::basic_string<typename DocumentType::Ch>&
value)
1790template <
typename DocumentType,
typename T2>
1793 (
typename DocumentType::ValueType&))
1801template <
typename DocumentType,
typename CharType,
size_t N>
1803 const CharType (&
source)[N],
1804 typename DocumentType::ValueType&
value)
1809template <
typename DocumentType,
typename CharType,
size_t N>
1811 const CharType (&
source)[N],
1812 const typename DocumentType::ValueType&
value)
1817template <
typename DocumentType,
typename CharType,
size_t N>
1819 const CharType (&
source)[N],
1820 const typename DocumentType::Ch*
value)
1825#if RAPIDJSON_HAS_STDSTRING
1826template <
typename DocumentType,
typename CharType,
size_t N>
1827typename DocumentType::ValueType&
1829 const CharType (&
source)[N],
1830 const std::basic_string<typename DocumentType::Ch>&
value)
1836template <
typename DocumentType,
typename CharType,
size_t N,
typename T2>
1839 (
typename DocumentType::ValueType&))
1847template <
typename T>
1850 typename T::ValueType&
value,
1851 typename T::AllocatorType&
a)
1856template <
typename T,
typename CharType,
size_t N>
1858 const CharType (&
source)[N],
1859 typename T::ValueType&
value,
1860 typename T::AllocatorType&
a)
1865template <
typename DocumentType>
1866typename DocumentType::ValueType&
1869 typename DocumentType::ValueType&
value)
1874template <
typename DocumentType,
typename CharType,
size_t N>
1876 const CharType (&
source)[N],
1877 typename DocumentType::ValueType&
value)
1884template <
typename T>
1890template <
typename T,
typename CharType,
size_t N>
1900#if defined(__clang__) || defined(_MSC_VER)
Allocator & GetAllocator()
Get the allocator of this document.
Definition document.h:3472
A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.
Definition pointer.h:1376
PercentEncodeStream(OutputStream &os)
Definition pointer.h:1378
void Put(char c)
Definition pointer.h:1379
Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
Definition pointer.h:76
friend void swap(GenericPointer &a, GenericPointer &b) RAPIDJSON_NOEXCEPT
free-standing swap function helper
Definition pointer.h:296
Ch * nameBuffer_
Definition pointer.h:1396
CrtAllocator * allocator_
Definition pointer.h:1393
GenericPointer(const GenericPointer &rhs, Allocator *allocator)
Copy constructor.
Definition pointer.h:224
GenericPointer(const Ch *source, Allocator *allocator=0)
Constructor that parses a string or URI fragment representation.
Definition pointer.h:124
Value::EncodingType EncodingType
Definition pointer.h:78
GenericPointer(const Token *tokens, size_t tokenCount)
Constructor with user-supplied tokens.
Definition pointer.h:199
GenericPointer(Allocator *allocator=0)
Default constructor.
Definition pointer.h:107
size_t tokenCount_
Definition pointer.h:1398
GenericPointer(const GenericPointer &rhs)
Copy constructor.
Definition pointer.h:211
PointerParseErrorCode parseErrorCode_
Definition pointer.h:1400
Token * tokens_
Definition pointer.h:1397
CrtAllocator * ownAllocator_
Definition pointer.h:1395
GenericPointer(const Ch *source, size_t length, Allocator *allocator=0)
Definition pointer.h:165
GenericPointer Append(const Ch *name, SizeType length, Allocator *allocator=0) const
Append a name token with length, and return a new Pointer.
Definition pointer.h:328
GenericPointer Append(const Token &token, Allocator *allocator=0) const
Append a token and return a new Pointer.
Definition pointer.h:309
RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr< internal::IsSame< typename internal::RemoveConst< T >::Type, Ch > >),(GenericPointer)) Append(T *name
Append a name token without length, and return a new Pointer.
Value::Ch Ch
Definition pointer.h:79
GenericUri< Value, CrtAllocator > UriType
Definition pointer.h:80
~GenericPointer()
Destructor.
Definition pointer.h:237
size_t parseErrorOffset_
Definition pointer.h:1399
GenericPointer & operator=(const GenericPointer &rhs)
Assignment operator.
Definition pointer.h:246
CrtAllocator * allocator
Definition pointer.h:344
GenericPointer & Swap(GenericPointer &other) RAPIDJSON_NOEXCEPT
Swap the content of this pointer with an other.
Definition pointer.h:274
GenericUri Resolve(const GenericUri &baseuri, Allocator *allocator=0)
Resolve this URI against another (base) URI in accordance with URI resolution rules.
Definition uri.h:259
Concept for allocating, resizing and freeing memory block.
GenericPointer< Value, CrtAllocator > Pointer
Definition fwd.h:145
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition rapidjson.h:451
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition rapidjson.h:121
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition rapidjson.h:124
PointerParseErrorCode
Error code of JSON pointer parsing.
Definition error.h:277
@ kPointerParseErrorInvalidEscape
Invalid escape.
Definition error.h:281
@ kPointerParseErrorTokenMustBeginWithSolidus
A token must begin with a '/'.
Definition error.h:280
@ kPointerParseErrorNone
The parse is successful.
Definition error.h:278
@ kPointerParseErrorCharacterMustPercentEncode
Definition error.h:283
@ kPointerParseErrorInvalidPercentEncoding
Invalid percent encoding in URI fragment.
Definition error.h:282
CK_TILE_HOST_DEVICE constexpr bool operator!=(const array< T, Size > &a, const array< T, Size > &b)
Definition tile/core/container/array.hpp:280
@ Set
Definition ck.hpp:278
__host__ __device__ constexpr bool operator==(Sequence< Xs... >, Sequence< Ys... >)
Definition utility/sequence.hpp:649
char * u64toa(uint64_t value, char *buffer)
Definition itoa.h:135
void Swap(T &a, T &b) RAPIDJSON_NOEXCEPT
Custom swap() to avoid dependency on C++ <algorithm> header.
Definition swap.h:33
SizeType StrLen(const Ch *s)
Custom strlen() which works on different character types.
Definition strfunc.h:32
char * u32toa(uint32_t value, char *buffer)
Definition itoa.h:41
const GenericPointer< typename T::ValueType > T2 value
Definition pointer.h:1697
const GenericPointer< typename T::ValueType > T2 defaultValue
Definition pointer.h:1515
T::ValueType & SwapValueByPointer(T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::ValueType &value, typename T::AllocatorType &a)
Definition pointer.h:1848
T::ValueType & SetValueByPointer(T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::ValueType &value, typename T::AllocatorType &a)
Definition pointer.h:1654
T::ValueType * GetValueByPointer(T &root, const GenericPointer< typename T::ValueType > &pointer, size_t *unresolvedTokenIndex=0)
Definition pointer.h:1446
#define RAPIDJSON_IF_CONSTEXPR
Definition pointer.h:34
bool EraseValueByPointer(T &root, const GenericPointer< typename T::ValueType > &pointer)
Definition pointer.h:1885
T::ValueType & CreateValueByPointer(T &root, const GenericPointer< typename T::ValueType > &pointer, typename T::AllocatorType &a)
Definition pointer.h:1412
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename T::ValueType &)) GetValueByPointerWithDefault(T &root
const GenericPointer< typename T::ValueType > & pointer
Definition pointer.h:1514
T::ValueType & GetValueByPointerWithDefault(T &root, const GenericPointer< typename T::ValueType > &pointer, const typename T::ValueType &defaultValue, typename T::AllocatorType &a)
Definition pointer.h:1479
const CharType(& source)[N]
Definition pointer.h:1559
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1517
@ kObjectType
object
Definition rapidjson.h:764
@ kArrayType
array
Definition rapidjson.h:765
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition rapidjson.h:746
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.).
Definition rapidjson.h:429
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition rapidjson.h:742
A token is the basic units of internal representation.
Definition pointer.h:96
SizeType index
A valid array index, if it is not equal to kPointerInvalidIndex.
Definition pointer.h:100
SizeType length
Length of the name.
Definition pointer.h:99
const Ch * name
Definition pointer.h:97
Definition document.h:595