X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fsimulator%2Framlparser%2Framl%2Fmodel%2FSchema.h;h=658538fac2526a56cd5140f0b0f9beff3be27113;hb=refs%2Ftags%2Faccepted%2Ftizen%2Funified%2F20171010.063815;hp=c1c95d30536d2964ad332a1d53e07f0b45591be2;hpb=7033427e9b2787649d5b3a7769a32520e19b47d2;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/simulator/ramlparser/raml/model/Schema.h b/service/simulator/ramlparser/raml/model/Schema.h index c1c95d3..658538f 100755 --- a/service/simulator/ramlparser/raml/model/Schema.h +++ b/service/simulator/ramlparser/raml/model/Schema.h @@ -28,7 +28,11 @@ #define SCHEMAS_H #include +#if defined (__TIZENRT__) +#include +#else #include "cJSON.h" +#endif #include "IncludeResolver.h" #include "JsonSchema.h" @@ -43,61 +47,66 @@ namespace RAML { public: /** - * This method is for getting CJson object of schema. - * - * @return pointer to cJSON. - */ + * This method is for getting CJson object of schema. + * + * @return pointer to cJSON. + */ virtual cJSON *getJson() const; /** - * This method is for setting schema as CJson object. - * - * @param cjson - Cjson pointer. - */ + * This method is for setting schema as CJson object. + * + * @param cjson - Cjson pointer. + */ virtual void setJson(cJSON *cjson); /** - * This method is for getting schema as string. - * - * @return string. - */ + * This method is for getting schema as string. + * + * @return string. + */ virtual std::string getSchema() const; /** - * This method is for setting schema as string. - * - * @param schema - schema string. - */ + * This method is for setting schema as string. + * + * @param schema - schema string. + */ virtual void setSchema(const std::string &schema); /** - * This method is for getting Properties from JsonSchema. - * - * @return pointer to JsonSchema. - */ + * This method is for getting Properties from JsonSchema. + * + * @return pointer to JsonSchema. + */ virtual JsonSchemaPtr const &getProperties() const; /** - * Constructor of Schema. - * - * @param schema - contents of schema to be parsed - * @param includeResolver - Reference to IncludeResolver for reading external files - * - */ + * Constructor of Schema. + * + * @param schema - contents of schema to be parsed + * @param includeResolver - Reference to IncludeResolver for reading external files + * + */ Schema(const std::string &schema, const IncludeResolverPtr &includeResolver): m_schema(schema) , m_cjson(cJSON_Parse(schema.c_str())), m_resProperties(std::make_shared(m_cjson, includeResolver) ) , m_includeResolver(includeResolver) {} /** - * Constructor of Schema. - */ + * Constructor of Schema. + */ Schema(): m_cjson(NULL), m_resProperties(std::make_shared()), m_includeResolver(NULL) {} + Schema(const Schema&) = delete; + Schema& operator=(const Schema&) = delete; + Schema(Schema&&) = delete; + Schema& operator=(Schema&&) = delete; + /** - * Destructor of Schema. - */ + * Destructor of Schema. + */ ~Schema() { cJSON_Delete(m_cjson); } private: