aboutsummaryrefslogtreecommitdiff
path: root/src/lua/common/je_lua_object.cpp
blob: ce71283c4a8568dcba155c7e88fa0584e8e7bf0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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();
        }

    }
}