|
|
@@ -310,9 +310,28 @@ class VariantRef : public VariantRefBase<VariantData>,
|
|
|
template <typename TString>
|
|
|
FORCE_INLINE VariantRef getOrAddMember(const TString &) const;
|
|
|
|
|
|
+ FORCE_INLINE void remove(size_t index) const {
|
|
|
+ if (_data) _data->remove(index);
|
|
|
+ }
|
|
|
+ // remove(char*) const
|
|
|
+ // remove(const char*) const
|
|
|
+ // remove(const __FlashStringHelper*) const
|
|
|
+ template <typename TChar>
|
|
|
+ FORCE_INLINE typename enable_if<IsString<TChar *>::value>::type remove(
|
|
|
+ TChar *key) const {
|
|
|
+ if (_data) _data->remove(adaptString(key));
|
|
|
+ }
|
|
|
+ // remove(const std::string&) const
|
|
|
+ // remove(const String&) const
|
|
|
+ template <typename TString>
|
|
|
+ FORCE_INLINE typename enable_if<IsString<TString>::value>::type remove(
|
|
|
+ const TString &key) const {
|
|
|
+ if (_data) _data->remove(adaptString(key));
|
|
|
+ }
|
|
|
+
|
|
|
private:
|
|
|
MemoryPool *_pool;
|
|
|
-};
|
|
|
+}; // namespace ARDUINOJSON_NAMESPACE
|
|
|
|
|
|
class VariantConstRef : public VariantRefBase<const VariantData>,
|
|
|
public VariantOperators<VariantConstRef>,
|