Helper class to create lua C++ class bindings. More...
#include <Luna.hh>
Classes | |
| struct | RegType |
| struct | userdataType |
Public Types | |
| typedef int(T::* | mfp )(lua_State *L) |
Static Public Member Functions | |
| static void | registerMethods (lua_State *l) |
| Register methods in lua namespace. | |
| static T * | check (lua_State *l, int narg) |
| Get userdata from Lua stack and return pointer to T object. | |
| static T * | create (lua_State *l) |
| Create a new object from C++ (like new). | |
| static int | getMethod (lua_State *l, const std::string &funcname) |
| Fetch a lua method from this class Use it when you want to call some method of this class from C++. | |
Helper class to create lua C++ class bindings.
Adapted from http://lua-users.org/wiki/SimplerCppBinding Some things are added, like basic inheritance, __newindex, and the possibility to call lua code from C++
| int Luna< T >::getMethod | ( | lua_State * | l, | |
| const std::string & | funcname | |||
| ) | [inline, static] |
Fetch a lua method from this class Use it when you want to call some method of this class from C++.
1.6.3