mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Improved JsonObjectIterator
This commit is contained in:
@@ -4,44 +4,45 @@
|
||||
|
||||
namespace ArduinoJson
|
||||
{
|
||||
class JsonObject;
|
||||
class JsonObject;
|
||||
|
||||
class JsonObjectIterator
|
||||
{
|
||||
friend class JsonObject;
|
||||
class JsonObjectIterator
|
||||
{
|
||||
friend class JsonObject;
|
||||
|
||||
public:
|
||||
explicit JsonObjectIterator(Internals::JsonNode* node)
|
||||
: _objectKeyValue(node)
|
||||
{
|
||||
}
|
||||
public:
|
||||
explicit JsonObjectIterator(Internals::JsonNode* node)
|
||||
: _objectKeyValue(node)
|
||||
{
|
||||
}
|
||||
|
||||
void operator++()
|
||||
{
|
||||
++_objectKeyValue;
|
||||
}
|
||||
JsonObjectIterator& operator++()
|
||||
{
|
||||
_objectKeyValue = JsonObjectKeyValue(_objectKeyValue.next());
|
||||
return *this;
|
||||
}
|
||||
|
||||
JsonObjectKeyValue operator*() const
|
||||
{
|
||||
return _objectKeyValue;
|
||||
}
|
||||
JsonObjectKeyValue operator*() const
|
||||
{
|
||||
return _objectKeyValue;
|
||||
}
|
||||
|
||||
JsonObjectKeyValue* operator->()
|
||||
{
|
||||
return &_objectKeyValue;
|
||||
}
|
||||
{
|
||||
return &_objectKeyValue;
|
||||
}
|
||||
|
||||
bool operator==(const JsonObjectIterator& other) const
|
||||
{
|
||||
return _objectKeyValue == other._objectKeyValue;
|
||||
}
|
||||
bool operator==(const JsonObjectIterator& other) const
|
||||
{
|
||||
return _objectKeyValue == other._objectKeyValue;
|
||||
}
|
||||
|
||||
bool operator!=(const JsonObjectIterator& other) const
|
||||
{
|
||||
return _objectKeyValue != other._objectKeyValue;
|
||||
}
|
||||
bool operator!=(const JsonObjectIterator& other) const
|
||||
{
|
||||
return _objectKeyValue != other._objectKeyValue;
|
||||
}
|
||||
|
||||
private:
|
||||
JsonObjectKeyValue _objectKeyValue;
|
||||
};
|
||||
private:
|
||||
JsonObjectKeyValue _objectKeyValue;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user