Lines Matching +full:- +full:o

34 RAPIDJSON_DIAG_OFF(switch-enum)
35 RAPIDJSON_DIAG_OFF(c++98-compat)
113 //! Name-value pair in a JSON object value.
169 …\tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding …
180 pointer-based implementation, if your platform doesn't provide
199 //! Non-constant iterator type
226 \param it (Non-const) iterator to copy from
229 that is "less const". Especially, creating a non-constant iterator
231 \li const -> non-const (not ok)
232 \li const -> const (ok)
233 \li non-const -> const (ok)
234 \li non-const -> non-const (ok)
237 constructor effectively defines a regular copy-constructor.
246 Iterator& operator--(){ --ptr_; return *this; }
248 Iterator operator--(int){ Iterator old(*this); --ptr_; return old; }
254 Iterator operator-(DifferenceType n) const { return Iterator(ptr_-n); }
257 Iterator& operator-=(DifferenceType n) { ptr_-=n; return *this; }
277 Pointer operator->() const { return ptr_; }
282 DifferenceType operator-(ConstIterator that) const { return ptr_-that.ptr_; }
293 // class-based member iterator implementation disabled, use plain pointers
298 //! non-const GenericMemberIterator
350 #ifndef __clang__ // -Wdocumentation
367 non-const character arrays to be created via this constructor.
368 By this, e.g. function-scope arrays used to be filled via
376 : s(str), length(N-1) {} in GenericStringRef()
379 #ifndef __clang__ // -Wdocumentation
392 non-const character arrays to be created via this constructor.
393 By this, e.g. function-scope arrays used to be filled via
403 #ifndef __clang__ // -Wdocumentation
428 /// Empty string - used when passing in a NULL pointer
431 //! Disallow construction from non-const array
434 //! Copy assignment operator not permitted - immutable type
664 …\tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding …
670 //! Name-value pair in an object.
736 \param rhs Value to copy from (read-only)
738 … \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)
786 // safe-guard against failing SFINAE
842 //! Constructor for copy-string (i.e. do make a copy of string)
845 //! Constructor for copy-string (i.e. do make a copy of string)
849 //! Constructor for copy-string from a string object (i.e. do make a copy of string)
858 \note \c Array is always pass-by-value.
868 \param o An object obtained by \c GetObject().
869 \note \c Object is always pass-by-value.
872 GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
873 o.value_.data_ = Data();
874 o.value_.data_.f.flags = kObjectFlag;
878 /*! Need to destruct elements of array, members of object, or copy-string.
890 v->~GenericValue();
924 // could be used after free if it's an sub-Value of "this",
928 this->~GenericValue();
970 //! Deep-copy assignment from Value
973 \param rhs Value to copy from (read-only)
975 … \param copyConstStrings Force copying of constant strings (e.g. referencing an in-situ buffer)
980 this->~GenericValue();
998 //! free-standing swap function helper
1017 //!@name Equal-to and not-equal-to operators
1019 //! Equal-to operator
1031 case kObjectType: // Warning: O(n^2) inner-loop
1032 if (data_.o.size != rhs.data_.o.size)
1035 … typename RhsType::ConstMemberIterator rhsMemberItr = rhs.FindMember(lhsMemberItr->name);
1036 if (rhsMemberItr == rhs.MemberEnd() || lhsMemberItr->value != rhsMemberItr->value)
1056 return a >= b && a <= b; // Prevent -Wfloat-equal
1066 //! Equal-to operator with const C-string pointer
1070 //! Equal-to operator with string object
1076 //! Equal-to operator with primitive types
1082 //! Not-equal-to operator
1088 //! Not-equal-to operator with const C-string pointer
1091 //! Not-equal-to operator with arbitrary types
1096 //! Equal-to operator with arbitrary types (symmetric version)
1101 //! Not-Equal-to operator with arbitrary types (symmetric version)
1151 return d >= -3.4028234e38 && d <= 3.4028234e38;
1157 if (a < static_cast<double>(-(std::numeric_limits<float>::max)())
1161 return a >= b && a <= b; // Prevent -Wfloat-equal
1169 GenericValue& SetNull() { this->~GenericValue(); new (this) GenericValue(); return *this; }
1179 … GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; }
1188 …GenericValue& SetObject() { this->~GenericValue(); new (this) GenericValue(kObjectType); return *t…
1191 SizeType MemberCount() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size; }
1194 SizeType MemberCapacity() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.capacity; }
1197 bool ObjectEmpty() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.size == 0; }
1229 return member->value;
1234 // Use thread-local storage to prevent races between threads.
1235 // Use static buffer and placement-new to prevent destruction, with
1245 // This will generate -Wexit-time-destructors in clang, but that's
1246 // better than having under-alignment.
1251 // thread-locality.
1269 //! Const \em past-the-end member iterator
1271 … { RAPIDJSON_ASSERT(IsObject()); return ConstMemberIterator(GetMembersPointer() + data_.o.size); }
1275 //! \em Past-the-end member iterator
1277 … { RAPIDJSON_ASSERT(IsObject()); return MemberIterator(GetMembersPointer() + data_.o.size); }
1377 //! Add a member (name-value pair) to the object.
1394 //! Add a constant string value as member (name-value pair) to the object.
1409 //! Add a string object as member (name-value pair) to the object.
1424 //! Add any primitive value as member (name-value pair) to the object.
1465 //! Add a member (name-value pair) to the object.
1480 //! Add a constant string value as member (name-value pair) to the object.
1494 //! Add any primitive value as member (name-value pair) to the object.
1565 RAPIDJSON_ASSERT(data_.o.size > 0);
1595 RAPIDJSON_ASSERT(data_.o.size > 0);
1640 …GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *thi…
1659 v->~GenericValue();
1665 \param index Zero-based index of element.
1678 //! \em Past-the-end element iterator
1684 //! Constant \em past-the-end element iterator
1771 GetElementsPointer()[--data_.a.size].~GenericValue();
1801 ValueIterator pos = Begin() + (first - Begin());
1803 itr->~GenericValue();
1804 …std::memmove(static_cast<void*>(pos), last, static_cast<size_t>(End() - last) * sizeof(GenericValu…
1805 data_.a.size -= static_cast<SizeType>(last - first);
1823 …/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to…
1828 if ((data_.f.flags & kIntFlag) != 0) return data_.n.i.i; // int -> double
1829 … if ((data_.f.flags & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double
1830 …) != 0) return static_cast<double>(data_.n.i64); // int64_t -> double (may lose pr…
1831 …& kUint64Flag) != 0); return static_cast<double>(data_.n.u64); // uint64_t -> double (may lose pr…
1835 …/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to …
1841 …GenericValue& SetInt(int i) { this->~GenericValue(); new (this) GenericValue(i); re…
1842 …GenericValue& SetUint(unsigned u) { this->~GenericValue(); new (this) GenericValue(u); re…
1843 …GenericValue& SetInt64(int64_t i64) { this->~GenericValue(); new (this) GenericValue(i64); re…
1844 …GenericValue& SetUint64(uint64_t u64) { this->~GenericValue(); new (this) GenericValue(u64); re…
1845 …GenericValue& SetDouble(double d) { this->~GenericValue(); new (this) GenericValue(d); re…
1846 …GenericValue& SetFloat(float f) { this->~GenericValue(); new (this) GenericValue(static_ca…
1875 … GenericValue& SetString(StringRefType s) { this->~GenericValue(); SetStringRaw(s); return *this; }
1901 …GenericValue& SetString(StringRefType s, Allocator& allocator) { this->~GenericValue(); SetStringR…
1958 … RAPIDJSON_ASSERT(m->name.IsString()); // User may change the type of name by MemberIterator.
1959 …if (RAPIDJSON_UNLIKELY(!handler.Key(m->name.GetString(), m->name.GetStringLength(), (m->name.data_…
1961 if (RAPIDJSON_UNLIKELY(!m->value.Accept(handler)))
1964 return handler.EndObject(data_.o.size);
1970 if (RAPIDJSON_UNLIKELY(!v->Accept(handler)))
2028 char payload[sizeof(SizeType) * 2 + 6]; // 2 x SizeType + lower 48-bit pointer
2041 }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
2043 // implementation detail: ShortString can represent zero-terminated strings up to MaxSize chars
2045 // string in the last character str[LenPos] by storing "MaxSize - length" there. If the string
2048 // "MaxSize - str[LenPos]".
2049 // This allows to store 13-chars strings in 32-bit mode, 21-chars strings in 64-bit mode,
2050 … // 13-chars strings for RAPIDJSON_48BITPOINTER_OPTIMIZATION=1 inline (for `UTF8`-encoded strings).
2052 …enum { MaxChars = sizeof(static_cast<Flag*>(0)->payload) / sizeof(Ch), MaxSize = MaxChars - 1, Len…
2056 inline void SetLength(SizeType len) { str[LenPos] = static_cast<Ch>(MaxSize - len); }
2057 … inline SizeType GetLength() const { return static_cast<SizeType>(MaxSize - str[LenPos]); }
2058 … }; // at most as many bytes as "String" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
2090 }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
2096 }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode
2102 ObjectData o;
2105 …}; // 16 bytes in 32-bit mode, 24 bytes in 64-bit mode, 16 bytes in 64-bit with RAPIDJSON_48BITPO…
2118 …EINLINE Member* GetMembersPointer() const { return RAPIDJSON_GETPOINTER(Member, data_.o.members); }
2119 …tMembersPointer(Member* members) { return RAPIDJSON_SETPOINTER(Member, data_.o.members, members); }
2145 // (where <> stands for the RAPIDJSON_ALIGN-ment, if needed)
2175 return *reinterpret_cast<Map**>(reinterpret_cast<uintptr_t>(members) -
2176 RAPIDJSON_ALIGN(sizeof(SizeType)) -
2199 size_t count = (*oldMap)->size();
2205 while (count--) {
2218 ObjectData& o = data_.o;
2219 if (newCapacity > o.capacity) {
2223 RAPIDJSON_SETPOINTER(Member, o.members, GetMapMembers(newMap));
2224 o.capacity = newCapacity;
2232 MapIterator mit = map->find(reinterpret_cast<const Data&>(name.data_));
2233 if (mit != map->end()) {
2234 return MemberIterator(&members[mit->second]);
2244 for (SizeType i = 0; i < data_.o.size; i++) {
2245 map->erase(DropMapIterator(mit[i]));
2248 data_.o.size = 0;
2254 GetMap(members)->~Map();
2255 for (SizeType i = 0; i < data_.o.size; i++) {
2273 ObjectData& o = data_.o;
2274 if (newCapacity > o.capacity) {
2275 … Member* newMembers = Realloc<Member>(allocator, GetMembersPointer(), o.capacity, newCapacity);
2276 RAPIDJSON_SETPOINTER(Member, o.members, newMembers);
2277 o.capacity = newCapacity;
2285 if (name.StringEqual(member->name))
2292 m->~Member();
2293 data_.o.size = 0;
2298 m->~Member();
2305 ObjectData& o = data_.o;
2306 if (o.size >= o.capacity)
2307 …DoReserveMembers(o.capacity ? (o.capacity + (o.capacity + 1) / 2) : kDefaultObjectCapacity, alloca…
2309 Member* m = members + o.size;
2310 m->name.RawAssign(name);
2311 m->value.RawAssign(value);
2315 new (&mit[o.size]) MapIterator(map->insert(MapPair(m->name.data_, o.size)));
2317 ++o.size;
2321 ObjectData& o = data_.o;
2326 SizeType mpos = static_cast<SizeType>(&*m - members);
2327 map->erase(DropMapIterator(mit[mpos]));
2329 MemberIterator last(members + (o.size - 1));
2330 if (o.size > 1 && m != last) {
2332 new (&mit[mpos]) MapIterator(DropMapIterator(mit[&*last - members]));
2333 mit[mpos]->second = mpos;
2338 m->~Member(); // Only one left, just destroy
2340 --o.size;
2345 ObjectData& o = data_.o;
2347 pos = beg + (first - beg),
2355 map->erase(DropMapIterator(mit[itr - beg]));
2357 itr->~Member();
2362 MemberIterator next = pos + (last - first);
2365 SizeType mpos = static_cast<SizeType>(itr - beg);
2366 new (&mit[mpos]) MapIterator(DropMapIterator(mit[next - beg]));
2367 mit[mpos]->second = mpos;
2372 static_cast<size_t>(end - last) * sizeof(Member));
2374 o.size -= static_cast<SizeType>(last - first);
2383 SizeType count = rhs.data_.o.size;
2394 new (&mit[i]) MapIterator(map->insert(MapPair(lm[i].name.data_, i)));
2397 data_.o.size = data_.o.capacity = count;
2425 new (&mit[i]) MapIterator(map->insert(MapPair(m[i].name.data_, i)));
2431 data_.o.size = data_.o.capacity = count;
2602 //! free-standing swap function helper
2676 //!@name Parse in-place from mutable string
2681 \param str Mutable zero-terminated string to be parsed.
2691 /*! \param str Mutable zero-terminated string to be parsed.
2699 //!@name Parse from read-only string
2702 //! Parse JSON text from a read-only string (with Encoding conversion)
2705 \param str Read-only zero-terminated string to be parsed.
2714 //! Parse JSON text from a read-only string
2716 \param str Read-only zero-terminated string to be parsed.
2723 //! Parse JSON text from a read-only string (with \ref kParseDefaultFlags)
2724 /*! \param str Read-only zero-terminated string to be parsed.
2780 #ifndef __clang // -Wdocumentation
2850 stack_.template Top<ValueType>()->SetObjectRaw(members, memberCount, GetAllocator());
2858 stack_.template Top<ValueType>()->SetArrayRaw(elements, elementCount, GetAllocator());
2871 (stack_.template Pop<ValueType>(1))->~ValueType();
2895 …In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11…
2904 typedef ValueType* ValueIterator; // This may be const or non-const iterator
2949 …In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11…
2958 …ngType, typename ValueT::AllocatorType> MemberIterator; // This may be const or non-const iterator