ponder
3.2
C++ reflection library
|
Contains Ponder Lua support public API. More...
Functions | |
void | expose (lua_State *L, const Class &cls, const IdRef exposeName) |
Expose a single Ponder metaclass to a Lua state. More... | |
void | expose (lua_State *L, const Enum &e, const IdRef exposeName) |
Expose a single Ponder enumeration to a Lua state. More... | |
template<typename T > | |
void | expose (lua_State *L, const IdRef exposeName) |
Expose a single Ponder type to a Lua state. More... | |
int | pushUserObject (lua_State *L, const UserObject &uobj) |
Push a copy of a UserObject onto the Lua stack. More... | |
bool | runString (lua_State *L, const char *luaCode) |
Expose all existing Ponder registered objects to a Lua state. More... | |
Contains Ponder Lua support public API.
You can automatically generate Lua bindings for your declared API.
void ponder::lua::expose | ( | lua_State * | L, |
const Class & | cls, | ||
const IdRef | exposeName | ||
) |
Expose a single Ponder metaclass to a Lua state.
L | Lua state in which to expose the class. |
cls | Metaclass instance in Ponder. |
exposeName | The name of the class in the Lua state. |
void ponder::lua::expose | ( | lua_State * | L, |
const Enum & | e, | ||
const IdRef | exposeName | ||
) |
Expose a single Ponder enumeration to a Lua state.
L | Lua state in which to expose the class. |
e | Enum instance in Ponder. |
exposeName | The name of the class in the Lua state. |
void ponder::lua::expose | ( | lua_State * | L, |
const IdRef | exposeName | ||
) |
Expose a single Ponder type to a Lua state.
T | Type to expose. Can be a class or enumeration. |
L | Lua state in which to expose the class. |
exposeName | The name of the class in the Lua state. |
int ponder::lua::pushUserObject | ( | lua_State * | L, |
const UserObject & | uobj | ||
) |
Push a copy of a UserObject onto the Lua stack.
You choose whether to copy or reference an object. E.g.
L | Lua state to use. |
uobj | The UserObject to copy. |
bool ponder::lua::runString | ( | lua_State * | L, |
const char * | luaCode | ||
) |
Expose all existing Ponder registered objects to a Lua state.
L | Lua state in which to expose the objects. |