mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
41 lines
802 B
C++
41 lines
802 B
C++
// Copyright Benoit Blanchon 2014
|
|
// MIT License
|
|
//
|
|
// Arduino JSON library
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
|
|
#pragma once
|
|
|
|
#include "ArduinoJson/JsonValue.hpp"
|
|
|
|
namespace ArduinoJson {
|
|
|
|
class JsonArray;
|
|
|
|
class JsonArrayIterator {
|
|
friend class JsonArray;
|
|
|
|
public:
|
|
explicit JsonArrayIterator(Internals::JsonNode *node) : _value(node) {}
|
|
|
|
JsonValue operator*() const { return _value; }
|
|
JsonValue *operator->() { return &_value; }
|
|
|
|
bool operator==(const JsonArrayIterator &other) const {
|
|
return _value._node == other._value._node;
|
|
}
|
|
|
|
bool operator!=(const JsonArrayIterator &other) const {
|
|
return _value._node != other._value._node;
|
|
}
|
|
|
|
JsonArrayIterator &operator++() {
|
|
_value._node = _value._node->next;
|
|
return *this;
|
|
}
|
|
|
|
private:
|
|
JsonValue _value;
|
|
};
|
|
}
|