Files
thirdparty-ArduinoJson/include/ArduinoJson/Internals/JsonObjectIterator.hpp
2014-10-26 21:18:09 +01:00

37 lines
725 B
C++

// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#pragma once
namespace ArduinoJson {
namespace Internals {
class JsonObjectIterator {
public:
explicit JsonObjectIterator(Internals::JsonObjectNode *node) : _node(node) {}
JsonPair &operator*() const { return _node->pair; }
JsonPair *operator->() { return &_node->pair; }
bool operator==(const JsonObjectIterator &other) const {
return _node == other._node;
}
bool operator!=(const JsonObjectIterator &other) const {
return _node != other._node;
}
JsonObjectIterator &operator++() {
_node = _node->next;
return *this;
}
private:
JsonObjectNode *_node;
};
}
}