#include <CCLuaStack.h>
Public Member Functions | |
virtual | ~LuaStack () |
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... | |
var | addSearchPath ( var path) |
Add a path to find lua files in. More... | |
local | addSearchPath ( local 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 int | reload (const char *moduleFileName) |
reload script code contained in the given string. More... | |
var | reload ( var moduleFileName) |
reload script code contained in the given string. More... | |
local | reload ( local moduleFileName) |
reload script code contained in the given string. More... | |
virtual void | removeScriptObjectByObject (Ref *object) |
Remove Object from lua state. More... | |
var | removeScriptObjectByObject ( var object) |
Remove Object from lua state. More... | |
local | removeScriptObjectByObject ( local 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... | |
var | reallocateScriptHandler ( var nHandler) |
Remove Lua function reference. More... | |
local | reallocateScriptHandler ( local 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... | |
var | executeScriptFile ( var 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... | |
local | executeGlobalFunction ( local functionName) |
Execute a scripted global function. More... | |
virtual void | clean (void) |
virtual void | pushInt (int intValue) |
virtual void | pushFloat (float floatValue) |
local | pushFloat ( local floatValue) |
virtual void | pushLong (long longValue) |
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) |
local | pushString ( local stringValue, local length) |
virtual void | pushNil (void) |
virtual void | pushObject (Ref *objectValue, const char *typeName) |
local | pushObject ( local objectValue, local typeName) |
virtual void | pushLuaValue (const LuaValue &value) |
var | pushLuaValue ( var value) |
local | pushLuaValue ( local value) |
virtual void | pushLuaValueDict (const LuaValueDict &dict) |
local | pushLuaValueDict ( local dict) |
virtual void | pushLuaValueArray (const LuaValueArray &array) |
var | pushLuaValueArray ( var array) |
local | pushLuaValueArray ( local array) |
virtual bool | pushFunctionByHandler (int nHandler) |
var | pushFunctionByHandler ( var nHandler) |
local | pushFunctionByHandler ( local nHandler) |
virtual int | executeFunction (int numArgs) |
var | executeFunction ( var numArgs) |
local | executeFunction ( local 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 int | executeFunction (int handler, int numArgs, int numResults, const std::function< void(lua_State *, int)> &func) |
var | executeFunction ( var handler, var numArgs, var numResults, var func) |
local | executeFunction ( local handler, local numArgs, local numResults, local func) |
virtual bool | handleAssert (const char *msg) |
virtual void | setXXTEAKeyAndSign (const char *key, int keyLen, const char *sign, int signLen) |
virtual void | cleanupXXTEAKeyAndSign () |
int | luaLoadBuffer (lua_State *L, const char *chunk, int chunkSize, const char *chunkName) |
int | loadChunksFromZIP (const char *zipFilePath) |
int | luaLoadChunksFromZIP (lua_State *L) |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Static Public Member Functions | |
static LuaStack * | create (void) |
static LuaStack * | attach (lua_State *L) |
var | attach ( var L) |
Protected Member Functions | |
LuaStack (void) | |
bool | init (void) |
bool | initWithLuaState (lua_State *L) |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
lua_State * | _state |
int | _callFromLua |
bool | _xxteaEnabled |
char * | _xxteaKey |
int | _xxteaKeyLen |
char * | _xxteaSign |
int | _xxteaSignLen |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
|
virtual |
|
virtual |
|
virtual |
|
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 |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
|
static |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
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 |
int loadChunksFromZIP | ( | const char * | zipFilePath | ) |
var loadChunksFromZIP | ( | var | zipFilePath | ) |
local loadChunksFromZIP | ( | local | zipFilePath | ) |
int luaLoadBuffer | ( | lua_State * | L, |
const char * | chunk, | ||
int | chunkSize, | ||
const char * | chunkName | ||
) |
var luaLoadBuffer | ( | var | L, |
var | chunk, | ||
var | chunkSize, | ||
var | chunkName | ||
) |
local luaLoadBuffer | ( | local | L, |
local | chunk, | ||
local | chunkSize, | ||
local | chunkName | ||
) |
int luaLoadChunksFromZIP | ( | lua_State * | L | ) |
var luaLoadChunksFromZIP | ( | var | L | ) |
local luaLoadChunksFromZIP | ( | local | L | ) |
|
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 |
|
virtual |
|
virtual |
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
reload script code contained in the given string.
moduleFileName | String object holding the filename of the script file that is to be executed |
|
virtual |
reload script code contained in the given string.
moduleFileName | String object holding the filename of the script file that is to be executed |
|
virtual |
reload script code contained in the given string.
moduleFileName | String object holding the filename of the script file that is to be executed |
|
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. |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |