RAPIDJSON_DIAG_OFF(
switch-
enum)
28RAPIDJSON_DIAG_OFF(4512)
80 template<
typenameValueType,
typenameAllocator = CrtAllocator>
84 typedef typenameValueType::Ch
Ch;
120 #if RAPIDJSON_HAS_STDSTRING 165 GenericPointer(
constToken* tokens,
size_ttokenCount) : allocator_(), ownAllocator_(), nameBuffer_(), tokens_(const_cast<Token*>(tokens)), tokenCount_(tokenCount), parseErrorOffset_(), parseErrorCode_(
kPointerParseErrorNone) {}
213 r.allocator_ = allocator;
214 Ch*p =
r.CopyFromRaw(*
this, 1, token.length + 1);
215std::memcpy(p, token.name, (token.length + 1) *
sizeof(
Ch));
216 r.tokens_[tokenCount_].name = p;
217 r.tokens_[tokenCount_].length = token.length;
218 r.tokens_[tokenCount_].index = token.index;
231 returnAppend(token, allocator);
240 template<
typenameT>
243 returnAppend(name,
StrLen(name), allocator);
246 #if RAPIDJSON_HAS_STDSTRING 254 returnAppend(name.c_str(),
static_cast<SizeType>(name.size()), allocator);
270 if(
sizeof(Ch) == 1) {
271Token token = {
reinterpret_cast<Ch*
>(
buffer), length, index };
272 returnAppend(token, allocator);
276 for(
size_t i= 0;
i<= length;
i++)
277name[
i] =
static_cast<Ch
>(
buffer[
i]);
278Token token = { name, length, index };
279 returnAppend(token, allocator);
289GenericPointer Append(
constValueType& token,
Allocator* allocator = 0)
const{
290 if(token.IsString())
291 returnAppend(token.GetString(), token.GetStringLength(), allocator);
295 returnAppend(
static_cast<SizeType>(token.GetUint64()), allocator);
306 size_tGetParseErrorOffset()
const{
returnparseErrorOffset_; }
314 Allocator& GetAllocator() {
return*allocator_; }
320 constToken* GetTokens()
const{
returntokens_; }
323 size_tGetTokenCount()
const{
returntokenCount_; }
334 bool operator==(
constGenericPointer& rhs)
const{
335 if(!
IsValid() || !rhs.IsValid() || tokenCount_ != rhs.tokenCount_)
338 for(
size_t i= 0;
i< tokenCount_;
i++) {
339 if(tokens_[
i].index != rhs.tokens_[
i].index ||
340tokens_[
i].length != rhs.tokens_[
i].length ||
341(tokens_[
i].length != 0 && std::memcmp(tokens_[
i].name, rhs.tokens_[
i].name,
sizeof(Ch)* tokens_[
i].length) != 0))
354 bool operator!=(
constGenericPointer& rhs)
const{
return!(*
this== rhs); }
366 template<
typenameOutputStream>
367 boolStringify(OutputStream& os)
const{
368 returnStringify<false, OutputStream>(os);
376 template<
typenameOutputStream>
377 boolStringifyUriFragment(OutputStream& os)
const{
378 returnStringify<true, OutputStream>(os);
401ValueType& Create(ValueType& root,
typenameValueType::AllocatorType& allocator,
bool* alreadyExist = 0)
const{
403ValueType* v = &root;
405 for(
constToken *
t= tokens_;
t!= tokens_ + tokenCount_; ++
t) {
406 if(v->IsArray() &&
t->name[0] ==
'-'&&
t->length == 1) {
408v->PushBack(ValueType().SetValueAllocator(&allocator).Move(), allocator);
409v = &((*v)[v->Size() - 1]);
418 if(!v->IsArray() && !v->IsObject())
423 if(
t->index >= v->Size()) {
424v->Reserve(
t->index + 1, allocator);
426 while(
t->index >= v->Size())
427v->PushBack(ValueType().SetValueAllocator(&allocator).Move(), allocator);
430v = &((*v)[
t->index]);
433 typenameValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(
t->name,
t->length));
434 if(m == v->MemberEnd()) {
436v->AddMember(ValueType(
t->name,
t->length, allocator).SetValueAllocator(&allocator).Move(), ValueType().SetValueAllocator(&allocator).Move(), allocator);
449*alreadyExist = exist;
460 template<
typenamestackAllocator>
461ValueType& Create(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
bool* alreadyExist = 0)
const{
462 returnCreate(document, document.GetAllocator(), alreadyExist);
484ValueType*
Get(ValueType& root,
size_t* unresolvedTokenIndex = 0)
const{
486ValueType* v = &root;
487 for(
constToken *
t= tokens_;
t!= tokens_ + tokenCount_; ++
t) {
488 switch(v->GetType()) {
491 typenameValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(
t->name,
t->length));
492 if(m == v->MemberEnd())
500v = &((*v)[
t->index]);
507 if(unresolvedTokenIndex)
508*unresolvedTokenIndex =
static_cast<size_t>(
t- tokens_);
519 constValueType*
Get(
constValueType& root,
size_t* unresolvedTokenIndex = 0)
const{
520 return Get(
const_cast<ValueType&
>(root), unresolvedTokenIndex);
538ValueType& GetWithDefault(ValueType& root,
constValueType&
defaultValue,
typenameValueType::AllocatorType& allocator)
const{
540 Value& v = Create(root, allocator, &alreadyExist);
541 returnalreadyExist ? v : v.CopyFrom(
defaultValue, allocator);
545ValueType& GetWithDefault(ValueType& root,
constCh*
defaultValue,
typenameValueType::AllocatorType& allocator)
const{
547 Value& v = Create(root, allocator, &alreadyExist);
548 returnalreadyExist ? v : v.SetString(
defaultValue, allocator);
551 #if RAPIDJSON_HAS_STDSTRING 553ValueType& GetWithDefault(ValueType& root,
conststd::basic_string<Ch>&
defaultValue,
typenameValueType::AllocatorType& allocator)
const{
555 Value& v = Create(root, allocator, &alreadyExist);
556 returnalreadyExist ? v : v.SetString(
defaultValue, allocator);
564 template<
typenameT>
566GetWithDefault(ValueType& root,
T defaultValue,
typenameValueType::AllocatorType& allocator)
const{
567 returnGetWithDefault(root, ValueType(
defaultValue).Move(), allocator);
571 template<
typenamestackAllocator>
572ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
constValueType&
defaultValue)
const{
573 returnGetWithDefault(document,
defaultValue, document.GetAllocator());
577 template<
typenamestackAllocator>
578ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
constCh*
defaultValue)
const{
579 returnGetWithDefault(document,
defaultValue, document.GetAllocator());
582 #if RAPIDJSON_HAS_STDSTRING 584 template<
typenamestackAllocator>
585ValueType& GetWithDefault(GenericDocument<EncodingType, typename ValueType::AllocatorType, stackAllocator>& document,
conststd::basic_string<Ch>&
defaultValue)
const{
586 returnGetWithDefault(document,
defaultValue, document.GetAllocator());
594 template<
typenameT,
typenamestackAllocator>
597 returnGetWithDefault(document,
defaultValue, document.GetAllocator());
615ValueType&
Set(ValueType& root, ValueType&
value,
typenameValueType::AllocatorType& allocator)
const{
616 returnCreate(root, allocator) =
value;
620ValueType&
Set(ValueType& root,
constValueType&
value,
typenameValueType::AllocatorType& allocator)
const{
621 returnCreate(root, allocator).CopyFrom(
value, allocator);
625ValueType&
Set(ValueType& root,
const Ch*
value,
typenameValueType::AllocatorType& allocator)
const{
626 returnCreate(root, allocator) = ValueType(
value, allocator).Move();
629 #if RAPIDJSON_HAS_STDSTRING 631ValueType& Set(ValueType& root,
conststd::basic_string<Ch>&
value,
typenameValueType::AllocatorType& allocator)
const{
632 returnCreate(root, allocator) = ValueType(
value, allocator).Move();
640 template<
typenameT>
642Set(ValueType& root,
T value, typename ValueType::AllocatorType& allocator)
const{
643 returnCreate(root, allocator) = ValueType(
value).Move();
647 template<
typenamestackAllocator>
649 returnCreate(document) =
value;
653 template<
typenamestackAllocator>
659 template<
typenamestackAllocator>
664 #if RAPIDJSON_HAS_STDSTRING 666 template<
typenamestackAllocator>
676 template<
typenameT,
typenamestackAllocator>
679 returnCreate(document) =
value;
697ValueType&
Swap(ValueType& root, ValueType&
value,
typenameValueType::AllocatorType& allocator)
const{
698 returnCreate(root, allocator).Swap(
value);
702 template<
typenamestackAllocator>
704 returnCreate(document).Swap(
value);
716 bool Erase(ValueType& root)
const{
718 if(tokenCount_ == 0)
721ValueType* v = &root;
722 constToken*
last= tokens_ + (tokenCount_ - 1);
723 for(
constToken *
t= tokens_;
t!=
last; ++
t) {
724 switch(v->GetType()) {
728 if(m == v->MemberEnd())
736v = &((*v)[
t->index]);
743 switch(v->GetType()) {
749v->Erase(v->Begin() +
last->index);
770nameBufferSize +=
t->length;
773tokens_ =
static_cast<Token *
>(allocator_->Malloc(tokenCount_ *
sizeof(Token) + (nameBufferSize + extraNameBufferSize) *
sizeof(
Ch)));
774nameBuffer_ =
reinterpret_cast<Ch*
>(tokens_ + tokenCount_);
778 if(nameBufferSize > 0) {
779std::memcpy(nameBuffer_, rhs.
nameBuffer_, nameBufferSize *
sizeof(
Ch));
783std::ptrdiff_t diff = nameBuffer_ - rhs.
nameBuffer_;
784 for(Token *
t= tokens_;
t!= tokens_ + rhs.
tokenCount_; ++
t)
787 returnnameBuffer_ + nameBufferSize;
796 return!((c >=
'0'&& c <=
'9') || (c >=
'A'&& c <=
'Z') || (c >=
'a'&& c <=
'z') || c ==
'-'|| c ==
'.'|| c ==
'_'|| c ==
'~');
822Token* token = tokens_ =
static_cast<Token *
>(allocator_->Malloc(tokenCount_ *
sizeof(Token) + length *
sizeof(
Ch)));
823 Ch* name = nameBuffer_ =
reinterpret_cast<Ch*
>(tokens_ + tokenCount_);
827 booluriFragment =
false;
833 if(
i!= length &&
source[
i] !=
'/') {
838 while(
i< length) {
843 boolisNumber =
true;
845 while(
i< length &&
source[
i] !=
'/') {
868 else if(NeedPercentEncode(c)) {
880 if(c ==
'0') c =
'~';
881 else if(c ==
'1') c =
'/';
895 if(c < '0' || c >
'9')
900token->length =
static_cast<SizeType>(name - token->name);
901 if(token->length == 0)
906 if(isNumber && token->length > 1 && token->name[0] ==
'0')
912 for(
size_tj = 0; j < token->length; j++) {
935parseErrorOffset_ =
i;
945 template<
booluriFragment,
typenameOutputStream>
952 for(Token *
t= tokens_;
t!= tokens_ + tokenCount_; ++
t) {
954 for(
size_tj = 0; j <
t->length; j++) {
960 else if(c ==
'/') {
964 else if(uriFragment && NeedPercentEncode(c)) {
967PercentEncodeStream<OutputStream> target(os);
987 typedef typenameValueType::Ch
Ch;
997 if(*src_ !=
'%'|| src_ + 3 > end_) {
1003 for(
intj = 0; j < 2; j++) {
1004c =
static_cast<Ch>(c << 4);
1006 if(h >=
'0'&& h <=
'9') c =
static_cast<Ch>(c + h -
'0');
1007 else if(h >=
'A'&& h <=
'F') c =
static_cast<Ch>(c + h -
'A'+ 10);
1008 else if(h >=
'a'&& h <=
'f') c =
static_cast<Ch>(c + h -
'a'+ 10);
1018 size_t Tell()
const{
return static_cast<size_t>(src_ - head_); }
1029 template<
typenameOutputStream>
1034 unsigned charu =
static_cast<unsigned char>(c);
1035 static const charhexDigits[16] = {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
1037os_.Put(
static_cast<typename OutputStream::Ch
>(hexDigits[u >> 4]));
1038os_.Put(
static_cast<typename OutputStream::Ch
>(hexDigits[u & 15]));
1061 template<
typenameT>
1066 template<
typenameT,
typenameCharType,
size_tN>
1073 template<
typenameDocumentType>
1075 return pointer.Create(document);
1078 template<
typenameDocumentType,
typenameCharType,
size_tN>
1085 template<
typenameT>
1087 return pointer.Get(root, unresolvedTokenIndex);
1090 template<
typenameT>
1092 return pointer.Get(root, unresolvedTokenIndex);
1095 template<
typenameT,
typenameCharType,
size_tN>
1100 template<
typenameT,
typenameCharType,
size_tN>
1107 template<
typenameT>
1112 template<
typenameT>
1117 #if RAPIDJSON_HAS_STDSTRING 1118 template<
typenameT>
1124 template<
typenameT,
typenameT2>
1130 template<
typenameT,
typenameCharType,
size_tN>
1135 template<
typenameT,
typenameCharType,
size_tN>
1140 #if RAPIDJSON_HAS_STDSTRING 1141 template<
typenameT,
typenameCharType,
size_tN>
1143 returnGenericPointer<typename T::ValueType>(
source,
N- 1).GetWithDefault(root,
defaultValue,
a);
1147 template<
typenameT,
typenameCharType,
size_tN,
typenameT2>
1155 template<
typenameDocumentType>
1160 template<
typenameDocumentType>
1165 #if RAPIDJSON_HAS_STDSTRING 1166 template<
typenameDocumentType>
1172 template<
typenameDocumentType,
typenameT2>
1178 template<
typenameDocumentType,
typenameCharType,
size_tN>
1183 template<
typenameDocumentType,
typenameCharType,
size_tN>
1188 #if RAPIDJSON_HAS_STDSTRING 1189 template<
typenameDocumentType,
typenameCharType,
size_tN>
1191 returnGenericPointer<typename DocumentType::ValueType>(
source,
N- 1).GetWithDefault(document,
defaultValue);
1195 template<
typenameDocumentType,
typenameCharType,
size_tN,
typenameT2>
1203 template<
typenameT>
1208 template<
typenameT>
1213 template<
typenameT>
1218 #if RAPIDJSON_HAS_STDSTRING 1219 template<
typenameT>
1220 typenameT::ValueType&
SetValueByPointer(
T& root,
constGenericPointer<typename T::ValueType>&
pointer,
conststd::basic_string<typename T::Ch>&
value,
typenameT::AllocatorType&
a) {
1225 template<
typenameT,
typenameT2>
1226 RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (
typenameT::ValueType&))
1231 template<
typenameT,
typenameCharType,
size_tN>
1236 template<
typenameT,
typenameCharType,
size_tN>
1241 template<
typenameT,
typenameCharType,
size_tN>
1246 #if RAPIDJSON_HAS_STDSTRING 1247 template<
typenameT,
typenameCharType,
size_tN>
1248 typenameT::ValueType&
SetValueByPointer(
T& root,
constCharType(&
source)[
N],
conststd::basic_string<typename T::Ch>&
value,
typenameT::AllocatorType&
a) {
1249 returnGenericPointer<typename T::ValueType>(
source,
N- 1).Set(root,
value,
a);
1253 template<
typenameT,
typenameCharType,
size_tN,
typenameT2>
1254 RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (
typenameT::ValueType&))
1256 returnGenericPointer<typename T::ValueType>(
source,
N- 1).Set(root,
value,
a);
1261 template<
typenameDocumentType>
1266 template<
typenameDocumentType>
1271 template<
typenameDocumentType>
1276 #if RAPIDJSON_HAS_STDSTRING 1277 template<
typenameDocumentType>
1278 typenameDocumentType::ValueType&
SetValueByPointer(DocumentType& document,
constGenericPointer<typename DocumentType::ValueType>&
pointer,
conststd::basic_string<typename DocumentType::Ch>&
value) {
1283 template<
typenameDocumentType,
typenameT2>
1284 RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (
typenameDocumentType::ValueType&))
1289 template<
typenameDocumentType,
typenameCharType,
size_tN>
1294 template<
typenameDocumentType,
typenameCharType,
size_tN>
1299 template<
typenameDocumentType,
typenameCharType,
size_tN>
1304 #if RAPIDJSON_HAS_STDSTRING 1305 template<
typenameDocumentType,
typenameCharType,
size_tN>
1306 typenameDocumentType::ValueType&
SetValueByPointer(DocumentType& document,
constCharType(&
source)[
N],
conststd::basic_string<typename DocumentType::Ch>&
value) {
1307 returnGenericPointer<typename DocumentType::ValueType>(
source,
N- 1).Set(document,
value);
1311 template<
typenameDocumentType,
typenameCharType,
size_tN,
typenameT2>
1312 RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T2>, internal::IsGenericValue<T2> >), (
typenameDocumentType::ValueType&))
1314 returnGenericPointer<typename DocumentType::ValueType>(
source,
N- 1).Set(document,
value);
1319 template<
typenameT>
1324 template<
typenameT,
typenameCharType,
size_tN>
1329 template<
typenameDocumentType>
1334 template<
typenameDocumentType,
typenameCharType,
size_tN>
1341 template<
typenameT>
1346 template<
typenameT,
typenameCharType,
size_tN>
Concept for allocating, resizing and freeing memory block.
A document for parsing JSON text as DOM.
Allocator & GetAllocator() const
Get the allocator of this document.
A helper stream for decoding a percent-encoded sequence into code unit.
bool valid_
Whether the parsing is valid.
const Ch * src_
Current read position.
PercentDecodeStream(const Ch *source, const Ch *end)
Constructor.
const Ch * head_
Original head of the string.
const Ch * end_
Past-the-end position.
A helper stream to encode character (UTF-8 code unit) into percent-encoded sequence.
PercentEncodeStream(OutputStream &os)
Represents a JSON Pointer. Use Pointer for UTF8 encoding and default allocator.
GenericPointer(const Ch *source, size_t length, Allocator *allocator=0)
Constructor that parses a string or URI fragment representation, with length of the source string.
ValueType & Set(ValueType &root, ValueType &value, typename ValueType::AllocatorType &allocator) const
Set a value in a subtree, with move semantics.
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) Set(ValueType &root
Set a primitive value in a subtree.
~GenericPointer()
Destructor.
PointerParseErrorCode parseErrorCode_
Parsing error code.
GenericPointer & operator=(const GenericPointer &rhs)
Assignment operator.
bool Stringify(OutputStream &os) const
Stringify to string or URI fragment representation.
size_t parseErrorOffset_
Offset in code unit when parsing fail.
ValueType & Swap(GenericDocument< EncodingType, typename ValueType::AllocatorType, stackAllocator > &document, ValueType &value) const
Swap a value with a value in a document.
Allocator * allocator_
The current allocator. It is either user-supplied or equal to ownAllocator_.
GenericPointer Append(const Ch *name, SizeType length, Allocator *allocator=0) const
Append a name token with length, and return a new Pointer.
bool NeedPercentEncode(Ch c) const
Check whether a character should be percent-encoded.
Ch * CopyFromRaw(const GenericPointer &rhs, size_t extraToken=0, size_t extraNameBufferSize=0)
Clone the content from rhs to this.
Ch * nameBuffer_
A buffer containing all names in tokens.
ValueType::EncodingType EncodingType
Encoding type from Value.
void Parse(const Ch *source, size_t length)
Parse a JSON String or its URI fragment representation into tokens.
ValueType & Swap(ValueType &root, ValueType &value, typename ValueType::AllocatorType &allocator) const
Swap a value with a value in a subtree.
ValueType & Set(ValueType &root, const Ch *value, typename ValueType::AllocatorType &allocator) const
Set a null-terminated string in a subtree.
Allocator stackAllocator RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) GetWithDefault(GenericDocument< EncodingType
GenericPointer(const Token *tokens, size_t tokenCount)
Constructor with user-supplied tokens.
GenericPointer Append(const Token &token, Allocator *allocator=0) const
Append a token and return a new Pointer.
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T >, internal::IsGenericValue< T > >),(ValueType &)) Set(GenericDocument< EncodingType
Set a primitive value in a document.
ValueType::Ch Ch
Character type from Value.
Allocator * ownAllocator_
Allocator owned by this Pointer.
GenericPointer(const Ch *source, Allocator *allocator=0)
Constructor that parses a string or URI fragment representation.
bool Erase(ValueType &root) const
Erase a value in a subtree.
ValueType & Set(GenericDocument< EncodingType, typename ValueType::AllocatorType, stackAllocator > &document, ValueType &value) const
Set a value in a document, with move semantics.
GenericPointer(const GenericPointer &rhs, Allocator *allocator=0)
Copy constructor.
GenericPointer(Allocator *allocator=0)
Default constructor.
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.
size_t tokenCount_
Number of tokens in tokens_.
Token * tokens_
A list of tokens.
ValueType & Set(GenericDocument< EncodingType, typename ValueType::AllocatorType, stackAllocator > &document, const ValueType &value) const
Set a value in a document, with copy semantics.
ValueType & Set(ValueType &root, const ValueType &value, typename ValueType::AllocatorType &allocator) const
Set a value in a subtree, with copy semantics.
ValueType & Set(GenericDocument< EncodingType, typename ValueType::AllocatorType, stackAllocator > &document, const Ch *value) const
Set a null-terminated string in a document.
bool operator==(const CEquivRange &A, const CEquivRange &B)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
#define RAPIDJSON_ASSERT(x)
Assertion.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
PointerParseErrorCode
Error code of parsing.
@ kPointerParseErrorInvalidPercentEncoding
Invalid percent encoding in URI fragment.
@ kPointerParseErrorTokenMustBeginWithSolidus
A token must begin with a '/'.
@ kPointerParseErrorInvalidEscape
Invalid escape.
@ kPointerParseErrorNone
The parse is successful.
@ kPointerParseErrorCharacterMustPercentEncode
A character must percent encoded in URI fragment.
bool operator!=(const CNCBI_IPAddr &lhs, unsigned int rhs)
const TYPE & Get(const CNamedParameterList *param)
char * u32toa(uint32_t value, char *buffer)
char * u64toa(uint64_t value, char *buffer)
RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr< internal::IsPointer< T2 >, internal::IsGenericValue< T2 > >),(typename DocumentType::ValueType &)) GetValueByPointerWithDefault(DocumentType &document
const GenericPointer< typename T::ValueType > T2 defaultValue
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
unsigned SizeType
Size type (for string lengths, array sizes, etc.)
DocumentType::ValueType & GetValueByPointerWithDefault(DocumentType &document, const CharType(&source)[N], const typename DocumentType::Ch *defaultValue)
DocumentType::ValueType & CreateValueByPointer(DocumentType &document, const CharType(&source)[N])
static const SizeType kPointerInvalidIndex
Represents an invalid index in GenericPointer::Token.
const GenericPointer< typename T::ValueType > & pointer
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
const T::ValueType * GetValueByPointer(const T &root, const CharType(&source)[N], size_t *unresolvedTokenIndex=0)
DocumentType::ValueType & SwapValueByPointer(DocumentType &document, const CharType(&source)[N], typename DocumentType::ValueType &value)
DocumentType::ValueType & SetValueByPointer(DocumentType &document, const CharType(&source)[N], const typename DocumentType::Ch *value)
bool EraseValueByPointer(T &root, const CharType(&source)[N])
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
#define RAPIDJSON_DELETE(x)
! customization point for global delete
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
A read-write string stream.
A token is the basic units of internal representation.
SizeType index
A valid array index, if it is not equal to kPointerInvalidIndex.
const Ch * name
Name of the token. It has null character at the end but it can contain null character.
SizeType length
Length of the name.
Reference to a constant string (not taking a copy)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4