type TIFPS3CompExec = class(TComponent)
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
function AddFunction(Ptr: Pointer; const Decl: string): Boolean; |
![]() |
function AddFunctionEx(Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean; |
![]() |
function AddMethod(Slf, Ptr: Pointer; const Decl: string): Boolean; |
![]() |
function AddMethodEx(Slf, Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean; |
![]() |
function AddRegisteredVariable(const VarName, VarType: string): Boolean; |
![]() |
function Compile: Boolean; |
![]() |
function CompilerErrorToStr(I: Longint): string; |
![]() |
function Execute: Boolean; |
![]() |
procedure GetCompiled(var data: string); |
![]() |
function GetVariable(const Name: string): PIFVariant; |
![]() |
procedure SetCompiled(const Data: string); |
![]() |
function SetVarToInstance(const VarName: string; cl: TObject): Boolean; |
![]() |
function TranslatePositionPos(Proc, Position: Cardinal; var Pos: Cardinal): Boolean; |
![]() |
function TranslatePositionRC(Proc, Position: Cardinal; var Row, Col: Cardinal): Boolean; |
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
function AddFunction(Ptr: Pointer; const Decl: string): Boolean; |
Add a function to the script engine, with cdRegister
as a calling convention
![]() |
function AddFunctionEx(Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean; |
Add a function to the script engine
![]() |
function AddMethod(Slf, Ptr: Pointer; const Decl: string): Boolean; |
Add a method to the script engine, with cdRegister
as a calling convention
![]() |
function AddMethodEx(Slf, Ptr: Pointer; const Decl: string; CallingConv: TDelphiCallingConvention): Boolean; |
Add a method to the script engine, slf should be the self pointer, ptr should be the procedural pointer, for example: Form1.Show
AddMethod(Form1, WARNING: @TForm1.Show, 'procedure Show;', cdRegister);
![]() |
function AddRegisteredVariable(const VarName, VarType: string): Boolean; |
Add a variable to the script engine that can be used at runtime with the GetVariable
function
![]() |
function Compile: Boolean; |
Compile the script
![]() |
function CompilerErrorToStr(I: Longint): string; |
Convert a compiler message to a string
![]() |
function Execute: Boolean; |
Execute the compiled script
![]() |
procedure GetCompiled(var data: string); |
Returns the compiled data, first call Compile
![]() |
function GetVariable(const Name: string): PIFVariant; |
Returns the variable with the name Name
![]() |
procedure SetCompiled(const Data: string); |
Load compiled data in the script engine
![]() |
function SetVarToInstance(const VarName: string; cl: TObject): Boolean; |
Set a variable to an object instance
![]() |
function TranslatePositionPos(Proc, Position: Cardinal; var Pos: Cardinal): Boolean; |
Translate a Proc+ByteCode position into an offset in the script
![]() |
function TranslatePositionRC(Proc, Position: Cardinal; var Row, Col: Cardinal): Boolean; |
Translate a Proc+ByteCode position into an row/col in the script
![]() |
property About: string; |
![]() |
property Comp: TIFPSPascalCompiler; |
![]() |
property CompilerMessageCount: Longint; |
![]() |
property CompilerMessages[i: Longint]: TIFPSPascalCompilerMessage; |
![]() |
property CompilerOptions: TIFPS3CompOptions; |
![]() |
property Exec: TIFPSDebugExec; |
![]() |
property ExecErrorByteCodePosition: Cardinal; |
![]() |
property ExecErrorCode: TIFError; |
![]() |
property ExecErrorCol: Cardinal; |
![]() |
property ExecErrorParam: string; |
![]() |
property ExecErrorPosition: Cardinal; |
![]() |
property ExecErrorProcNo: Cardinal; |
![]() |
property ExecErrorRow: Cardinal; |
![]() |
property ExecErrorToString: string; |
![]() |
property OnAfterExecute: TIFPS3CompExecEvent; |
![]() |
property OnCompile: TIFPS3CompExecEvent; |
![]() |
property OnCompImport: TIFPS3ClOnCompImport; |
![]() |
property OnExecImport: TIFPS3ClOnExecImport; |
![]() |
property OnExecute: TIFPS3CompExecEvent; |
![]() |
property OnLine: TNotifyEvent; |
![]() |
property Running: Boolean; |
![]() |
property Script: TStrings; |
![]() |
property UseDebugInfo: Boolean; |
![]() |
property About: string; |
About this script engine
![]() |
property Comp: TIFPSPascalCompiler; |
PascalCompiler object
![]() |
property CompilerMessageCount: Longint; |
Returns the number of compiler messages
![]() |
property CompilerMessages[i: Longint]: TIFPSPascalCompilerMessage; |
Return compiler message number I
![]() |
property CompilerOptions: TIFPS3CompOptions; |
Compiler options
![]() |
property Exec: TIFPSDebugExec; |
Exec object
![]() |
property ExecErrorByteCodePosition: Cardinal; |
The bytecode offset the runtime error occured in
![]() |
property ExecErrorCode: TIFError; |
Runtime errors: error code
![]() |
property ExecErrorCol: Cardinal; |
The Col in the script the error occured in, does not work when DebugInfo = False
![]() |
property ExecErrorParam: string; |
Runtime errors: more information for th eerror
![]() |
property ExecErrorPosition: Cardinal; |
The offset in the script the error occured in, does not work when DebugInfo = False
![]() |
property ExecErrorProcNo: Cardinal; |
The procedure number the runtime error occured in
![]() |
property ExecErrorRow: Cardinal; |
The Row in the script the error occured in, does not work when DebugInfo = False
![]() |
property ExecErrorToString: string; |
Convert an errorcode + errorparam to a string
![]() |
property OnAfterExecute: TIFPS3CompExecEvent; |
OnAfterExecute is called when the script is done executing
![]() |
property OnCompile: TIFPS3CompExecEvent; |
OnCompile event is called when the script is about to be compiled
![]() |
property OnCompImport: TIFPS3ClOnCompImport; |
OnCompImport is called when you can import your functions and classes into the compiler
![]() |
property OnExecImport: TIFPS3ClOnExecImport; |
OnCompImport is called when you can import your functions and classes into the exec
![]() |
property OnExecute: TIFPS3CompExecEvent; |
OnExecute event is called when the script is about to the executed, useful for changing variables within the script
![]() |
property OnLine: TNotifyEvent; |
OnLine event, is called after each bytecode position, useful for checking messages to make sure longer scripts don't block the application
![]() |
property Running: Boolean; |
Is the script running now?
![]() |
property Script: TStrings; |
The current script
![]() |
property UseDebugInfo: Boolean; |
UseDebugInfo should be true when you want to use debug information, like position information in the script, it does make the executing a bit slower