summaryrefslogtreecommitdiff
path: root/Source/3rdParty/Luax/luax_state.h
blob: 7b6338f9148845bb52b7dc59cc48ed414249a8ed (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
#ifndef __LUAX_STATE_H__
#define __LUAX_STATE_H__

namespace Luax 
{

    class LuaxState 
    {
    public:
        LuaxState(lua_State* state) : mState(state){};
        ~LuaxState() {};

        inline operator lua_State*() { return mState; };
        operator bool();
        inline lua_State* operator ->() { return mState; };
        inline lua_State& operator *() { return *mState; };

    private:
        void* operator new(size_t size);

        lua_State* mState;

    };

}

#endif