18 const char *
what()
const override 19 {
return m_what.c_str(); }
42 Lua(
bool debugEnable,
size_t maxHeapSize,
size_t initHeapSize = 1024 * 1024,
43 int instLimit = 10 * 10000);
51 lua_State *getLuaState()
const;
65 void loadFile(
const wchar_t *fileName,
bool autoBreak,
bool prot =
true);
68 void operator ()(lua_State *L) {}
91 template <
class ParamFunc = doNothing,
class RetFunc = doNothing>
93 ParamFunc pushArgFunc =
doNothing(),
int narg = 0,
94 RetFunc getRetFunc =
doNothing(),
int nret = 0)
96 lua_State *L = m_lua.get();
97 lua_getglobal(L, funcName);
101 pcallInternal(narg, nret, autoBreak);
109 static const DWORD HeapOption = HEAP_NO_SERIALIZE;
112 void operator()(lua_State *L);
117 std::unique_ptr<lua_State, LuaDeleter> m_lua;
118 std::unique_ptr<debugger::LuaDebugger> m_dbg;
121 static void *luaAlloc(
void *ud,
void *ptr,
size_t osize,
size_t nsize);
123 void pcallInternal(
int narg,
int nret,
bool autoBreak);
127 lua_State *L,
int ind,
int maxDepth);
LuaError(const std::string &msg, lua_State *L)
void callGlobal(const char *funcName, bool autoBreak, ParamFunc pushArgFunc=doNothing(), int narg=0, RetFunc getRetFunc=doNothing(), int nret=0)
Calls global function.
Game application main framework classes.
std::vector< uint8_t > loadFile(const wchar_t *fileName)
Load file from abstract file system.
const char * what() const override
std::unique_ptr< HANDLE, heapDeleter > HeapPtr
unique_ptr of HANDLE with heapDeleter.
char msg[LINE_DATA_SIZE-sizeof(LARGE_INTEGER)-sizeof(uint32_t)]
User application base, which manages a window and DirectX objects.
std::vector< std::string > luaValueToStrList(lua_State *L, int ind, int maxDepth)