Changed JsonSink to match Arduino's Print class

This commit is contained in:
Benoît Blanchon
2014-07-01 13:15:50 +02:00
parent 69d682ce81
commit a57220debc
9 changed files with 77 additions and 91 deletions

View File

@ -16,23 +16,8 @@ public:
buffer[0] = 0;
}
virtual void append(char c);
virtual void append(const char* s);
virtual bool hasRoomFor(int n)
{
return capacity - length >= n;
}
virtual void reserveRoom(int n)
{
capacity -= n;
}
virtual void releaseRoom(int n)
{
capacity += n;
}
virtual size_t append(char c);
size_t append(const char* c);
private:
char* buffer;