- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件
-
)
- 类列表
- 类索引
- 类继承关系
- 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
LuaStack类 参考
#include
类 LuaStack 继承关系图:
## Public 成员函数
|
virtual | ~LuaStack () |
|
lua_State | getLuaState (void) |
| Method used to get a pointer to the lua_State that the script module is attached to. 更多…
|
|
virtual void | addSearchPath (const char path) |
| Add a path to find lua files in. 更多…
|
|
virtual void | addLuaLoader (lua_CFunction func) |
| Add lua loader, now it is used on android. 更多…
|
|
virtual int | reload (const char moduleFileName) |
| reload script code contained in the given string. 更多…
|
|
virtual void | removeScriptObjectByObject (Ref object) |
| Remove Object from lua state. 更多…
|
|
virtual void | removeScriptHandler (int nHandler) |
| Remove Lua function reference. 更多…
|
|
virtual int | reallocateScriptHandler (int nHandler) |
| Remove Lua function reference. 更多…
|
|
virtual int | executeString (const char codes) |
| Execute script code contained in the given string. 更多…
|
|
virtual int | executeScriptFile (const char filename) |
| Execute a script file. 更多…
|
|
virtual int | executeGlobalFunction (const char functionName) |
| Execute a scripted global function. 更多…
|
|
virtual void | clean (void) |
|
virtual void | pushInt (int intValue) |
|
virtual void | pushFloat (float floatValue) |
|
virtual void | pushLong (long longValue) |
|
virtual void | pushBoolean (bool boolValue) |
|
virtual void | pushString (const char stringValue) |
|
virtual void | pushString (const char stringValue, int length) |
|
virtual void | pushNil (void) |
|
virtual void | pushObject (Ref objectValue, const char typeName) |
|
virtual void | pushLuaValue (const LuaValue &value) |
|
virtual void | pushLuaValueDict (const LuaValueDict &dict) |
|
virtual void | pushLuaValueArray (const LuaValueArray &array) |
|
virtual bool | pushFunctionByHandler (int nHandler) |
|
virtual int | executeFunction (int numArgs) |
|
virtual int | executeFunctionByHandler (int nHandler, int numArgs) |
|
virtual int | executeFunctionReturnArray (int handler, int numArgs, int numResults, __Array &resultArray) |
|
virtual int | executeFunction (int handler, int numArgs, int numResults, const std::function< void(lua_State , int)> &func) |
|
virtual bool | handleAssert (const char msg) |
|
Public 成员函数 继承自 Ref |
void | retain () |
| 保留所有权. 更多…
|
|
void | release () |
| 立即释放所有权. 更多…
|
|
Ref | autorelease () |
| 自动释放所有权在不久的将来. 更多…
|
|
unsigned int | getReferenceCount () const |
| 返回Ref对象当前的引用计数. 更多…
|
|
virtual | ~Ref () |
| NA NA 更多…
|
|
构造及析构函数说明
成员函数说明
virtual void addLuaLoader | ( | lua_CFunction | func | ) | |
| virtual |
Add lua loader, now it is used on android.
virtual void addSearchPath | ( | const char * | path | ) | |
| virtual |
Add a path to find lua files in.
virtual void clean | ( | void | | ) | |
| virtual |
virtual int executeFunction | ( | int | numArgs | ) | |
| virtual |
virtual int executeFunction | ( | int | handler, | | | int | numArgs, | | | int | numResults, | | | const std::function< void(lua_State *, int)> & | func | | ) | | |
| virtual |
virtual int executeFunctionByHandler | ( | int | nHandler, | | | int | numArgs | | ) | | |
| virtual |
virtual int executeFunctionReturnArray | ( | int | handler, | | | int | numArgs, | | | int | numResults, | | | __Array & | resultArray | | ) | | |
| virtual |
virtual int executeGlobalFunction | ( | const char * | functionName | ) | |
| virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
- 返回
- The integer value returned from the script function.
virtual int executeScriptFile | ( | const char * | filename | ) | |
| virtual |
Execute a script file.
virtual int executeString | ( | const char * | codes | ) | |
| virtual |
Execute script code contained in the given string.
- 返回
- 0 if the string is excuted correctly.
- other if the string is excuted wrongly.
lua_State* getLuaState | ( | void | | ) | |
| inline |
Method used to get a pointer to the lua_State that the script module is attached to.
- 返回
- A pointer to the lua_State that the script module is attached to.
virtual bool handleAssert | ( | const char * | msg | ) | |
| virtual |
bool initWithLuaState | ( | lua_State * | L | ) | |
| protected |
virtual void pushBoolean | ( | bool | boolValue | ) | |
| virtual |
virtual void pushFloat | ( | float | floatValue | ) | |
| virtual |
virtual bool pushFunctionByHandler | ( | int | nHandler | ) | |
| virtual |
virtual void pushInt | ( | int | intValue | ) | |
| virtual |
virtual void pushLong | ( | long | longValue | ) | |
| virtual |
virtual void pushLuaValue | ( | const LuaValue & | value | ) | |
| virtual |
virtual void pushNil | ( | void | | ) | |
| virtual |
virtual void pushObject | ( | Ref | objectValue, | | | const char | typeName | | ) | | |
| virtual |
virtual void pushString | ( | const char * | stringValue | ) | |
| virtual |
virtual void pushString | ( | const char * | stringValue, | | | int | length | | ) | | |
| virtual |
virtual int reallocateScriptHandler | ( | int | nHandler | ) | |
| virtual |
Remove Lua function reference.
virtual int reload | ( | const char * | moduleFileName | ) | |
| virtual |
reload script code contained in the given string.
- 返回
- 0 if the string is excuted correctly.
- other if the string is excuted wrongly.
virtual void removeScriptHandler | ( | int | nHandler | ) | |
| virtual |
Remove Lua function reference.
virtual void removeScriptObjectByObject | ( | Ref * | object | ) | |
| virtual |
Remove Object from lua state.
类成员变量说明
该类的文档由以下文件生成:
- /Users/zeroyang/Documents/github/cocos2d-x/cocos/scripting/lua-bindings/manual/CCLuaStack.h