Provides a Lua interpreter, to drive the game_controller. More...
#include "scripting/application_lua_kernel.hpp"
#include "global.hpp"
#include "config.hpp"
#include "game_errors.hpp"
#include "log.hpp"
#include "scripting/lua_api.hpp"
#include "scripting/lua_common.hpp"
#include "scripting/lua_cpp_function.hpp"
#include "scripting/lua_fileops.hpp"
#include "scripting/lua_kernel_base.hpp"
#include "scripting/lua_types.hpp"
#include "scripting/plugins/context.hpp"
#include "scripting/plugins/manager.hpp"
#include <map>
#include <sstream>
#include <string>
#include <utility>
#include "utils/functional.hpp"
#include <boost/make_shared.hpp>
#include <boost/noncopyable.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/shared_ptr.hpp>
#include "lua/lauxlib.h"
#include "lua/lua.h"
#include "lua/luaconf.h"
Go to the source code of this file.
Classes | |
struct | lua_context_backend |
Macros | |
#define | DBG_LUA LOG_STREAM(debug, log_scripting_lua) |
#define | LOG_LUA LOG_STREAM(info, log_scripting_lua) |
#define | WRN_LUA LOG_STREAM(warn, log_scripting_lua) |
#define | ERR_LUA LOG_STREAM(err, log_scripting_lua) |
Functions | |
static int | intf_describe_plugins (lua_State *L) |
static lua_State * | get_new_thread (lua_State *L) |
static int | impl_context_backend (lua_State *L, boost::shared_ptr< lua_context_backend > backend, std::string req_name) |
static int | impl_context_accessor (lua_State *L, boost::shared_ptr< lua_context_backend > backend, plugins_context::accessor_function func) |
Variables | |
static lg::log_domain | log_scripting_lua ("scripting/lua") |
static char * | v_threadtableKey = 0 |
static void *const | threadtableKey = static_cast<void *> (& v_threadtableKey) |
Provides a Lua interpreter, to drive the game_controller.
Definition in file application_lua_kernel.cpp.
#define DBG_LUA LOG_STREAM(debug, log_scripting_lua) |
Definition at line 65 of file application_lua_kernel.cpp.
Referenced by intf_describe_plugins(), and application_lua_kernel::load_script_from_string().
#define ERR_LUA LOG_STREAM(err, log_scripting_lua) |
Definition at line 68 of file application_lua_kernel.cpp.
Referenced by application_lua_kernel::thread::run_script().
#define LOG_LUA LOG_STREAM(info, log_scripting_lua) |
Definition at line 66 of file application_lua_kernel.cpp.
Referenced by application_lua_kernel::thread::run_script().
#define WRN_LUA LOG_STREAM(warn, log_scripting_lua) |
Definition at line 67 of file application_lua_kernel.cpp.
Definition at line 133 of file application_lua_kernel.cpp.
References lua_istable, lua_newtable, lua_newthread(), lua_objlen, lua_pop, lua_pushinteger(), lua_pushlightuserdata(), lua_pushvalue(), lua_rawget(), lua_rawset(), LUA_REGISTRYINDEX, and threadtableKey.
Referenced by application_lua_kernel::load_script_from_file(), and application_lua_kernel::load_script_from_string().
|
static |
Definition at line 234 of file application_lua_kernel.cpp.
References lua_gettop(), luaL_argerror(), luaL_error(), luaW_pushconfig(), and luaW_toconfig().
Referenced by application_lua_kernel::thread::run_script().
|
static |
Definition at line 220 of file application_lua_kernel.cpp.
References plugins_manager::event::data, luaL_error(), luaW_checkconfig(), and plugins_manager::event::name.
Referenced by application_lua_kernel::thread::run_script().
Definition at line 70 of file application_lua_kernel.cpp.
References DBG_LUA, plugins_manager::get(), plugins_manager::get_name(), plugins_manager::get_status(), i, lua_call, lua_getglobal(), lua_pushstring(), and lua_pushvalue().
Referenced by application_lua_kernel::application_lua_kernel().
|
static |
|
static |
Definition at line 131 of file application_lua_kernel.cpp.
Referenced by get_new_thread().
|
static |
Definition at line 130 of file application_lua_kernel.cpp.