summaryrefslogtreecommitdiff
path: root/src/components/formatters/include/formatters
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/formatters/include/formatters')
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonBase.h48
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h8
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h6
-rw-r--r--src/components/formatters/include/formatters/CSmartFactory.h18
-rw-r--r--src/components/formatters/include/formatters/formatter_json_rpc.h6
-rw-r--r--src/components/formatters/include/formatters/meta_formatter.h40
6 files changed, 63 insertions, 63 deletions
diff --git a/src/components/formatters/include/formatters/CFormatterJsonBase.h b/src/components/formatters/include/formatters/CFormatterJsonBase.h
index 66ffa0c1c5..b800ac1559 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonBase.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonBase.h
@@ -35,8 +35,8 @@
#ifndef SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONBASE_H_
#define SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONBASE_H_
-#include "smart_objects/smart_object.h"
#include "json/json.h"
+#include "smart_objects/smart_object.h"
namespace ns_smart_device_link {
namespace ns_json_handler {
@@ -44,33 +44,33 @@ namespace formatters {
namespace meta_formatter_error_code {
/**
- * @brief Error codes of MetaFormatter represented as bitmask
- **/
+ * @brief Error codes of MetaFormatter represented as bitmask
+ **/
typedef long tMetaFormatterErrorCode;
/**
- * @brief OK, no error
- */
+ * @brief OK, no error
+ */
static const tMetaFormatterErrorCode kErrorOk = 0x0;
/**
- * @brief origin smart object is not function
- */
+ * @brief origin smart object is not function
+ */
static const tMetaFormatterErrorCode kErrorObjectIsNotFunction = 0x01;
/**
- * @brief smart shema describes object which is not function
- */
+ * @brief smart shema describes object which is not function
+ */
static const tMetaFormatterErrorCode kErrorSchemaIsNotFunction = 0x02;
/**
- * @brief result smart object has invalid type (SmartType_Invalid)
- * before passing to MetaFormatter, i.e. result object can not
- * be changed, i.e. result object can not be built
- *
- */
+ * @brief result smart object has invalid type (SmartType_Invalid)
+ * before passing to MetaFormatter, i.e. result object can not
+ * be changed, i.e. result object can not be built
+ *
+ */
static const tMetaFormatterErrorCode kErrorFailedCreateObjectBySchema = 0x04;
-}
+} // namespace meta_formatter_error_code
/**
* @brief The base class for all JSON based formatters.
@@ -102,18 +102,18 @@ class CFormatterJsonBase {
ns_smart_device_link::ns_smart_objects::SmartObject& obj);
/**
- * @brief The method constructs a JSON object from the input SmartObject
- *
- * @param obj Input SmartObject. Can contain a complex structure of objects.
- * @param value The resulting JSON object. It has the same structure as the
- *input SmartObject.
- */
+ * @brief The method constructs a JSON object from the input SmartObject
+ *
+ * @param obj Input SmartObject. Can contain a complex structure of objects.
+ * @param value The resulting JSON object. It has the same structure as the
+ *input SmartObject.
+ */
static void objToJsonValue(
const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
Json::Value& value);
};
-}
-}
-} // namespace ns_smart_device_link::ns_json_handler::formatters
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONBASE_H_
diff --git a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
index cd3e50212a..b1054100df 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv1.h
@@ -32,8 +32,8 @@
#include "json/json.h"
-#include "smart_objects/smart_object.h"
#include "smart_objects/enum_schema_item.h"
+#include "smart_objects/smart_object.h"
#include "CFormatterJsonBase.h"
@@ -238,8 +238,8 @@ int32_t formatters::CFormatterJsonSDLRPCv1::fromString(
return result;
}
-}
-}
-} // namespace ns_smart_device_link::ns_json_handler::formatters
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONSDLRPCV1_H_
diff --git a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
index f86e4e51cb..ab0289b293 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
@@ -188,8 +188,8 @@ inline bool CFormatterJsonSDLRPCv2::fromString(
return result;
}
-}
-}
-} // namespace ns_smart_device_link::ns_json_handler::formatters
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONSDLRPCV2_H_
diff --git a/src/components/formatters/include/formatters/CSmartFactory.h b/src/components/formatters/include/formatters/CSmartFactory.h
index f3c3fbe207..c384dbf01d 100644
--- a/src/components/formatters/include/formatters/CSmartFactory.h
+++ b/src/components/formatters/include/formatters/CSmartFactory.h
@@ -35,10 +35,10 @@
#ifndef SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CSMARTFACTORY_H_
#define SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CSMARTFACTORY_H_
-#include "smart_objects/smart_object.h"
-#include "smart_objects/smart_schema.h"
#include <map>
#include <string>
+#include "smart_objects/smart_object.h"
+#include "smart_objects/smart_schema.h"
namespace ns_smart_device_link {
namespace ns_json_handler {
@@ -94,7 +94,7 @@ extern const std::string kCode;
* @brief String constant for "message" param name.
*/
extern const std::string kMessage;
-}
+} // namespace strings
/**
* @brief Smart Schema key.
@@ -286,11 +286,11 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema(
return false;
MessageTypeEnum msgtype(
- (MessageTypeEnum)
- object[strings::S_PARAMS][strings::S_MESSAGE_TYPE].asInt());
+ (MessageTypeEnum)object[strings::S_PARAMS][strings::S_MESSAGE_TYPE]
+ .asInt());
FunctionIdEnum fid(
- (FunctionIdEnum)
- object[strings::S_PARAMS][strings::S_FUNCTION_ID].asInt());
+ (FunctionIdEnum)object[strings::S_PARAMS][strings::S_FUNCTION_ID]
+ .asInt());
SmartSchemaKey<FunctionIdEnum, MessageTypeEnum> key(fid, msgtype);
@@ -415,6 +415,6 @@ bool operator<(const SmartSchemaKey<FunctionIdEnum, MessageTypeEnum>& l,
return false;
}
-}
-}
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CSMARTFACTORY_H_
diff --git a/src/components/formatters/include/formatters/formatter_json_rpc.h b/src/components/formatters/include/formatters/formatter_json_rpc.h
index 3503767988..593c837877 100644
--- a/src/components/formatters/include/formatters/formatter_json_rpc.h
+++ b/src/components/formatters/include/formatters/formatter_json_rpc.h
@@ -35,12 +35,12 @@
#ifndef SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
#define SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_FORMATTER_JSON_RPC_H_
-#include <string>
#include <sys/stat.h>
+#include <string>
-#include "smart_objects/smart_object.h"
-#include "smart_objects/enum_schema_item.h"
#include "json/json.h"
+#include "smart_objects/enum_schema_item.h"
+#include "smart_objects/smart_object.h"
#include "CFormatterJsonBase.h"
#include "formatters/CSmartFactory.h"
diff --git a/src/components/formatters/include/formatters/meta_formatter.h b/src/components/formatters/include/formatters/meta_formatter.h
index 36e39301f6..b2ff546bfc 100644
--- a/src/components/formatters/include/formatters/meta_formatter.h
+++ b/src/components/formatters/include/formatters/meta_formatter.h
@@ -44,35 +44,35 @@ namespace ns_json_handler {
namespace formatters {
/**
- * @brief Formats to string the smart object against given schema for given
- *formatter
- *
- * Sample usage:
- * CSmartFactory factory;
- * SmartObject object;
- * CSmartSchmema schema;
- *
- */
+ * @brief Formats to string the smart object against given schema for given
+ *formatter
+ *
+ * Sample usage:
+ * CSmartFactory factory;
+ * SmartObject object;
+ * CSmartSchmema schema;
+ *
+ */
class CMetaFormatter {
public:
/**
- * @brief Creates smart object by the given schema having copied
- * matched tree elements from original object.
- *
- * @param object Original smart object which macthed tree elements
- * will be copied from
- * @param schema Smart schema which describes result smart object
- * @param result_object createdsmart object
- * @return true if successful, false - otherwise
- */
+ * @brief Creates smart object by the given schema having copied
+ * matched tree elements from original object.
+ *
+ * @param object Original smart object which macthed tree elements
+ * will be copied from
+ * @param schema Smart schema which describes result smart object
+ * @param result_object createdsmart object
+ * @return true if successful, false - otherwise
+ */
static bool CreateObjectByPattern(
const ns_smart_device_link::ns_smart_objects::SmartObject& object,
const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
ns_smart_device_link::ns_smart_objects::SmartObject& result_object);
};
+} // namespace formatters
+} // namespace ns_json_handler
} // namespace ns_smart_device_link
-} // namespace ns_smart_device_link::ns_json_handler
-} // namespace ns_smart_device_link::ns_json_handler::formatters
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_META_FORMATTER_H_