|
Thrive
|
RAII class for lua_State data structures. More...
#include <lua_state.h>
Public Member Functions | |
| LuaState () | |
| Constructor. More... | |
| LuaState (const LuaState &)=delete | |
| Non-copyable. | |
| LuaState (LuaState &&other) | |
| Move constructor. More... | |
| ~LuaState () | |
| Destructor. | |
| LuaState & | operator= (const LuaState &)=delete |
| Non-copyable. | |
| LuaState & | operator= (LuaState &&other) |
| Move-assign operator. More... | |
| operator lua_State * () | |
| Implicit cast to lua_State*. | |
| bool | doFile (const std::string &filename) |
| Runs the file in the Lua state. More... | |
| bool | doString (const std::string &string) |
| Runs the chunk in the Lua state. More... | |
RAII class for lua_State data structures.
| LuaState::LuaState | ( | ) |
Constructor.
Calls luaL_newstate and luaL_openlibs.
| LuaState::LuaState | ( | LuaState && | other | ) |
Move constructor.
| other |
| bool LuaState::doFile | ( | const std::string & | filename | ) |
Runs the file in the Lua state.
Calls luaL_dofile
| filename | The file to load and run |
true if successful, false if there were errors | bool LuaState::doString | ( | const std::string & | string | ) |
Runs the chunk in the Lua state.
Calls luaL_dostring
| string | The script chunk to run |
true if successful, false if there were errors
1.8.10