The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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/lauxlib.h"
#include "lua/lua.h"
Include dependency graph for lua_cpp_function.cpp:

Go to the source code of this file.

Namespaces

 lua_cpp
 

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 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...
 

Variables

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 26 of file lua_cpp_function.cpp.

#define ERR_LUA   LOG_STREAM(err, log_scripting_lua)

Definition at line 29 of file lua_cpp_function.cpp.

Referenced by lua_cpp::intf_cleanup().

#define LOG_LUA   LOG_STREAM(info, log_scripting_lua)

Definition at line 27 of file lua_cpp_function.cpp.

#define WRN_LUA   LOG_STREAM(warn, log_scripting_lua)

Definition at line 28 of file lua_cpp_function.cpp.

Variable Documentation

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