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

@@ -3,50 +3,42 @@
#include "JsonArray.hpp"
#include "JsonObject.hpp"
namespace ArduinoJson
{
namespace Internals
{
class JsonParser;
}
namespace ArduinoJson {
namespace Internals {
class JsonParser;
}
class JsonBuffer
{
friend class JsonContainer;
friend class Internals::JsonNode;
friend class Internals::JsonParser;
class JsonBuffer {
friend class JsonContainer;
friend class Internals::JsonNode;
friend class Internals::JsonParser;
public:
virtual ~JsonBuffer() {};
public:
virtual ~JsonBuffer(){};
JsonArray createArray()
{
return JsonArray(createArrayNode());
}
JsonArray createArray() { return JsonArray(createArrayNode()); }
JsonObject createObject()
{
return JsonObject(createObjectNode());
}
JsonObject createObject() { return JsonObject(createObjectNode()); }
JsonValue createValue();
JsonValue createValue();
JsonArray parseArray(char* json);
JsonObject parseObject(char* json);
JsonValue parseValue(char* json); // TODO: remove
JsonArray parseArray(char *json);
JsonObject parseObject(char *json);
JsonValue parseValue(char *json); // TODO: remove
protected:
virtual void* allocateNode() = 0;
protected:
virtual void *allocateNode() = 0;
private:
Internals::JsonNode* createNode();
private:
Internals::JsonNode *createNode();
Internals::JsonNode* createArrayNode();
Internals::JsonNode* createBoolNode(bool value);
Internals::JsonNode* createDoubleNode(double value, int decimals);
Internals::JsonNode* createLongNode(long value);
Internals::JsonNode* createObjectNode();
Internals::JsonNode* createObjectKeyValueNode(const char* key, Internals::JsonNode* value);
Internals::JsonNode* createStringNode(const char* value);
};
Internals::JsonNode *createArrayNode();
Internals::JsonNode *createBoolNode(bool value);
Internals::JsonNode *createDoubleNode(double value, int decimals);
Internals::JsonNode *createLongNode(long value);
Internals::JsonNode *createObjectNode();
Internals::JsonNode *createObjectKeyValueNode(const char *key,
Internals::JsonNode *value);
Internals::JsonNode *createStringNode(const char *value);
};
}