From ad93d3e277e9cf8f9081b4a09d2832f0fbc95dcf Mon Sep 17 00:00:00 2001 From: karroffel Date: Wed, 4 Apr 2018 21:32:49 +0200 Subject: [NativeScript] added global type tag system --- modules/gdnative/nativescript/nativescript.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/gdnative/nativescript/nativescript.h') diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index 17b6ddc747..68a8126a32 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -36,6 +36,7 @@ #include "core/self_list.h" #include "io/resource_loader.h" #include "io/resource_saver.h" +#include "oa_hash_map.h" #include "ordered_hash_map.h" #include "os/thread_safe.h" #include "scene/main/node.h" @@ -240,6 +241,8 @@ private: Vector > binding_functions; Set *> binding_instances; + Map > global_type_tags; + public: // These two maps must only be touched on the main thread Map > library_classes; @@ -323,6 +326,9 @@ public: virtual void *alloc_instance_binding_data(Object *p_object); virtual void free_instance_binding_data(void *p_data); + + void set_global_type_tag(int p_idx, StringName p_class_name, const void *p_type_tag); + const void *get_global_type_tag(int p_idx, StringName p_class_name) const; }; inline NativeScriptDesc *NativeScript::get_script_desc() const { -- cgit v1.2.3