Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Fusion::IEngine Class Reference

#include <FusionIEngine.h>

Inheritance diagram for Fusion::IEngine:

Fusion::Engine List of all members.

Public Member Functions

virtual FUSION_EXPORT ResultType setProperty (const Id &id, const Value &val)=0
 Set the passed property of the global object to the passed value.
virtual FUSION_EXPORT ResultType getProperty (const Id &id, Value &val) const =0
 Get the passed property of the global object and place it in the passed value.
virtual FUSION_EXPORT ResultType callProperty (const Id &id, Value &retval) const =0
 Call the passed property of the global object, which is assumed to be a function or callable object.
virtual FUSION_EXPORT ResultType callProperty (const Id &id, Value &retval, const Value &val) const =0
 Call the passed property of the global object, which is assumed to be a function or callable object.
virtual FUSION_EXPORT ResultType callProperty (const Id &id, Value &retval, Args &args, int32_t nargs) const =0
 Call the passed property of the global object, which is assumed to be a function or callable object.
virtual FUSION_EXPORT ResultType callValue (const Value &func, Value &retval) const =0
 Call the passed value, which is assumed to be a function or callable object.
virtual FUSION_EXPORT ResultType callValue (const Value &func, Value &retval, const Value &val) const =0
 Call the passed value, which is assumed to be a function or callable object.
virtual FUSION_EXPORT ResultType callValue (const Value &func, Value &retval, Args &args, int32_t nargs) const =0
 Call the passed value, which is assumed to be a function or callable object.
virtual FUSION_EXPORT IObjectcreateObject (const UTF8String &name) const =0
 Create an object with the named prototype, sending no arguments to its constructor.
virtual FUSION_EXPORT IObjectcreateObject (const UTF8String &name, const Value &val) const =0
 Create an object with the named prototype, sending the passed val as the argument to its constructor.
virtual FUSION_EXPORT IObjectcreateObject (const UTF8String &name, Args &args, int32_t nargs) const =0
 Create an object with the named prototype, sending the passed args to its constructor.
virtual FUSION_EXPORT void registerGlobalObject (const char *name, Object *obj)=0
 Register the passed object as a prototype.
virtual FUSION_EXPORT ResultType eval (const char *str, Value &val, const Value &env, const char *name, bool showError)=0
 Evaluate the passed string as a lua program or expression.
virtual FUSION_EXPORT bool load (DataStream *ds, Value &val, const Value &env, const char *name)=0
 Load the lua file contained in the passed datastream and evaluate the resulting function.
virtual FUSION_EXPORT bool load (const UTF8String &filename, Value &val, const Value &env, const char *name)=0
 Load the lua file contained in the passed filename and evaluate the resulting function.
virtual FUSION_EXPORT ILoggersetLogger (ILogger *logger)=0
 Set the ILogger interface to be used for logging. Returns the previous logger, if any.
virtual FUSION_EXPORT ILoggergetLogger () const =0
 Get the current ILogger interface.
virtual FUSION_EXPORT void log (LogLevelType, const char *module, const char *,...)=0
 Log errors, warnings and info.
virtual FUSION_EXPORT void setThreadOwner (bool take)=0
 Make this engine the engine for the current thread.
virtual FUSION_EXPORT void addACLEntry (const UTF8String &path, uint32_t perm)=0
 Add an entry to the file access control list for this engine.
virtual FUSION_EXPORT void removeACLEntry (const UTF8String &path, uint32_t perm)=0
 Remove an entry from the file access control list for this engine.
virtual FUSION_EXPORT void clearACL ()=0
 Clear all entries in the file access control list for this engine.
virtual FUSION_EXPORT bool isACLAllowed (const UTF8String filename, uint32_t perm, UTF8String &approvedPath)=0
 return true if the passed filename has permission to perform the access requested in perm.

Static Public Member Functions

static FUSION_EXPORT IEnginegetIEngine ()
 Return the IEngine pointer for the caller's thread.
static FUSION_EXPORT void setIEngine (IEngine *)
 Set the IEngine pointer for the caller's thread.

Member Function Documentation

virtual FUSION_EXPORT void Fusion::IEngine::addACLEntry const UTF8String path,
uint32_t  perm
[pure virtual]
 

Add an entry to the file access control list for this engine.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callProperty const Id id,
Value retval,
Args args,
int32_t  nargs
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callProperty const Id id,
Value retval,
const Value val
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callProperty const Id id,
Value retval
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callValue const Value func,
Value retval,
Args args,
int32_t  nargs
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callValue const Value func,
Value retval,
const Value val
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::callValue const Value func,
Value retval
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT void Fusion::IEngine::clearACL  )  [pure virtual]
 

Clear all entries in the file access control list for this engine.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT IObject* Fusion::IEngine::createObject const UTF8String name,
Args args,
int32_t  nargs
const [pure virtual]
 

Create an object with the named prototype, sending the passed args to its constructor.

The named prototype must be in the global table.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT IObject* Fusion::IEngine::createObject const UTF8String name,
const Value val
const [pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT IObject* Fusion::IEngine::createObject const UTF8String name  )  const [pure virtual]
 

Create an object with the named prototype, sending no arguments to its constructor.

The named prototype must be in the global table.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::eval const char *  str,
Value val,
const Value env,
const char *  name,
bool  showError
[pure virtual]
 

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>]'.

Implemented in Fusion::Engine.

static FUSION_EXPORT IEngine* Fusion::IEngine::getIEngine  )  [static]
 

Return the IEngine pointer for the caller's thread.

This method does automatic thread-lookup to find the correct Engine object

Reimplemented in Fusion::Engine.

virtual FUSION_EXPORT ILogger* Fusion::IEngine::getLogger  )  const [pure virtual]
 

Get the current ILogger interface.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::getProperty const Id id,
Value val
const [pure virtual]
 

Get the passed property of the global object and place it in the passed value.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT bool Fusion::IEngine::isACLAllowed const UTF8String  filename,
uint32_t  perm,
UTF8String approvedPath
[pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT bool Fusion::IEngine::load const UTF8String filename,
Value val,
const Value env,
const char *  name
[pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT bool Fusion::IEngine::load DataStream ds,
Value val,
const Value env,
const char *  name
[pure virtual]
 

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.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT void Fusion::IEngine::log LogLevelType  ,
const char *  module,
const char *  ,
  ...
[pure virtual]
 

Log errors, warnings and info.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT void Fusion::IEngine::registerGlobalObject const char *  name,
Object obj
[pure virtual]
 

Register the passed object as a prototype.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT void Fusion::IEngine::removeACLEntry const UTF8String path,
uint32_t  perm
[pure virtual]
 

Remove an entry from the file access control list for this engine.

Implemented in Fusion::Engine.

static FUSION_EXPORT void Fusion::IEngine::setIEngine IEngine  )  [static]
 

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 in Fusion::Engine.

virtual FUSION_EXPORT ILogger* Fusion::IEngine::setLogger ILogger logger  )  [pure virtual]
 

Set the ILogger interface to be used for logging. Returns the previous logger, if any.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT ResultType Fusion::IEngine::setProperty const Id id,
const Value val
[pure virtual]
 

Set the passed property of the global object to the passed value.

Implemented in Fusion::Engine.

virtual FUSION_EXPORT void Fusion::IEngine::setThreadOwner bool  take  )  [pure virtual]
 

Make this engine the engine for the current thread.

Implemented in Fusion::Engine.


The documentation for this class was generated from the following file:
Generated on Sat Apr 1 06:08:34 2006 for Emma SDK Guide by  doxygen 1.4.3