Script Virtual Machine interface.
System | |
| virtual tIntPtr | GetHandle () const =0 |
| Get the VM's handle. {Property}. More... | |
| virtual iScriptVM * | GetParentVM () const =0 |
| Get the parent VM. {Property}. More... | |
Compilation & Execution | |
| virtual iScriptObject * | Compile (iFile *apFile, const achar *aaszName=NULL)=0 |
| Compile the given file. More... | |
| virtual iScriptObject * | CompileString (const achar *aaszCode, const achar *aaszName=NULL)=0 |
| Compile the given string. More... | |
| virtual iUnknown * | CompileGetIUnknownObject (iScriptObject *apThisTable, iFile *apFile, const achar *aaszObjectName, const tUUID &aIID)=0 |
| Compile the given file and get the specified IUnknown object. More... | |
| virtual tBool | Run (iScriptObject *apThis, const achar *aaszCommand)=0 |
| Run the specified text. More... | |
| virtual tI32 | CollectGarbage ()=0 |
| Collect garbage. More... | |
Debug | |
| virtual void | EnableDebugInfos (tBool abEnabled)=0 |
| Enable debug informations in the compiled script. More... | |
| virtual tBool | AreDebugInfosEnabled () const =0 |
| Return eTrue if debug infos are enabled. More... | |
| virtual void | SetErrorLineOffset (tI32 anOffset)=0 |
| Set the line error reporting offset. {Property}. More... | |
| virtual tI32 | GetErrorLineOffset () const =0 |
| Get the line error reporting offset. {Property}. More... | |
| virtual eScriptRaiseErrorMode | SetRaiseErrorMode (eScriptRaiseErrorMode aMode)=0 |
| Set the current raise error mode. {Property}. More... | |
| virtual eScriptRaiseErrorMode | GetRaiseErrorMode () const =0 |
| Get the current raise error mode. {Property}. More... | |
| virtual void | SetLogRaiseError (tLogFlags aLog)=0 |
| Set whether each error raised should be logged. {Property}. More... | |
| virtual tLogFlags | GetLogRaiseError () const =0 |
| Get whether each error raised should be logged. {Property}. More... | |
Registration | |
| virtual tBool | RegisterFunction (const sMethodDef *apFunction, const achar *aaszName=NULL)=0 |
| Register a function in the active table. More... | |
Stack manipulation | |
| virtual tBool | PushRootTable ()=0 |
| Push the root table on the stack. More... | |
| virtual tBool | PushString (const achar *aaszString, tSize anLen=-1)=0 |
| Push a string on the stack. More... | |
| virtual tBool | PushInteger (tI32 anValue)=0 |
| Push an integer on the stack. More... | |
| virtual tBool | PushFloat (tF64 afValue)=0 |
| Push a float on the stack. More... | |
| virtual tBool | PushInterface (iUnknown *apInterface)=0 |
| Push an interface on the stack. More... | |
| virtual tBool | PushVariant (const Var &aVar)=0 |
| Push a variant on the stack. More... | |
| virtual tBool | PushObject (iScriptObject *apObject)=0 |
| Push a script object on the stack. More... | |
| virtual tBool | Pop (tU32 anNumPop)=0 |
| Pop n object of the stack. More... | |
| virtual tI32 | GetStackSize () const =0 |
| Get the stack size. More... | |
| virtual tBool | SetStackSize (tU32 anSize)=0 |
| Set the stack size. More... | |
| virtual tBool | CreateSlot (tI32 idx)=0 |
| Create a new slot. More... | |
Imports | |
| virtual tInterfaceCVec < iFileSystem > * | GetImportFileSystems () const =0 |
| Get the list of file systems used by the script protocol URLFile handler. {Property}. More... | |
| virtual iFile * | ImportFileOpen (const achar *aaszFile)=0 |
| Open a file using the script protocol by default if no procotol is specified. More... | |
| virtual tBool | Import (iUnknown *apPathOrFile, iScriptObject *apDestTable)=0 |
| Call the system Import function. More... | |
| virtual tBool | NewImport (iUnknown *apPathOrFile, iScriptObject *apDestTable)=0 |
| Call the system NewImport function. More... | |
Script objects | |
| virtual iScriptObject * | CreateTable (iScriptObject *apDelegate=NULL, tI32 anNumPop=1)=0 |
| Create a new table. More... | |
| virtual iScriptObject * | CreateObject (tI32 anIndex=eInvalidHandle, tI32 anNumPop=1)=0 |
| Create a new script object. More... | |
| virtual iScriptObject * | CreateObjectGet (const achar *aaszKey, eScriptObjectType aRequiredType=eScriptObjectType_Last, tI32 anNumPop=1)=0 |
| Create an object the pushed table. More... | |
Functions | |
| virtual tBool | Call (tU32 anNumParams, tBool abPushRet)=0 |
| Call a function. More... | |
Serialization | |
| virtual tBool | WriteClosure (iFile *apFile, iScriptObject *apObject)=0 |
| Write a closure. More... | |
| virtual iScriptObject * | ReadClosure (iFile *apFile)=0 |
| Read a closure. More... | |
High level API | |
| virtual tBool | ScriptCall (const achar *aaszModule, const achar *aaszFunc, const Var *apParams, tU32 anNumParams, Var *apRet)=0 |
| {NoAutomation} More... | |
| virtual iScriptObject * | ScriptVar (const achar *aaszModule, const achar *aaszVar)=0 |
| virtual tBool | EvalString (iHString *ahspContext, const ni::achar *aaszCode)=0 |
| Evaluate the specified string. More... | |
| virtual tBool | CanEvalImpl (iHString *ahspContext, iHString *ahspCodeResource)=0 |
| Check whether the scripting host can evaluate the specified code resource. More... | |
| virtual iUnknown * | EvalImpl (iHString *ahspContext, iHString *ahspCodeResource, const tUUID &aIID)=0 |
| Evaluate the specified implementation from the specified 'code resource'. More... | |
| virtual void | Service (tBool abForceGC)=0 |
| Service the scripting host. More... | |
Additional Inherited Members | |
Public Member Functions inherited from iUnknown | |
| virtual tBool | IsOK () const =0 |
| Check if the object is valid. More... | |
| virtual tI32 | AddRef ()=0 |
| Signal that one more reference of the object has been created. More... | |
| virtual tI32 | Release ()=0 |
| Release a reference of the object. More... | |
| virtual void | DeleteThis ()=0 |
| Bypass any reference counting and delete this object. More... | |
| virtual void | Invalidate ()=0 |
| Invalidate the object. More... | |
| virtual iUnknown * | QueryInterface (const tUUID &aIID)=0 |
| Query an interface. More... | |
| virtual void | ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0 |
| Fill a UUID list containing the UUIDs of the implemented interfaces. More... | |
| virtual tI32 | SetNumRefs (tI32 anNumRefs)=0 |
| Set the reference counter directly. More... | |
| virtual tI32 | GetNumRefs () const =0 |
| Get the number of references to this object. More... | |
|
pure virtual |
Get the VM's handle. {Property}.
|
pure virtual |
Get the parent VM. {Property}.
|
pure virtual |
Compile the given file.
| apFile | containes the code to compile. |
| aaszName | is the name to give to the closure. If NULL the file source path is used as name. |
|
pure virtual |
Compile the given string.
| aaszCode | containes the code to compile. |
| aaszName | is the name to give to the closure. If NULL [VM::String] is used. |
|
pure virtual |
Compile the given file and get the specified IUnknown object.
|
pure virtual |
Run the specified text.
| apThis | is the 'this' table to use for the call, if null use the root table. |
| aaszCommand | is the text to run. |
|
pure virtual |
Collect garbage.
Enable debug informations in the compiled script.
|
pure virtual |
Return eTrue if debug infos are enabled.
Set the line error reporting offset. {Property}.
|
pure virtual |
Get the line error reporting offset. {Property}.
|
pure virtual |
Set the current raise error mode. {Property}.
|
pure virtual |
Get the current raise error mode. {Property}.
Set whether each error raised should be logged. {Property}.
|
pure virtual |
Get whether each error raised should be logged. {Property}.
|
pure virtual |
Register a function in the active table.
|
pure virtual |
Push the root table on the stack.
Push a string on the stack.
|
pure virtual |
Push a script object on the stack.
|
pure virtual |
Get the stack size.
|
pure virtual |
Get the list of file systems used by the script protocol URLFile handler. {Property}.
Open a file using the script protocol by default if no procotol is specified.
|
pure virtual |
Call the system Import function.
|
pure virtual |
Call the system NewImport function.
|
pure virtual |
Create a new table.
| apDelegate | is an optional delegate table. |
| anNumPop |
|
pure virtual |
Create a new script object.
|
pure virtual |
Create an object the pushed table.
| aaszKey | is the name of the object to get. |
| aRequiredType | is the type that the object should have. If eScriptObjectType_Last this is ignored. |
| anNumPop | is the number of pop, by defaul the object is pushed on the stack. |
Call a function.
| anNumParams | number of parameters to pop of the stack, should be at least one, aka the this table. |
| abPushRet | if eTrue the return value will be pushed in the stack when the function returns. |
|
pure virtual |
Write a closure.
|
pure virtual |
Read a closure.
|
pure virtual |
{NoAutomation}
|
pure virtual |
Evaluate the specified string.
Implements iScriptingHost.
Check whether the scripting host can evaluate the specified code resource.
Implements iScriptingHost.
|
pure virtual |
Evaluate the specified implementation from the specified 'code resource'.
Implements iScriptingHost.
Service the scripting host.
Implements iScriptingHost.
1.8.7