The Battle for Wesnoth  1.19.0-dev
Namespaces | Macros | Functions | Variables
lua_cpp_function.cpp File Reference
#include "scripting/lua_cpp_function.hpp"
#include "log.hpp"
#include <sstream>
#include <string>
#include "lua/wrapper_lauxlib.h"
#include "scripting/lua_common.hpp"
Include dependency graph for lua_cpp_function.cpp:

Go to the source code of this file.




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


static int lua_cpp::intf_dispatcher (lua_State *L)
static int lua_cpp::intf_cleanup (lua_State *L)
static int lua_cpp::intf_tostring (lua_State *L)
void lua_cpp::register_metatable (lua_State *L)
void lua_cpp::push_function (lua_State *L, const lua_function &f)
 Pushes a std::function wrapper object onto the stack. More...
void lua_cpp::set_functions (lua_State *L, const std::vector< lua_cpp::Reg > &functions)
 Analogous to lua_setfuncs, it registers a collection of function wrapper objects into a table, using push_function. More...
static int lua_cpp::intf_closure_dispatcher (lua_State *L)
void lua_cpp::push_closure (lua_State *L, const lua_function &f, int nup)
 Pushes a closure which retains a std::function object as its first up-value. More...
void lua_cpp::set_functions (lua_State *L, const std::vector< lua_cpp::Reg > &functions, int nup)
 Analogous to lua_setfuncs and set_functions above, but pushes closures. More...


static lg::log_domain log_scripting_lua ("scripting/lua")
char const * lua_cpp::cpp_function = "CPP_Function"

Macro Definition Documentation


#define DBG_LUA   LOG_STREAM(debug, log_scripting_lua)

Definition at line 27 of file lua_cpp_function.cpp.


#define ERR_LUA   LOG_STREAM(err, log_scripting_lua)

Definition at line 30 of file lua_cpp_function.cpp.


#define LOG_LUA   LOG_STREAM(info, log_scripting_lua)

Definition at line 28 of file lua_cpp_function.cpp.


#define WRN_LUA   LOG_STREAM(warn, log_scripting_lua)

Definition at line 29 of file lua_cpp_function.cpp.

Variable Documentation

◆ log_scripting_lua

lg::log_domain log_scripting_lua("scripting/lua") ( "scripting/lua"  )