|
LPCGame
A Simple 2d Game Engine
|
#include <luacudata.h>
Static Public Member Functions | |
| static T * | Allocate (lua_State *l) |
| static void | Push (lua_State *l, const T *obj) |
| static void | Copy (lua_State *from, int idx, lua_State *too) |
| static T * | Check (lua_State *l, int i) |
A base template class for inherting methods for performing udata memory operations on Lua states
|
inlinestatic |
Allocate memory for an instance of T in the Lua state, initialize it, assign the appropriate metatable and return a pointer to the object
| l | The Lua state to make the object in |
|
inlinestatic |
Check if the userdata at some index is of type T and return a pointer to it if it is
| l | The Lua state |
| i | The index of the userdata |
|
inlinestatic |
Copy an object of type T from one Lua state at index i to another Lua state
| from | The Lua state to copy from |
| idx | The index of the data in the from stack |
| too | The Lua state to copy too |
|
inlinestatic |
Push an object of type T onto the stack of the Lua state
| obj | The object to push |
| l | The Lua state to push onto |