The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Functions | Variables
application_lua_kernel.cpp File Reference

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"
Include dependency graph for application_lua_kernel.cpp:

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_Stateget_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)
 

Detailed Description

Provides a Lua interpreter, to drive the game_controller.

Note
Naming conventions:
  • intf_ functions are exported in the wesnoth domain,
  • impl_ functions are hidden inside metatables,
  • cfun_ functions are closures,
  • luaW_ functions are helpers in Lua style.

Definition in file application_lua_kernel.cpp.

Macro Definition Documentation

#define DBG_LUA   LOG_STREAM(debug, log_scripting_lua)
#define ERR_LUA   LOG_STREAM(err, log_scripting_lua)
#define LOG_LUA   LOG_STREAM(info, log_scripting_lua)
#define WRN_LUA   LOG_STREAM(warn, log_scripting_lua)

Definition at line 67 of file application_lua_kernel.cpp.

Function Documentation

static lua_State* get_new_thread ( lua_State L)
static
static int impl_context_accessor ( lua_State L,
boost::shared_ptr< lua_context_backend backend,
plugins_context::accessor_function  func 
)
static
static int impl_context_backend ( lua_State L,
boost::shared_ptr< lua_context_backend backend,
std::string  req_name 
)
static
static int intf_describe_plugins ( lua_State L)
static

Variable Documentation

lg::log_domain log_scripting_lua("scripting/lua")
static
void* const threadtableKey = static_cast<void *> (& v_threadtableKey)
static

Definition at line 131 of file application_lua_kernel.cpp.

Referenced by get_new_thread().

char* v_threadtableKey = 0
static

Definition at line 130 of file application_lua_kernel.cpp.