aboutsummaryrefslogtreecommitdiff
path: root/src/lua/common/je_lua_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/common/je_lua_object.cpp')
-rw-r--r--src/lua/common/je_lua_object.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lua/common/je_lua_object.cpp b/src/lua/common/je_lua_object.cpp
new file mode 100644
index 0000000..ce71283
--- /dev/null
+++ b/src/lua/common/je_lua_object.cpp
@@ -0,0 +1,32 @@
+#include "je_lua.h"
+#include "je_lua_object.h"
+
+namespace JinEngine
+{
+ namespace Lua
+ {
+
+ void LuaObject::bind(SharedBase* s)
+ {
+ if (s == nullptr)
+ return;
+ shared = s;
+ shared->retain();
+ }
+
+ void LuaObject::release()
+ {
+ if (shared != nullptr)
+ {
+ shared->release();
+ shared = nullptr;
+ }
+ }
+
+ const char* LuaObject::getObjectType()
+ {
+ return shared->getType();
+ }
+
+ }
+} \ No newline at end of file