mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 20:12:16 +02:00
44 lines
998 B
C++
44 lines
998 B
C++
// Copyright Benoit Blanchon 2014
|
|
// MIT License
|
|
//
|
|
// Arduino JSON library
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
|
|
#pragma once
|
|
|
|
#include "../ForwardDeclarations.hpp"
|
|
#include "JsonArrayIterator.hpp"
|
|
#include "JsonArrayConstIterator.hpp"
|
|
|
|
namespace ArduinoJson {
|
|
namespace Internals {
|
|
class JsonArrayImpl {
|
|
public:
|
|
typedef JsonValueImpl *value_type;
|
|
typedef JsonArrayIterator iterator;
|
|
typedef JsonArrayConstIterator const_iterator;
|
|
|
|
JsonArrayImpl(JsonBuffer *buffer) : _buffer(buffer) {}
|
|
|
|
value_type operator[](int index) const;
|
|
|
|
value_type add();
|
|
|
|
JsonArrayImpl *createNestedArray();
|
|
JsonObjectImpl *createNestedObject();
|
|
|
|
void writeTo(JsonWriter &writer) const;
|
|
|
|
iterator begin() { return iterator(_firstChild); }
|
|
iterator end() { return iterator(0); }
|
|
|
|
const_iterator begin() const { return const_iterator(_firstChild); }
|
|
const_iterator end() const { return const_iterator(0); }
|
|
|
|
private:
|
|
JsonBuffer *_buffer;
|
|
Internals::JsonArrayNode *_firstChild;
|
|
};
|
|
}
|
|
}
|