type TIFPSExec = class(TObject)
Name | Description |
---|---|
ExEx | The error code |
ExParam | The optional parameter for the error |
ExPos | The position of the last error |
ExProc | The proc where the last error occured |
FCurrentPosition | The current position in the current proc |
FCurrProc | The current proc |
FCurrStackBase | Current stack base |
FExportedVars | The list of exported variables |
FGlobalVars | FGlobalVars contains the global variables of the current script |
FMainProc | The main proc no or -1 (no main proc) |
FOnRunLine | FOnRunLine event |
FProcs | FProcs contains all script procedures |
FRegProcs | List of all registered external functions |
FResources | The list of resources |
FSpecialProcList | List of SpecialProcs; See TIFPSExec.AddSpecialProc |
FStack | The current stack |
FStatus | The current status of the script engine |
FTypes | FTypes contains all types used by the script |
MM | MM is the memory manager used internally. It's needed to create and destroy variants |
constructor Create; |
Create an instance of the executer
destructor Destroy; Override; |
Destroy this instance of the executer
class function About: string; |
This function will return about information
procedure AddResource(Proc, P: Pointer); |
Add a resource
procedure AddSpecialProcImport(const FName: string; P: TIFPSOnSpecialProcImport; Tag: Pointer); |
Add a special proc import; this is used for the dll and class library
procedure Cleanup; Virtual; |
Reset all variables in the script to zero
procedure Clear; Virtual; |
Clear the currently loaded script
procedure ClearFunctionList; |
Clear the function list
procedure CMD_Err(EC: TIFError); |
Call CMD_Err to cause an error and stop the script
procedure CMD_Err2(EC: TIFError; const Param: string); |
Call CMD_Err2 to cause an error and stop the script
function CreateFloatVariant(FType: PIFTypeRec; Value: Extended): PIfVariant; |
Create a float variant
function CreateIntegerVariant(FType: PIFTypeRec; Value: Longint): PIfVariant; |
Create an integer variant
function CreateStringVariant(FType: PIFTypeRec; const Value: string): PIfVariant; |
create a string variant
procedure DeleteResource(P: Pointer); |
Delete a resource
procedure ExceptionProc(proc, Position: Cardinal; Ex: TIFError; const s: string); Virtual; |
ExceptionProc is called when an error occurs
function FindProcResouce(Proc: Pointer): Pointer; |
Find a resource
function FindProcResouce2(Proc: Pointer; var StartAt: Longint): Pointer; |
Find a resource
function FindType(StartAt: Cardinal; BaseType: TIFPSBaseType; var l: Cardinal): PIFTypeRec; |
Search for a type (l is the starting position)
function FindType2(BaseType: TIFPSBaseType): PIFTypeRec; |
Search for a type
function GetProc(const Name: string): Cardinal; |
Get function that has been compiled with a name
function GetType(const Name: string): Cardinal; |
Get Type that has been compiled with a name
function GetTypeNo(l: Cardinal): PIFTypeRec; |
Return type no L
function GetVar(const Name: string): Cardinal; |
Get variable that has been compiled with a name
function GetVar2(const Name: string): PIFVariant; |
Get variable compiled with a name as a variant
function GetVarNo(C: Cardinal): PIFVariant; |
Get variable no (C)
function ImportProc(const Name: ShortString; var proc: TIFProcRec): Boolean; Virtual; |
ImportProc is called when the script needs to import an external function
function IsValidResource(Proc, P: Pointer): Boolean; |
Check if P is a valid resource for Proc
function LoadData(const s: string): TIFError; Virtual; |
Load data into the script engine
procedure Pause; Virtual; |
Pause the script engine
function RegisterFunctionName(const Name: ShortString; ProcPtr: TIFProc; Ext1, Ext2: Pointer): PProcRec; |
Register a function by name
procedure RunLine; virtual; |
RunLine function
function RunProc(Params: TIfList; ProcNo: Cardinal): Boolean; |
Use RunProc to call a script function. The Params will not be freed after the call
function RunScript: Boolean; |
Run the current script
procedure Stop; Virtual; |
Stop the script engine
CallCleanup: Boolean; |
Set CallCleanup to false when you don't want the script engine to cleanup all variables after RunScript
ExceptionCode: TIFError; |
Contains the last error code
ExceptionPos: Cardinal; |
Contains the last error position
ExceptionProcNo: Cardinal; |
Contains the last error proc
ExceptionString: string; |
Contains the last error string
Id: Pointer; |
Optional tag of the script engine
MemoryManager: Pointer; |
The MemoryManager used when calling CreateVariant/DestroyVariant
OnRunLine: TIFPSOnLineEvent; |
The OnRunLine event is called after each executed script line
Status: TIFStatus; |
Status contains the current status of the scriptengine