2015-10-27 20:59:15 +00:00
|
|
|
/* Copyright 2015 Realm Inc - All Rights Reserved
|
|
|
|
* Proprietary and Confidential
|
|
|
|
*/
|
2015-08-13 16:12:48 +00:00
|
|
|
|
2015-12-01 22:52:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "js_util.hpp"
|
|
|
|
#include <map>
|
2015-08-13 16:12:48 +00:00
|
|
|
|
|
|
|
namespace realm {
|
|
|
|
class Schema;
|
2015-09-04 22:43:26 +00:00
|
|
|
using ObjectDefaults = std::map<std::string, JSValueRef>;
|
2015-08-13 16:12:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
JSClassRef RJSSchemaClass();
|
|
|
|
JSObjectRef RJSSchemaCreate(JSContextRef ctx, realm::Schema *schema);
|
|
|
|
|
2015-10-19 20:39:21 +00:00
|
|
|
realm::Schema RJSParseSchema(JSContextRef ctx, JSObjectRef jsonObject, std::map<std::string, realm::ObjectDefaults> &defaults, std::map<std::string, JSValueRef> &prototypes);
|