Commit Graph

760 Commits

Author SHA1 Message Date
Benoit Blanchon
781e449e78 CollectionData::releaseSlot() takes an iterator 2023-07-20 17:53:52 +02:00
Benoit Blanchon
d4af8cffa7 Store current and next slot id in CollectionIterator 2023-07-20 17:53:52 +02:00
Benoit Blanchon
0f3c73a211 Remove VariantPool::capacity() 2023-07-18 09:08:55 +02:00
Benoit Blanchon
0f319e7ca4 Remove capacity from JsonDocument's constructor 2023-07-18 09:08:55 +02:00
Benoit Blanchon
42b2840009 Create more memory pools as needed (resolves #1074) 2023-07-18 09:08:55 +02:00
Benoit Blanchon
c4e5051a7a Store index of slot in the pool instead of a pointer or a distance 2023-07-17 11:20:46 +02:00
Benoit Blanchon
8aec448adf Add missing declaration of offsetof() 2023-07-17 11:20:46 +02:00
Benoit Blanchon
9538bc32af Implement the object copy at the JsonObject level 2023-07-17 11:20:46 +02:00
Benoit Blanchon
b2aa0029b9 Implement array copy at the JsonArray level 2023-07-17 11:20:46 +02:00
Benoit Blanchon
57e9134540 Implement variant copy at the JsonVariant level 2023-07-17 11:20:46 +02:00
Benoit Blanchon
fb4cb96c6c Move JsonArray and JsonObject converters to ConverterImpl.hpp 2023-07-17 11:20:46 +02:00
Benoit Blanchon
5e3f84c718 Merge all visitXxx() into one overloaded visit() function 2023-07-17 11:20:46 +02:00
Benoit Blanchon
64922343e6 visitNull() takes a nullptr_t 2023-07-17 11:20:46 +02:00
Benoit Blanchon
1d07abddcd Add nullptr_t 2023-07-17 11:20:46 +02:00
Benoit Blanchon
21bf4973de visitRawString() takes a RawString 2023-07-17 11:20:46 +02:00
Benoit Blanchon
da845ae01d visitString() takes a JsonString 2023-07-17 11:20:46 +02:00
Benoit Blanchon
5a9d3422f5 Add JsonVariantVisitor and use it for comparisons 2023-07-17 11:20:46 +02:00
Benoit Blanchon
7a9feb4d6e Rename Visitor to VariantDataVisitor 2023-07-17 11:20:46 +02:00
Benoit Blanchon
39e8b63746 Remove shallowCopy() 2023-07-17 11:20:46 +02:00
Benoit Blanchon
c37990d791 CollectionData: addSlot() returns an iterator 2023-07-17 11:20:46 +02:00
Benoit Blanchon
fac5b5a7a7 CollectionData: allocate the slot in addSlot() 2023-07-17 11:20:46 +02:00
Benoit Blanchon
5ceb5d1813 Use CollectionIterator in CollectionData::memoryUsage() 2023-07-17 11:20:46 +02:00
Benoit Blanchon
ec4c73db0b Use CollectionIterator in CollectionData::nesting() 2023-07-17 11:20:45 +02:00
Benoit Blanchon
f86b22cf4f Replace slotRelease() with CollectionData::releaseSlot() 2023-07-17 11:20:45 +02:00
Benoit Blanchon
78a74c4017 Inline slotSize() 2023-07-17 11:20:45 +02:00
Benoit Blanchon
dae0182914 Convert CollectionIterator to GoF style 2023-07-17 11:20:45 +02:00
Benoit Blanchon
0f511b873d VariantPool: store VariantSlots instead of chars 2023-07-12 15:03:56 +02:00
Benoit Blanchon
1d96826371 Add a ResourceManager* member to JsonArrayConst, JsonObjectConst, and JsonVariantConst 2023-07-12 15:03:56 +02:00
Benoit Blanchon
f6b014582f Implement object comparison out of class 2023-07-12 15:03:56 +02:00
Benoit Blanchon
555f3dd5fe Implement array comparison out of class 2023-07-12 15:03:56 +02:00
Benoit Blanchon
04973ca494 Fix ARDUINOJSON_BIN2ALPHA_0110()
Ported from 6c5fde2a55
2023-07-12 15:02:21 +02:00
Benoit Blanchon
01b9b40bd2 Include ARDUINOJSON_SLOT_OFFSET_SIZE in the namespace name
Ported from 433fb4b961
2023-07-12 15:01:28 +02:00
Benoit Blanchon
c8517ee5b6 Fix double call to size() in serializeMsgPack()
Ported from afbcc2106e
2023-07-12 12:00:23 +02:00
Benoit Blanchon
23b01a89b1 Fix double lookup in to<JsonVariant>() 2023-07-05 16:18:35 +02:00
Benoit Blanchon
688e21e75f Add CollectionIterator 2023-06-26 18:23:20 +02:00
Benoit Blanchon
d921cd6d02 Convert "variant functions" to static member functions 2023-06-26 12:33:34 +02:00
Benoit Blanchon
af8bdfbc8f Convert "collection function" to static member functions 2023-06-26 11:58:28 +02:00
Benoit Blanchon
68b1602c35 Extract ObjectData from CollectionData 2023-06-26 11:42:25 +02:00
Benoit Blanchon
7bc73d7849 Extract ArrayData from CollectionData 2023-06-26 11:18:56 +02:00
Benoit Blanchon
67bbb4c90d Manage resources in CollectionData 2023-06-26 10:07:40 +02:00
Benoit Blanchon
fffed4fba6 VariantAttorney: replace ResultOfGetData with a trailing return type 2023-06-20 18:47:45 +02:00
Benoit Blanchon
8d7bbffe10 Simplify JsonObject::operator== 2023-06-20 18:47:44 +02:00
Benoit Blanchon
488475fe16 Simplify JsonArray::operator== 2023-06-20 18:47:42 +02:00
Benoit Blanchon
ba8d102432 Swap the parameters of JsonObject's constructor 2023-06-20 18:47:40 +02:00
Benoit Blanchon
e96680eb29 Swap the parameters of JsonArray's constructor 2023-06-20 18:47:38 +02:00
Benoit Blanchon
4c0fb4eb55 Swap the parameters of JsonVariant's constructor 2023-06-20 18:47:37 +02:00
Benoit Blanchon
db2fb01795 Replace VariantPtr, VariantConstPtr, JsonPairPtr, and JsonPairConstPtr with Ptr<T> 2023-06-20 18:47:12 +02:00
Benoit Blanchon
18ae8ab7b9 Extract arrayEquals() and objectEquals() 2023-06-19 17:38:17 +02:00
Benoit Blanchon
87c96f9306 ResourceManager: rename string functions 2023-06-19 11:25:04 +02:00
Benoit Blanchon
262747b419 ResourceManager: extract the StringPool class 2023-06-19 11:15:00 +02:00