summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2017-03-03 03:48:27 +0100
committerKarroffel <therzog@mail.de>2017-03-03 03:48:27 +0100
commitdb011d8f2c7c37bc8f57edcb03fb5abc8b5bde5b (patch)
treeab79cb57a895ac688f9187372d0a27029480fb55 /include
parent15515d10d48ea0f8deebf719fc388d1db1aa386f (diff)
downloadredot-cpp-db011d8f2c7c37bc8f57edcb03fb5abc8b5bde5b.tar.gz
Added RID.h
Diffstat (limited to 'include')
-rw-r--r--include/godot/core/RID.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/godot/core/RID.h b/include/godot/core/RID.h
new file mode 100644
index 0000000..26a31ec
--- /dev/null
+++ b/include/godot/core/RID.h
@@ -0,0 +1,32 @@
+#ifndef RID_H
+#define RID_H
+
+#include <godot/godot_rid.h>
+
+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