You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[NativeScript] added global type tag system
This commit is contained in:
@@ -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<Pair<bool, godot_instance_binding_functions> > binding_functions;
|
||||
Set<Vector<void *> *> binding_instances;
|
||||
|
||||
Map<int, HashMap<StringName, const void *> > global_type_tags;
|
||||
|
||||
public:
|
||||
// These two maps must only be touched on the main thread
|
||||
Map<String, Map<StringName, NativeScriptDesc> > 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 {
|
||||
|
||||
Reference in New Issue
Block a user