Renamed IndentedPrintDecorator into IndentedPrint

This commit is contained in:
Benoit Blanchon committed 2014-08-26 09:56:05 +02:00
1 parent b5002265cf
commit 23e61cc0f7
9 files changed
+19 -19

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
#pragma once
#include "Print.h"
class IndentedPrint : public Print
{
public:
IndentedPrint(Print& p)
: sink(p)
{
level = 0;
isNewLine = true;
}
virtual size_t write(uint8_t);
void indent();
void unindent();
private:
Print& sink;
uint8_t level : 7;
bool isNewLine : 1;
size_t writeTabs();
};