Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Variables
Constants
Functions and Procedures
Identifiers

Unit ifps3

Description

Execute part of the script engine

The execute part of the script engine

Classes, Interfaces and Objects

NameDescription
Class EIFPS3Exception  
Class TIFPSExec  
Class TIFPSRuntimeClass  
Class TIFPSRuntimeClassImporter  

Functions and Procedures

Overview

procedure ChangeVariantType(MM: Pointer; p: PIFVariant; n: PIFTypeRec);
function ClassResourceFree(FMode: TVRFMode; P, IntoP: PIFVariant): Boolean;
function CreateVariant(MM: Pointer; n: PIFTypeRec): PIfVariant;
procedure DisposeVariant(MM: Pointer; p: PIfVariant);
procedure FreePIFVariantList(MM: Pointer; List: TIfList);
function GetIFPSArrayLength(SE: TIFPSExec; p: PIfVariant): Cardinal;
function GetInt(Src: PIfVariant; var s: Boolean): Longint;
function GetMethodInfoRec(SE: TIFPSExec; ProcNo: Cardinal): Pointer;
function GetReal(Src: PIfVariant; var s: Boolean): Extended;
function GetString(Src: PIfVariant; var s: Boolean): string;
function GetUInt(Src: PIfVariant; var s: Boolean): Cardinal;
function IFPSVariantToString(p: PIfVariant; const ClassProperties: string): string;
function LGetInt(List: TIfList; Pos: Cardinal): Longint;
function LGetReal(List: TIfList; Pos: Cardinal): Extended;
function LGetStr(List: TIfList; Pos: Cardinal): string;
function LGetUInt(List: TIfList; Pos: Cardinal): Cardinal;
procedure LSetInt(List: TIfList; Pos: Cardinal; Val: Longint);
procedure LSetReal(List: TIfList; Pos: Cardinal; const Val: Extended);
procedure LSetStr(List: TIfList; Pos: Cardinal; const s: string);
procedure LSetUInt(List: TIfList; Pos: Cardinal; Val: Cardinal);
function MkMethod(FSE: TIFPSExec; No: Cardinal): TMethod;
procedure MyAllMethodsHandler;
procedure RegisterClassLibraryRuntime(SE: TIFPSExec; Importer: TIFPSRuntimeClassImporter);
function RP(P: PIFVariant): PIFVariant;
function SetIFPSArrayLength(SE: TIFPSExec; p: PIfVariant; NewLength: Cardinal): Boolean;
procedure SetVariantToClass(V: PIFVariant; Cl: TObject);
function TIFErrorToString(x: TIFError; const Param: string): string;
function VGetFloat(P: PIFVariant): Extended;
function VGetInt(P: PIFVariant): Longint;
function VGetInt64(P: PIFVariant): Int64;
function VGetString(P: PIFVariant): string;
procedure VSetFloat(P: PIFVariant; const d: Extended);
procedure VSetInt(P: PIFVariant; const d: Longint);
procedure VSetInt64(P: PIFVariant; const d: Int64);
procedure VSetString(P: PIFVariant; const d: string);

Description

procedure ChangeVariantType(MM: Pointer; p: PIFVariant; n: PIFTypeRec);

 

function ClassResourceFree(FMode: TVRFMode; P, IntoP: PIFVariant): Boolean;

Internal Function: Class Resource Free function for all class instance pointers

function CreateVariant(MM: Pointer; n: PIFTypeRec): PIfVariant;

Create a variant

procedure DisposeVariant(MM: Pointer; p: PIfVariant);

Decrease the variant's refcount and free it if it's 0

procedure FreePIFVariantList(MM: Pointer; List: TIfList);

Free a list of variants and also the list

function GetIFPSArrayLength(SE: TIFPSExec; p: PIfVariant): Cardinal;

Get the length of a variant array

function GetInt(Src: PIfVariant; var s: Boolean): Longint;

Get the value of a variant (as Longint)

function GetMethodInfoRec(SE: TIFPSExec; ProcNo: Cardinal): Pointer;

Internal Function: Returns the Data pointer of a TMethod for a ProcNo

function GetReal(Src: PIfVariant; var s: Boolean): Extended;

Get the value of a variant (as Extended)

function GetString(Src: PIfVariant; var s: Boolean): string;

Get the value of a variant (as String)

function GetUInt(Src: PIfVariant; var s: Boolean): Cardinal;

Get the value of a variant (as Cardinal/Longword)

function IFPSVariantToString(p: PIfVariant; const ClassProperties: string): string;

Convert a variant to a string

function LGetInt(List: TIfList; Pos: Cardinal): Longint;

Get the value of an Integer variant in a list

function LGetReal(List: TIfList; Pos: Cardinal): Extended;

Get the value of a real variant in a list

function LGetStr(List: TIfList; Pos: Cardinal): string;

Get the value of a string variant in a list

function LGetUInt(List: TIfList; Pos: Cardinal): Cardinal;

Get the value of an unsigned integer variant in a list

procedure LSetInt(List: TIfList; Pos: Cardinal; Val: Longint);

Set the value of an Integer variant in a list

procedure LSetReal(List: TIfList; Pos: Cardinal; const Val: Extended);

