Formated code with clang-format

This commit is contained in:
Benoit Blanchon
2014-10-23 19:54:00 +02:00
parent 888fdc1d54
commit 9175046f35
52 changed files with 2002 additions and 2638 deletions

View File

@@ -2,53 +2,38 @@
#include "../Arduino/Print.hpp"
namespace ArduinoJson
{
namespace Internals
{
class JsonWriter
{
public:
explicit JsonWriter(Print* sink)
: _sink(sink), _length(0)
{
}
namespace ArduinoJson {
namespace Internals {
class JsonWriter {
public:
explicit JsonWriter(Print *sink) : _sink(sink), _length(0) {}
size_t bytesWritten()
{
return _length;
}
size_t bytesWritten() { return _length; }
virtual void beginArray() = 0;
virtual void beginArray() = 0;
virtual void endArray() = 0;
virtual void endArray() = 0;
virtual void beginObject() = 0;
virtual void beginObject() = 0;
virtual void endObject() = 0;
virtual void endObject() = 0;
void writeString(const char* value);
void writeInteger(long value);
void writeBoolean(bool value);
void writeDouble(double value, int decimals);
void writeString(const char *value);
void writeInteger(long value);
void writeBoolean(bool value);
void writeDouble(double value, int decimals);
virtual void writeColon() = 0;
virtual void writeColon() = 0;
virtual void writeComma() = 0;
virtual void writeComma() = 0;
void writeEmptyArray()
{
_length += _sink->print("[]");
}
void writeEmptyArray() { _length += _sink->print("[]"); }
void writeEmptyObject()
{
_length += _sink->print("{}");
}
void writeEmptyObject() { _length += _sink->print("{}"); }
protected:
Print* _sink;
size_t _length;
};
}
protected:
Print *_sink;
size_t _length;
};
}
}