Renamed and moved internal files

This commit is contained in:
Benoit Blanchon
2018-11-30 17:53:54 +01:00
parent 04e8acd844
commit aaf0d5c3c5
52 changed files with 1098 additions and 1119 deletions

View File

@ -0,0 +1,53 @@
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License
#pragma once
#include "../Variant/VariantRef.hpp"
#include "Key.hpp"
namespace ARDUINOJSON_NAMESPACE {
// A key value pair for ObjectData.
class Pair {
public:
Pair(MemoryPool* memoryPool, VariantSlot* slot) : _key(slot) {
if (slot) {
_value = VariantRef(memoryPool, &slot->value);
}
}
Key key() const {
return _key;
}
VariantRef value() const {
return _value;
}
private:
Key _key;
VariantRef _value;
};
class PairConst {
public:
PairConst(const VariantSlot* slot) : _key(slot) {
if (slot) {
_value = VariantConstRef(&slot->value);
}
}
Key key() const {
return _key;
}
VariantConstRef value() const {
return _value;
}
private:
Key _key;
VariantConstRef _value;
};
} // namespace ARDUINOJSON_NAMESPACE