Added namespace ArduinoJson::Internals for private types

This commit is contained in:
Benoît Blanchon
2014-07-07 14:05:41 +02:00
parent 99521cc718
commit 6c1ab912ff
11 changed files with 34 additions and 26 deletions

View File

@ -5,6 +5,7 @@
#include "EscapedString.h"
using namespace ArduinoJson::Internals;
size_t EscapedString::printTo(Print& p) const
{

View File

@ -7,6 +7,10 @@
#include "Print.h"
namespace ArduinoJson
{
namespace Internals
{
class EscapedString
{
public:
@ -21,4 +25,5 @@ public:
private:
const char* rawString;
};
}
}

View File

@ -45,7 +45,7 @@ namespace ArduinoJson
using JsonObjectBase::printTo;
private:
JsonValue items[N];
Internals::JsonValue items[N];
int itemCount;
virtual size_t printTo(Print& p) const

View File

@ -53,8 +53,8 @@ namespace ArduinoJson
struct KeyValuePair
{
EscapedString key;
JsonValue value;
Internals::EscapedString key;
Internals::JsonValue value;
};
KeyValuePair items[N];

View File

@ -19,6 +19,8 @@ namespace ArduinoJson
size_t printTo(char* buffer, size_t bufferSize)
{
using namespace Internals;
StringBuilder sb(buffer, bufferSize);
return printTo(sb);
}

View File

@ -6,7 +6,7 @@
#include "EscapedString.h"
#include "JsonValue.h"
using namespace ArduinoJson::Generator;
using namespace ArduinoJson::Internals;
size_t JsonValue::printBoolTo(const Content& c, Print& p)
{

View File

@ -11,7 +11,7 @@
namespace ArduinoJson
{
namespace Generator
namespace Internals
{
class JsonValue
{

View File

@ -5,7 +5,7 @@
#include "StringBuilder.h"
using namespace ArduinoJson::Generator;
using namespace ArduinoJson::Internals;
size_t StringBuilder::write(uint8_t c)
{

View File

@ -9,7 +9,7 @@
namespace ArduinoJson
{
namespace Generator
namespace Internals
{
class StringBuilder : public Print
{

View File

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

View File

@ -2,7 +2,7 @@
#include "StringBuilder.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace ArduinoJson::Generator;
using namespace ArduinoJson::Internals;
namespace JsonGeneratorTests
{