Lua_icxx
1.02 (Aug 2011)
|
Represent a reference to a Lua object that is a Lua function. More...
#include <LuaFuncRef.h>
Public Member Functions | |
LuaFuncRef (const std::string &id="nil") | |
Reference to Lua nil. | |
bool | setEnv (const LuaTableRef &) |
Set this function's global environment. | |
LuaTempResult | getEnv () const |
Returns the function's environment table. | |
LuaFuncRef (const LuaTempResult &res) | |
Reference to object on the Lua stack. | |
LuaFuncRef (const LuaTempResult::Item &item) | |
Reference to object on the Lua stack. | |
LuaFuncRef (lua_State *lua, int stackPos) | |
Reference to object on the Lua stack. | |
DECL_FN_CALLS (operator()) | |
call methods/operator | |
DECL_FN_CALLS (call) | |
call methods/operator |
Represent a reference to a Lua object that is a Lua function.
It extends LuaObjRef to add call / operator() as well as function environment set/get. The latter is useful to create a "sandbox" for the function. More info is available elsewhere in this documentation.
Definition at line 29 of file LuaFuncRef.h.
LuaTempResult LuaFuncRef::getEnv | ( | ) | const |
Returns the function's environment table.
This is nil if the function does not have one; but an error if the function is nil.
Definition at line 26 of file LuaFuncRef.cpp.