diff --git a/src/js_class.hpp b/src/js_class.hpp index 2a80e927..1de62dba 100644 --- a/src/js_class.hpp +++ b/src/js_class.hpp @@ -69,17 +69,17 @@ template using PropertyMap = std::map>; template -struct ObjectClass { +struct ClassDefinition { // Every specialization *must* at least have a name. std::string name; }; template -struct BaseObjectClass { +struct BaseClassDefinition { // This pointer does not need to be set. - ObjectClass* superclass; + ClassDefinition* superclass; - // ObjectClass specializations should inherit from this class and override what's needed below. + // ClassDefinition specializations should inherit from this class and override what's needed below. ConstructorType* constructor; MethodMap static_methods; PropertyMap static_properties; diff --git a/src/js_collection.hpp b/src/js_collection.hpp index 1a1c5f02..58b8b8b0 100644 --- a/src/js_collection.hpp +++ b/src/js_collection.hpp @@ -27,7 +27,7 @@ namespace js { class Collection {}; template -struct ObjectClass : BaseObjectClass { +struct ClassDefinition : BaseClassDefinition { std::string const name = "Collection"; }; diff --git a/src/js_list.hpp b/src/js_list.hpp index 167521c5..b4283c87 100644 --- a/src/js_list.hpp +++ b/src/js_list.hpp @@ -58,7 +58,7 @@ struct List { }; template -struct ObjectClass : BaseObjectClass { +struct ClassDefinition : BaseClassDefinition { using List = List; std::string const name = "List"; diff --git a/src/js_object.hpp b/src/js_object.hpp index 1e3eced5..f2514790 100644 --- a/src/js_object.hpp +++ b/src/js_object.hpp @@ -48,7 +48,7 @@ struct RealmObject { }; template -struct ObjectClass : BaseObjectClass { +struct ClassDefinition : BaseClassDefinition { using RealmObject = RealmObject; const std::string name = "RealmObject"; diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 12e9b154..b276661c 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -186,7 +186,7 @@ class Realm { }; template -struct ObjectClass : BaseObjectClass { +struct ClassDefinition : BaseClassDefinition { using Realm = Realm; std::string const name = "Realm"; diff --git a/src/js_results.hpp b/src/js_results.hpp index ac2b4c15..27865834 100644 --- a/src/js_results.hpp +++ b/src/js_results.hpp @@ -58,7 +58,7 @@ struct Results { }; template -struct ObjectClass : BaseObjectClass { +struct ClassDefinition : BaseClassDefinition { using Results = Results; std::string const name = "Results"; diff --git a/src/jsc/jsc_class.hpp b/src/jsc/jsc_class.hpp index 811a0473..8109db8c 100644 --- a/src/jsc/jsc_class.hpp +++ b/src/jsc/jsc_class.hpp @@ -26,9 +26,9 @@ namespace realm { namespace jsc { template -using ObjectClass = js::ObjectClass; +using ClassDefinition = js::ClassDefinition; -using BaseObjectClass = js::BaseObjectClass; +using BaseClassDefinition = js::BaseClassDefinition; using ConstructorType = js::ConstructorType; using MethodType = js::MethodType; using PropertyType = js::PropertyType; @@ -39,7 +39,7 @@ using PropertyMap = js::PropertyMap; template class ObjectWrap { - static ObjectClass s_class; + static ClassDefinition s_class; std::unique_ptr m_object; @@ -147,7 +147,7 @@ class ObjectWrap { } template - static JSClassRef get_superclass(ObjectClass*) { + static JSClassRef get_superclass(ClassDefinition*) { return ObjectWrap::get_class(); } @@ -289,7 +289,7 @@ inline JSClassRef ObjectWrap::get_class() { } // The declared static variables must be defined as well. -template ObjectClass ObjectWrap::s_class; +template ClassDefinition ObjectWrap::s_class; } // jsc diff --git a/src/jsc/jsc_types.hpp b/src/jsc/jsc_types.hpp index 04dd1867..dcfdc27f 100644 --- a/src/jsc/jsc_types.hpp +++ b/src/jsc/jsc_types.hpp @@ -30,7 +30,7 @@ namespace jsc { struct Types { using Context = JSContextRef; using GlobalContext = JSGlobalContextRef; - using ObjectClass = JSClassRef; + using ClassDefinition = JSClassRef; using Value = JSValueRef; using Object = JSObjectRef; using String = JSStringRef; diff --git a/src/node/node_class.hpp b/src/node/node_class.hpp index ef672022..27e93d81 100644 --- a/src/node/node_class.hpp +++ b/src/node/node_class.hpp @@ -25,7 +25,7 @@ namespace realm { namespace node { template -using ObjectClass = js::ObjectClass; +using ClassDefinition = js::ClassDefinition; using ConstructorType = js::ConstructorType; using MethodType = js::MethodType; @@ -69,7 +69,7 @@ static inline void setup_property(v8::Local tpl, const std:: template class ObjectWrap : public Nan::ObjectWrap { - static ObjectClass s_class; + static ClassDefinition s_class; static Nan::Persistent s_constructor; static Nan::Persistent s_template; @@ -165,7 +165,7 @@ class ObjectWrap : public Nan::ObjectWrap { }; // The declared static variables must be defined as well. -template ObjectClass ObjectWrap::s_class; +template ClassDefinition ObjectWrap::s_class; template Nan::Persistent ObjectWrap::s_constructor; template Nan::Persistent ObjectWrap::s_template;