Files
ArduinoJson/JsonGenerator/IndentedPrintDecorator.h

33 lines
485 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)
: indent(0), sink(p)
{
previousChar = 0;
isInAString = false;
}
virtual size_t write(uint8_t);
private:
2014-08-25 09:52:42 +02:00
int indent;
uint8_t previousChar;
2014-08-25 09:17:32 +02:00
Print& sink;
bool isInAString;
2014-08-25 09:52:42 +02:00
size_t writeln();
};