Added namespace

This commit is contained in:
Benoît Blanchon
2014-07-03 13:54:27 +02:00
parent 538b15b400
commit bae5c36f41
12 changed files with 248 additions and 212 deletions

View File

@ -7,20 +7,25 @@
#include "Print.h"
class StringBuilder : public Print
namespace ArduinoJson
{
public:
StringBuilder(char* buf, int size)
: buffer(buf), capacity(size-1), length(0)
namespace Generator
{
buffer[0] = 0;
class StringBuilder : public Print
{
public:
StringBuilder(char* buf, int size)
: buffer(buf), capacity(size - 1), length(0)
{
buffer[0] = 0;
}
virtual size_t write(uint8_t c);
private:
char* buffer;
int capacity;
int length;
};
}
virtual size_t write(uint8_t c);
private:
char* buffer;
int capacity;
int length;
};
}