This class should have basic functions for interacting with lua To run the lua engine you have to construct the lua engine and then call init() After that you can interpret any lua string with the interpretLua function. More...
#include <lua_engine.h>
Public Member Functions | |
| LuaEngine (Scene *scene) | |
| void | init () |
| Init a new lua engine. The lua engine must be in a invalid state. | |
| void | shutdown () |
| Shutdowns the lua engine and post a cleanup event. | |
| void | forceShutdown () |
| Shutdowns the lua engine directly. | |
| bool | isValid () |
| isValid Checks if the lua engine is valid More... | |
| luabind::object | loadClassAPI (const QString &path) |
| Reads a lua class and returns the object. | |
| void | loadClassAPI (const QString &nameInGlobal, const QString &path) |
| Reads a lua class and puts it in a global object. | |
| QString | coreFile () const |
| The core lua filename. | |
| void | setCoreFile (const QString &coreFile) |
| The core lua filename. | |
| void | dispatchEvent (LuaEvent &toDispatchEvent) |
| Dispatches a lua event. | |
| void | setErrorReporterFunc (const std::function< void(const QString &, const QString &)> &func) |
| The error reporter function. | |
| Scene * | getBaseScene () const |
| The base-scene for the lua engine (may need for interacting with current scene) | |
| QString | getLuaScriptPath () const |
| void | setLuaScriptPath (const QString &luaScriptPath) |
| bool | shouldShutdown () const |
| void | setLateShutdown (bool value) |
| void | postLateShutdownError (luabind::error &error) |
| void | runGarbageCollector () |
| QString | getUserFile () const |
| void | setUserFile (const QString &userFile) |
Protected Member Functions | |
| virtual void | onBindAll () |
| void | loadMultiRet (QFile *file) |
| lua_State * | getNativeState () |
Friends | |
| class | LuaEvent |
This class should have basic functions for interacting with lua To run the lua engine you have to construct the lua engine and then call init() After that you can interpret any lua string with the interpretLua function.
To add custom class for luabind this class should be derived. As custom features can be added.
|
inline |
isValid Checks if the lua engine is valid
1.8.7