Build bridge between ObjC and Lua.
More...
Inherited by LuaObjcBridge.
|
static LuaStack * | getStack (void) |
| Get the LuaStack of LuaEngine. More...
|
|
static int | pushLuaFunctionById (int functionId) |
| Push the function pointer corresponding to functionId on the top of lua stack by searching the lua_bridge_function_id table. More...
|
|
static int | retainLuaFunctionById (int functionId) |
| The retain count would be increase by 1 corresponding to functionId in the lua_bridge_function_id_retain table if it could be found. More...
|
|
static int | releaseLuaFunctionById (int functionId) |
| The retain count would be reduced by 1 corresponding to functionId in the lua_bridge_function_id_retain table if it could be found. More...
|
|
Build bridge between ObjC and Lua.
It makes Lua and ObjC can call each other conveniently.
static int pushLuaFunctionById |
( |
int |
functionId | ) |
|
|
static |
Push the function pointer corresponding to functionId on the top of lua stack by searching the lua_bridge_function_id
table.
If it don't find the function pointer corresponding to functionId, it will reset stack top index to the index before searching.
- Parameters
-
functionId | the value used to search the lua_bridge_function_id table. |
static int retainLuaFunctionById |
( |
int |
functionId | ) |
|
|
static |
The retain count would be increase by 1 corresponding to functionId in the lua_bridge_function_id_retain
table if it could be found.
If lua_bridge_function_id_retain
table is not existed or the type of lua_bridge_function_id_retain[functionId] isn't LUA_TNUMBER, It would return 0. The top index of lua stack the same as before calling this function.
- Parameters
-
functionId | the value used to search the lua_bridge_function_id_retain table. |
- Returns
- the retain count or 0.
static int releaseLuaFunctionById |
( |
int |
functionId | ) |
|
|
static |
The retain count would be reduced by 1 corresponding to functionId in the lua_bridge_function_id_retain
table if it could be found.
If lua_bridge_function_id
table or lua_bridge_function_id_retain
aren't found, it would return 0. If the value of retain count is 0 after reducing, it would update the lua_bridge_function_id_retain
table and lua_bridge_function_id_retain
table to remove the reference corresponding to this functionId
- Parameters
-
functionId | the value used to search the lua_bridge_function_id table and lua_bridge_function_id table. |
- Returns
- the retain count or 0.
The documentation for this class was generated from the following file: