summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core/object.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/godot_cpp/core/object.hpp')
-rw-r--r--include/godot_cpp/core/object.hpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp
index 4e85e4d..79f8fbf 100644
--- a/include/godot_cpp/core/object.hpp
+++ b/include/godot_cpp/core/object.hpp
@@ -33,6 +33,8 @@
#include <godot_cpp/core/defs.hpp>
+#include <godot_cpp/core/object_id.hpp>
+
#include <godot_cpp/core/property_info.hpp>
#include <godot_cpp/variant/variant.hpp>
@@ -106,28 +108,6 @@ MethodInfo::MethodInfo(const PropertyInfo &p_ret, StringName p_name, const Args
arguments = { args... };
}
-class ObjectID {
- uint64_t id = 0;
-
-public:
- _FORCE_INLINE_ bool is_ref_counted() const { return (id & (uint64_t(1) << 63)) != 0; }
- _FORCE_INLINE_ bool is_valid() const { return id != 0; }
- _FORCE_INLINE_ bool is_null() const { return id == 0; }
- _FORCE_INLINE_ operator uint64_t() const { return id; }
- _FORCE_INLINE_ operator int64_t() const { return id; }
-
- _FORCE_INLINE_ bool operator==(const ObjectID &p_id) const { return id == p_id.id; }
- _FORCE_INLINE_ bool operator!=(const ObjectID &p_id) const { return id != p_id.id; }
- _FORCE_INLINE_ bool operator<(const ObjectID &p_id) const { return id < p_id.id; }
-
- _FORCE_INLINE_ void operator=(int64_t p_int64) { id = p_int64; }
- _FORCE_INLINE_ void operator=(uint64_t p_uint64) { id = p_uint64; }
-
- _FORCE_INLINE_ ObjectID() {}
- _FORCE_INLINE_ explicit ObjectID(const uint64_t p_id) { id = p_id; }
- _FORCE_INLINE_ explicit ObjectID(const int64_t p_id) { id = p_id; }
-};
-
class ObjectDB {
public:
static Object *get_instance(uint64_t p_object_id) {