#include <FusionEngine.h>
Inheritance diagram for Fusion::Engine:

Public Member Functions | |
| Engine (lua_State *) | |
| virtual IObject * | createObject (const UTF8String &name) const |
| Create an object with the named prototype, sending no arguments to its constructor. | |
| virtual IObject * | createObject (const UTF8String &name, const Value &val) const |
| Create an object with the named prototype, sending the passed val as the argument to its constructor. | |
| virtual IObject * | createObject (const UTF8String &name, Args &args, int32_t nargs) const |
| Create an object with the named prototype, sending the passed args to its constructor. | |
| virtual ResultType | setProperty (const Id &id, const Value &val) |
| Set the passed property of the global object to the passed value. | |
| virtual ResultType | getProperty (const Id &id, Value &val) const |
| Get the passed property of the global object and place it in the passed value. | |
| virtual ResultType | callProperty (const Id &id, Value &retval) const |
| Call the passed property of the global object, which is assumed to be a function or callable object. | |
| virtual ResultType | callProperty (const Id &id, Value &retval, const Value &val) const |
| Call the passed property of the global object, which is assumed to be a function or callable object. | |
| virtual ResultType | callProperty (const Id &id, Value &retval, Args &args, int32_t nargs) const |
| Call the passed property of the global object, which is assumed to be a function or callable object. | |
| virtual ResultType | callValue (const Value &func, Value &retval) const |
| Call the passed value, which is assumed to be a function or callable object. | |
| virtual ResultType | callValue (const Value &func, Value &retval, const Value &val) const |
| Call the passed value, which is assumed to be a function or callable object. | |
| virtual ResultType | callValue (const Value &func, Value &retval, Args &args, int32_t nargs) const |
| Call the passed value, which is assumed to be a function or callable object. | |
| virtual ResultType | eval (const char *str, Value &val, const Value &env, const char *name, bool showError) |
| Evaluate the passed string as a lua program or expression. | |
| virtual bool | load (DataStream *ds, Value &val, const Value &env, const char *name) |
| Load the lua file contained in the passed datastream and evaluate the resulting function. | |
| virtual bool | load (const UTF8String &filename, Value &val, const Value &env, const char *name) |
| Load the lua file contained in the passed filename and evaluate the resulting function. | |
| virtual void | addACLEntry (const UTF8String &path, uint32_t perm) |
| Add an entry to the file access control list for this engine. | |
| virtual void | removeACLEntry (const UTF8String &path, uint32_t perm) |
| Remove an entry from the file access control list for this engine. | |
| virtual void | clearACL () |
| Clear all entries in the file access control list for this engine. | |
| virtual bool | isACLAllowed (const UTF8String filename, uint32_t perm, UTF8String &approvedPath) |
| return true if the passed filename has permission to perform the access requested in perm. | |
| void | registerGlobalObject (const char *name, Object *obj) |
| Register the passed object as a prototype. | |
| virtual ILogger * | setLogger (ILogger *logger) |
| Set the ILogger interface to be used for logging. Returns the previous logger, if any. | |
| virtual ILogger * | getLogger () const |
| Get the current ILogger interface. | |
| virtual void | log (LogLevelType, const char *module, const char *,...) |
| Log errors, warnings and info. | |
| virtual void | setThreadOwner (bool take) |
| Make this engine the engine for the current thread. | |
| void | ref () |
| void | unref () |
Static Public Member Functions | |
| static ResultType | doCall (const Id &id, Args &args, int32_t nargs, Value &retval) |
| static IEngine * | getIEngine () |
| Return the IEngine pointer for the caller's thread. | |
| static void | setIEngine (IEngine *e) |
| Set the IEngine pointer for the caller's thread. | |
| static int | print (lua_State *L) |
| Global print function. | |
| static int | log (lua_State *L) |
| Global log function. | |
| static int | debugBreak (lua_State *L) |
| Global debugBreak function. | |
| static int | parseInt (lua_State *L) |
| Global parseInt function. | |
| static int | parseFloat (lua_State *L) |
| Global parseFloat function. | |
| static int | isNaN (lua_State *L) |
| Global isNaN function. | |
| static int | isFinite (lua_State *L) |
| Global isFinite function. | |
| static int | pairs (lua_State *L) |
| static int | ipairs (lua_State *L) |
Protected Member Functions | |
| lua_State * | getState () |
Friends | |
| class | Args |
Classes | |
| struct | ACLEntry |
|
|
|
|
||||||||||||
|
Add an entry to the file access control list for this engine.
Implements Fusion::IEngine. |
|
||||||||||||||||||||
|
Call the passed property of the global object, which is assumed to be a function or callable object. Any returned value is placed in retval. The nargs parameter has the number of arguments passed. Actual arguments are on the Lua stack, which is referenced in args. Implements Fusion::IEngine. |
|
||||||||||||||||
|
Call the passed property of the global object, which is assumed to be a function or callable object. Any returned value is placed in retval. One argument is passed in val. Implements Fusion::IEngine. |
|
||||||||||||
|
Call the passed property of the global object, which is assumed to be a function or callable object. Any returned value is placed in retval. No arguments are passed. Implements Fusion::IEngine. |
|
||||||||||||||||||||
|
Call the passed value, which is assumed to be a function or callable object. Any returned value is placed in retval. The nargs parameter has the number of arguments passed. Actual arguments are on the Lua stack, which is referenced in args. Implements Fusion::IEngine. |
|
||||||||||||||||
|
Call the passed value, which is assumed to be a function or callable object. Any returned value is placed in retval. One argument is passed in val. Implements Fusion::IEngine. |
|
||||||||||||
|
Call the passed value, which is assumed to be a function or callable object. Any returned value is placed in retval. No arguments are passed. Implements Fusion::IEngine. |
|
|
Clear all entries in the file access control list for this engine.
Implements Fusion::IEngine. |
|
||||||||||||||||
|
Create an object with the named prototype, sending the passed args to its constructor. The named prototype must be in the global table. Implements Fusion::IEngine. |
|
||||||||||||
|
Create an object with the named prototype, sending the passed val as the argument to its constructor. The named prototype must be in the global table. Implements Fusion::IEngine. |
|
|
Create an object with the named prototype, sending no arguments to its constructor. The named prototype must be in the global table. Implements Fusion::IEngine. |
|
|
Global debugBreak function.
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
Evaluate the passed string as a lua program or expression. Place the return value into val and use the passed self value (which is expected to be a Lua object) as the self value for the program. If showError is true, show any compile or execution errors in the console. If so, use the passed name in the error message(s). If name starts with '=' it is output unmodified in messages. If it starts with '@' it is considered a filename and is formatted as such (with a possible ellipsis to shorten the name). Otherwise it is output in the form '[string <name>]'. Implements Fusion::IEngine. |
|
|
Return the IEngine pointer for the caller's thread. This method does automatic thread-lookup to find the correct Engine object Reimplemented from Fusion::IEngine. |
|
|
Get the current ILogger interface.
Implements Fusion::IEngine. |
|
||||||||||||
|
Get the passed property of the global object and place it in the passed value.
Implements Fusion::IEngine. |
|
|
|
|
|
|
|
||||||||||||||||
|
return true if the passed filename has permission to perform the access requested in perm. All perm bits must be matched. If return is true, approvedPath also has the full path that was approved. Implements Fusion::IEngine. |
|
|
Global isFinite function.
|
|
|
Global isNaN function.
|
|
||||||||||||||||||||
|
Load the lua file contained in the passed filename and evaluate the resulting function. Use the passed environment as the function environment and place any return value in val. If any errors occur, use the name string in the message(s). See eval for formatting of name. Implements Fusion::IEngine. |
|
||||||||||||||||||||
|
Load the lua file contained in the passed datastream and evaluate the resulting function. Use the passed environment as the function environment and place any return value in val. If any errors occur, use the name string in the message(s). See eval for formatting of name. Implements Fusion::IEngine. |
|
|
Global log function.
|
|
||||||||||||||||||||
|
Log errors, warnings and info.
Implements Fusion::IEngine. |
|
|
|
|
|
Global parseFloat function.
|
|
|
Global parseInt function.
|
|
|
Global print function.
|
|
|
|
|
||||||||||||
|
Register the passed object as a prototype.
Implements Fusion::IEngine. |
|
||||||||||||
|
Remove an entry from the file access control list for this engine.
Implements Fusion::IEngine. |
|
|
Set the IEngine pointer for the caller's thread. This method is useful if an application starts a new thread and wants to set the engine pointer for this thread Reimplemented from Fusion::IEngine. |
|
|
Set the ILogger interface to be used for logging. Returns the previous logger, if any.
Implements Fusion::IEngine. |
|
||||||||||||
|
Set the passed property of the global object to the passed value.
Implements Fusion::IEngine. |
|
|
Make this engine the engine for the current thread.
Implements Fusion::IEngine. |
|
|
|
|
|
|
1.4.3