Build bridge between ObjC and Lua.
More...
#include <CCLuaBridge.h>
|
static int | retainLuaFunction (lua_State *L, int functionIndex, int *retainCountReturn) |
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. |
var pushLuaFunctionById |
( |
var |
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 releaseLuaFunctionById |
( |
int |
functionId | ) |
|
|
static |
The retain count woulde 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 vaule 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
var releaseLuaFunctionById |
( |
var |
functionId | ) |
|
|
static |
The retain count woulde 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 vaule 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
static int retainLuaFunction |
( |
lua_State * |
L, |
|
|
int |
functionIndex, |
|
|
int * |
retainCountReturn |
|
) |
| |
|
staticprotected |
var retainLuaFunction |
( |
var |
L, |
|
|
var |
functionIndex, |
|
|
var |
retainCountReturn |
|
) |
| |
|
staticprotected |
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.
var retainLuaFunctionById |
( |
var |
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.
The documentation for this class was generated from the following file:
- /Users/minggo/SourceCode/cocos2d-x/cocos/scripting/lua-bindings/manual/CCLuaBridge.h