From db011d8f2c7c37bc8f57edcb03fb5abc8b5bde5b Mon Sep 17 00:00:00 2001 From: Karroffel Date: Fri, 3 Mar 2017 03:48:27 +0100 Subject: [PATCH] Added RID.h --- include/godot/core/RID.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/godot/core/RID.h diff --git a/include/godot/core/RID.h b/include/godot/core/RID.h new file mode 100644 index 00000000..26a31ec5 --- /dev/null +++ b/include/godot/core/RID.h @@ -0,0 +1,32 @@ +#ifndef RID_H +#define RID_H + +#include + +namespace godot { + +class Object; + +class RID { + godot_rid _godot_rid; +public: + + RID(Object *p) + { + godot_rid_new(&_godot_rid, p); + } + + int32_t get_rid() const + { + return godot_rid_get_rid(&_godot_rid); + } + + ~RID() + { + godot_rid_destroy(&_godot_rid); + } +}; + +} + +#endif // RID_H