Files
thirdparty-ArduinoJson/include/ArduinoJson/Internals/JsonObjectNode.hpp
2014-10-28 16:29:55 +01:00

31 lines
597 B
C++

// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#pragma once
#include "JsonValueImpl.hpp"
#include "../JsonBuffer.hpp"
namespace ArduinoJson {
namespace Internals {
class JsonObjectNode {
public:
static JsonObjectNode* createFrom(JsonBuffer* buffer, const char* key) {
void* ptr = buffer->alloc(sizeof(JsonObjectNode));
return ptr ? new (ptr) JsonObjectNode(key) : NULL;
}
const char* const key;
JsonValueImpl value;
JsonObjectNode* next;
private:
JsonObjectNode(const char* k) : key(k) {}
};
}
}