The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
lua_cpp_function.hpp File Reference
#include <functional>
#include <vector>
Include dependency graph for lua_cpp_function.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lua_cpp::Reg
 

Namespaces

namespace  lua_cpp
 

Typedefs

typedef std::function< int(lua_State *)> lua_cpp::lua_function
 

Functions

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.
 
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.
 
template<int N>
void lua_cpp::set_functions (lua_State *L, const lua_cpp::Reg(&functions)[N])
 Analogous to lua_setfuncs, it registers a collection of function wrapper objects into a table, using push_function.
 
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.
 
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.
 
template<int N>
void lua_cpp::set_functions (lua_State *L, const lua_cpp::Reg(&functions)[N], int nup)
 Analogous to lua_setfuncs and set_functions above, but pushes closures.