Files
ArduinoJson/JsonGenerator/IndentedPrintDecorator.h

30 lines
419 B
C
Raw Normal View History

#pragma once
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
#pragma once
#include "Print.h"
class IndentedPrintDecorator : public Print
{
public:
IndentedPrintDecorator(Print& p)
2014-08-25 09:56:51 +02:00
: indent(0), sink(p), emptyBlock(false)
{
}
virtual size_t write(uint8_t);
private:
2014-08-25 09:52:42 +02:00
int indent;
2014-08-25 09:56:51 +02:00
bool emptyBlock;
2014-08-25 09:17:32 +02:00
Print& sink;
2014-08-25 09:52:42 +02:00
size_t writeln();
};