Files
ArduinoJson/include/ArduinoJson/JsonArrayIterator.hpp

29 lines
572 B
C++
Raw Normal View History

2014-10-22 17:59:59 +02:00
#pragma once
#include "ArduinoJson/JsonValue.hpp"
2014-10-23 19:54:00 +02:00
namespace ArduinoJson {
class JsonArray;
class JsonArrayIterator {
friend class JsonArray;
public:
2014-10-23 19:54:00 +02:00
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:
2014-10-23 19:54:00 +02:00
Internals::JsonNode *_node;
};
2014-10-22 17:59:59 +02:00
}