#include <CCLuaStack.h>
Public Member Functions | |
| lua_State * | getLuaState (void) |
| Method used to get a pointer to the lua_State that the script module is attached to. More... | |
| local | getLuaState () |
| Method used to get a pointer to the lua_State that the script module is attached to. More... | |
| virtual void | addSearchPath (const char *path) |
| Add a path to find lua files in. More... | |
| virtual void | addLuaLoader (lua_CFunction func) |
| Add lua loader, now it is used on android. More... | |
| virtual void | removeScriptObjectByObject (Object *object) |
| Remove Object from lua state. More... | |
| virtual void | removeScriptHandler (int nHandler) |
| Remove Lua function reference. More... | |
| virtual int | reallocateScriptHandler (int nHandler) |
| Remove Lua function reference. More... | |
| virtual int | executeString (const char *codes) |
| Execute script code contained in the given string. More... | |
| virtual int | executeScriptFile (const char *filename) |
| Execute a script file. More... | |
| local | executeScriptFile ( local filename) |
| Execute a script file. More... | |
| virtual int | executeGlobalFunction (const char *functionName) |
| Execute a scripted global function. More... | |
| virtual void | clean (void) |
| virtual void | pushInt (int intValue) |
| local | pushInt ( local intValue) |
| virtual void | pushFloat (float floatValue) |
| local | pushFloat ( local floatValue) |
| virtual void | pushBoolean (bool boolValue) |
| local | pushBoolean ( local boolValue) |
| virtual void | pushString (const char *stringValue) |
| local | pushString ( local stringValue) |
| virtual void | pushString (const char *stringValue, int length) |
| var | pushString ( var stringValue, var length) |
| local | pushString ( local stringValue, local length) |
| virtual void | pushNil (void) |
| virtual void | pushObject (Object *objectValue, const char *typeName) |
| local | pushObject ( local objectValue, local typeName) |
| virtual void | pushLuaValue (const LuaValue &value) |
| local | pushLuaValue ( local value) |
| virtual void | pushLuaValueDict (const LuaValueDict &dict) |
| local | pushLuaValueDict ( local dict) |
| virtual void | pushLuaValueArray (const LuaValueArray &array) |
| virtual bool | pushFunctionByHandler (int nHandler) |
| virtual int | executeFunction (int numArgs) |
| virtual int | executeFunctionByHandler (int nHandler, int numArgs) |
| local | executeFunctionByHandler ( local nHandler, local numArgs) |
| virtual int | executeFunctionReturnArray (int handler, int numArgs, int numResults, Array &resultArray) |
| local | executeFunctionReturnArray ( local handler, local numArgs, local numResults, local resultArray) |
| virtual bool | handleAssert (const char *msg) |
Public Member Functions inherited from Object | |
| Object () | |
| Constructor. More... | |
| virtual | ~Object () |
| void | release () |
| Release the ownership immediately. More... | |
| void | retain () |
| Retains the ownership. More... | |
| Object * | autorelease () |
| Release the ownership sometime soon automatically. More... | |
| bool | isSingleReference () const |
| Returns a boolean value that indicates whether there is only one reference to the object. More... | |
| unsigned int | retainCount () const |
| Returns the object's current reference count. More... | |
| virtual bool | isEqual (const Object *object) |
| Returns a boolean value that indicates whether this object and a given object are equal. More... | |
| virtual void | acceptVisitor (DataVisitor &visitor) |
| virtual void | update (float dt) |
Static Public Member Functions | |
| static LuaStack * | create (void) |
| var | create () |
| static LuaStack * | attach (lua_State *L) |
| var | attach ( var L) |
Protected Member Functions | |
| LuaStack (void) | |
| bool | init (void) |
| bool | initWithLuaState (lua_State *L) |
Protected Attributes | |
| lua_State * | _state |
| int | _callFromLua |
| var | _callFromLua |
| local | _callFromLua |
Protected Attributes inherited from Object | |
| unsigned int | _reference |
| count of references More... | |
| var | _reference |
| count of references More... | |
| local | _reference |
| count of references More... | |
| unsigned int | _autoReleaseCount |
| count of autorelease More... | |
| var | _autoReleaseCount |
| count of autorelease More... | |
| local | _autoReleaseCount |
| count of autorelease More... | |
Additional Inherited Members | |
Public Attributes inherited from Object | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID More... | |
| int | _luaID |
| Lua reference id. More... | |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
static |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
static |
|
static |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
inline |
Method used to get a pointer to the lua_State that the script module is attached to.
|
inline |
Method used to get a pointer to the lua_State that the script module is attached to.
|
inline |
Method used to get a pointer to the lua_State that the script module is attached to.
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Object from lua state.
| object | The object to be removed. |
|
virtual |
Remove Object from lua state.
| object | The object to be removed. |
|
virtual |
Remove Object from lua state.
| object | The object to be removed. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |