mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01:00
42 lines
600 B
C++
42 lines
600 B
C++
#pragma once
|
|
|
|
#include "ArduinoJson/JsonValue.hpp"
|
|
|
|
namespace ArduinoJson
|
|
{
|
|
class JsonArray;
|
|
|
|
class JsonArrayIterator
|
|
{
|
|
friend class JsonArray;
|
|
|
|
public:
|
|
explicit JsonArrayIterator(Internals::JsonNode* node)
|
|
: _node(node)
|
|
{
|
|
}
|
|
|
|
void operator++()
|
|
{
|
|
_node = _node->next;
|
|
}
|
|
|
|
JsonValue operator*() const
|
|
{
|
|
return JsonValue(_node);
|
|
}
|
|
|
|
bool operator==(const JsonArrayIterator& other) const
|
|
{
|
|
return _node == other._node;
|
|
}
|
|
|
|
bool operator!=(const JsonArrayIterator& other) const
|
|
{
|
|
return _node != other._node;
|
|
}
|
|
|
|
private:
|
|
Internals::JsonNode* _node;
|
|
};
|
|
} |