Set the value of a real variant in a list

procedure LSetStr(List: TIfList; Pos: Cardinal; const s: string);

Set the value of a string variant in a list

procedure LSetUInt(List: TIfList; Pos: Cardinal; Val: Cardinal);

Set the value of an unsigned integer variant in a list

function MkMethod(FSE: TIFPSExec; No: Cardinal): TMethod;

Make a method pointer of a script engine + function number, not that this doesn't work unless the proc was exported with ExportMode etExportDecl

procedure MyAllMethodsHandler;

Internal function: Script Event Handler
Supported Parameter Types:
u8,s8,u16,s16,u32,s32,s64,single,double,extended,class,variant,string,char
Supported Result Types:
u8,s8,u16,s16,u32,s32,string,variant

procedure RegisterClassLibraryRuntime(SE: TIFPSExec; Importer: TIFPSRuntimeClassImporter);

Register the classes at runtime

function RP(P: PIFVariant): PIFVariant;

 

function SetIFPSArrayLength(SE: TIFPSExec; p: PIfVariant; NewLength: Cardinal): Boolean;

Set the length of a variant array

procedure SetVariantToClass(V: PIFVariant; Cl: TObject);

Set a runtime variant

function TIFErrorToString(x: TIFError; const Param: string): string;

Convert an error to a string

function VGetFloat(P: PIFVariant): Extended;

 

function VGetInt(P: PIFVariant): Longint;

 

function VGetInt64(P: PIFVariant): Int64;

 

function VGetString(P: PIFVariant): string;

 

procedure VSetFloat(P: PIFVariant; const d: Extended);

 

procedure VSetInt(P: PIFVariant; const d: Longint);

 

procedure VSetInt64(P: PIFVariant; const d: Int64);

 

procedure VSetString(P: PIFVariant; const d: string);

 

Types

NameDescription
PBTArray pbtrecord PBTRecord
pbtrecord PBTRecord is a pointer to a TbtRecord record
PBTReturnAddress TBTReturnAddress PBTReturnAddress is a pointer to an TBTReturnAddress record
PByteArray Pointer to array of bytes
PDWordArray Pointer to array of words
PIFProcRec TIFProcRec PIFProcRec is a pointer to a TIProcRec record
PIFPSResource TIFPSResource PIFPSResource is a pointer to a TIFPSResource record
PIFRecordType PIFRecordType is a pointer to record information
PIFSetTypeInfo Ext is used in a typecopy or array to store more information
PIFStaticArrayInfo (abitsize div 8) + (abitsize and 7 > 0 ? 1 : 0)
PIFTypeRec Pointer to TIFTypeRec
PIFVariant TIFVariant PIFVariant is a pointer to a TIFVariant
PPIFVariant PIFVariant PPIFVariant is a pointer to a PIFVariant
PProcRec TProcRec PProcRec is pointer to a TProcRec record
PResourcePtrSupportFuncs  
TBTArray TbtRecord tbtrecord
TbtRecord TbtRecord is used to store the fields in a record or array
TBTReturnAddress TBTReturnAddress is a record used to store return information
TByteArray Array of bytes
TDWordArray Array of dwords
TIFArrayType TIFArrayType is a pointer to an other type
TIFError TIFError contains all possible errors
TIFFreeProc PProcRec FreeProc is called when a PProcRec is freed
TIFProc TIFPSExec PIFProcRec TIfList TIFProc is is the procedure definition of all external functions
TIFProcRec TIFProcRec contains a currently used internal or external function
TIFPSCallingConvention Alias to TIFPSCallingConvention
TIFPSOnLineEvent See TIFPSExec.OnRunLine
TIFPSOnSpecialProcImport See TIFPSExec.AddSpecialProcImport
TIFPSResource A resource in IFPS3 is stored as a pointer to the proc and a tag (p)
TIFPSResourceFreeProc TIFPSResourceFreeProc is called when a resource needs to be freed
TIFRecordType TIFRecordType is used to store information about records
TIFSetTypeInfo  
TIFStaticArrayInfo  
TIFStatus The current status of the script
TIFTypeRec TIFTypeRec is used to store all types inside the script
TIFVariant TIFvariant is variant used for storing all variables used by the script engine
TProcRec TProcrec is used to store an external function that could be used by the script executer
TResourcePtrSupportFuncs  
TResourcePtrToStrProc  
TResultToRsourcePtr  
TRPSResultMethod  
TRPSupports  
TVariantResourceFreeProc TVRMode TVariantResourceFreeProc is used when the scriptengine needs to free or duplicate a resourcepointer
TVarResourcePtrToStrProc  
TVRFMode TVariantResourceFreeProc TVRMode is used to when the scriptengine needs to free or duplicate a resourcepointer

Constants

NameDescription
cdCdecl Alias to ifps3utl.cdCdecl
cdPascal Alias to ifps3utl.cdPascal
cdRegister Alias to ifps3utl.cdRegister
cdStdCall Alias to ifps3utl.cdStdCall
ENoError Makes sure that P is not a pointer.
InvalidVal Invalid results

Author

Carlo Kok <ck@carlo-kok.com>