Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
LuaObjcBridge Class Reference

Build a bridge between ObjectC and Lua script. More...

Inherits LuaBridge.

Static Public Member Functions

static void luaopen_luaoc (lua_State *L)
 Bind callObjcStaticMethod of LuaObjcBridge to Lua. More...
 
- Static Public Member Functions inherited from LuaBridge
static LuaStackgetStack (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...
 

Detailed Description

Build a bridge between ObjectC and Lua script.

This mechanism make Lua and ObjectC call each other easily.

Member Function Documentation

static void luaopen_luaoc ( lua_State *  L)
static

Bind callObjcStaticMethod of LuaObjcBridge to Lua.

In current mechanism,we could call LuaObjcBridge.callStaticMethod(className, methodName, args) in Lua directly. Meanwhile the callObjcStaticMethod of LuaObjcBridge binding function is wrapped in the luaoc.lua

the current lua_State


The documentation for this class was generated from the following file: