mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Renamed all .h files into .hpp (so that Sublime Text selects C++ syntax)
This commit is contained in:
54
include/ArduinoJson/JsonContainer.hpp
Normal file
54
include/ArduinoJson/JsonContainer.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "Arduino/Printable.hpp"
|
||||
#include "Internals/JsonNodeIterator.hpp"
|
||||
#include "Internals/JsonNode.hpp"
|
||||
#include "Internals/IndentedPrint.hpp"
|
||||
#include "Internals/JsonNodeWrapper.hpp"
|
||||
|
||||
namespace ArduinoJson
|
||||
{
|
||||
class JsonArray;
|
||||
class JsonObject;
|
||||
class JsonValue;
|
||||
|
||||
class JsonContainer : public Printable, public Internals::JsonNodeWrapper
|
||||
{
|
||||
friend class JsonArray;
|
||||
|
||||
public:
|
||||
JsonContainer() {}
|
||||
|
||||
explicit JsonContainer(Internals::JsonNode* node)
|
||||
: JsonNodeWrapper(node)
|
||||
{
|
||||
}
|
||||
|
||||
size_t size() const;
|
||||
|
||||
bool operator==(JsonContainer const& other) const;
|
||||
|
||||
size_t printTo(char* buffer, size_t bufferSize) const;
|
||||
virtual size_t printTo(Print& print) const;
|
||||
|
||||
size_t prettyPrintTo(char* buffer, size_t bufferSize) const;
|
||||
size_t prettyPrintTo(ArduinoJson::Internals::IndentedPrint& print) const;
|
||||
size_t prettyPrintTo(Print& print) const;
|
||||
|
||||
protected:
|
||||
|
||||
Internals::JsonNodeIterator beginChildren() const
|
||||
{
|
||||
return Internals::JsonNodeIterator(_node ? _node->getContainerChild() : 0);
|
||||
}
|
||||
|
||||
Internals::JsonNodeIterator endChildren() const
|
||||
{
|
||||
return Internals::JsonNodeIterator(0);
|
||||
}
|
||||
|
||||
void addChild(Internals::JsonNode*);
|
||||
void removeChild(Internals::JsonNode*);
|
||||
Internals::JsonNode* createNode();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user