Pioneer
LuaManager.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _LUAMANAGER_H
5 #define _LUAMANAGER_H
6 
7 #include "LuaUtils.h"
8 
9 class LuaManager {
10 public:
11  LuaManager();
12  ~LuaManager();
13 
14  lua_State *GetLuaState() { return m_lua; }
15  size_t GetMemoryUsage() const;
16  void CollectGarbage();
17 
18 private:
19  LuaManager(const LuaManager &);
20  LuaManager &operator=(const LuaManager &) = delete;
21 
22  lua_State *m_lua;
23 };
24 
25 #endif
Definition: LuaManager.h:9
LuaManager()
Definition: LuaManager.cpp:10
~LuaManager()
Definition: LuaManager.cpp:34
lua_State * GetLuaState()
Definition: LuaManager.h:14
size_t GetMemoryUsage() const
Definition: LuaManager.cpp:41
void CollectGarbage()
Definition: LuaManager.cpp:48