2010-12-12 17:08:36 +00:00
|
|
|
#ifndef LUA_MANAGER_H
|
|
|
|
#define LUA_MANAGER_H
|
|
|
|
|
|
|
|
#include "lua.hpp"
|
|
|
|
#include "tolua++.h"
|
|
|
|
|
|
|
|
class LuaManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
static void Init();
|
|
|
|
|
|
|
|
static void CleanUp();
|
|
|
|
|
2011-01-30 15:44:48 +00:00
|
|
|
static lua_State* GetState() { return c_pState; }
|
2010-12-12 17:08:36 +00:00
|
|
|
|
|
|
|
static void ReportErrors(lua_State * L);
|
|
|
|
|
2011-01-30 10:39:10 +00:00
|
|
|
static void LuaLog(int nLevel, const char* format, ... );
|
2010-12-12 17:08:36 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2011-01-30 15:44:48 +00:00
|
|
|
static int c_RefCount;
|
2010-12-12 17:08:36 +00:00
|
|
|
|
2011-01-30 15:44:48 +00:00
|
|
|
static lua_State* c_pState;
|
2010-12-12 17:08:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|