Moved JsonValue to namespace ArduinoJson::Generator

This commit is contained in:
Benoit Blanchon
2014-07-31 19:57:52 +02:00
parent 7877ee1b4c
commit 13c386c7a3
6 changed files with 11 additions and 10 deletions

View File

@ -22,7 +22,7 @@ namespace ArduinoJson
}
private:
Internals::JsonValue items[N];
JsonValue items[N];
};
}
}

View File

@ -14,7 +14,7 @@ namespace ArduinoJson
class JsonArrayBase : public JsonPrintable
{
public:
JsonArrayBase(Internals::JsonValue* items, int capacity)
JsonArrayBase(JsonValue* items, int capacity)
: items(items), capacity(capacity), count(0)
{
@ -33,7 +33,7 @@ namespace ArduinoJson
{
if (count >= capacity) return;
Internals::JsonValue& v = items[count++];
JsonValue& v = items[count++];
v.set<DIGITS>(value);
}
@ -42,7 +42,7 @@ namespace ArduinoJson
using JsonPrintable::printTo;
private:
Internals::JsonValue* items;
JsonValue* items;
int capacity, count;
};
}

View File

@ -37,7 +37,7 @@ namespace ArduinoJson
struct KeyValuePair
{
Internals::EscapedString key;
Internals::JsonValue value;
JsonValue value;
};
JsonObjectBase(KeyValuePair* items, int capacity)
@ -45,7 +45,7 @@ namespace ArduinoJson
{
}
Internals::JsonValue& getValue(const char* key);
JsonValue& getValue(const char* key);
private:
KeyValuePair* items;

View File

@ -6,7 +6,7 @@
#include "EscapedString.h"
#include "JsonValue.h"
using namespace ArduinoJson::Internals;
using namespace ArduinoJson::Generator;
JsonValue JsonValue::nullInstance;

View File

@ -11,7 +11,7 @@
namespace ArduinoJson
{
namespace Internals
namespace Generator
{
class JsonValue
{
@ -76,7 +76,7 @@ namespace ArduinoJson
bool asBool;
long asLong;
Printable* asPrintable;
EscapedString asString;
Internals::EscapedString asString;
double asDouble;
};

View File

@ -8,6 +8,7 @@
#include "JsonValue.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace ArduinoJson::Generator;
using namespace ArduinoJson::Internals;
namespace JsonGeneratorTests