IVarInvokeable
[Properties (by Name)][Methods (by Name)][Events (by Name)]
Interface needed for custom variants that need to implement dynamic properties and methods
Declaration
Source position: variants.pp line 214
Type
IVarInvokeable = interface ['{1CB65C52-BBCB-41A6-9E58-7FB916BEEB2D}']
function DoFunction(var Dest: tvardata; const V: tvardata;
const Name: string; const Arguments: TVarDataArray)
: Boolean;
function DoProcedure(const V: tvardata; const Name: string;
const Arguments: TVarDataArray) : Boolean;
function GetProperty(var Dest: tvardata; const V: tvardata;
const Name: string) : Boolean;
function SetProperty(var V: tvardata; const Name: string;
const Value: tvardata) : Boolean;
end
;
Description
IVarInvokeable must be implemented by the TCustomVariantType descendent if the custom variant needs to implement dynamic properties and methods.
IVarInvokeable has four functions that must be implemented. Any of these functions can be called whenever a custom variant's method is invoked or a property of the variant is read or written using DispInvoke.
The TCustomVariantType descendent TInvokeableVariantType implements the needed DispInvoke to call the IVarInvokeable interface, so you can descend from that type instead when creating a new custom variant type and override the needed functions.
Members
Member | Type | Visibility | Description |
---|---|---|---|
DoFunction | Method | default | Called for methods that return a result (functions) |
DoProcedure | Method | default | Called for methods that do not return a result (procedures) |
GetProperty | Method | default | Called when a property must be read |
SetProperty | Method | default | Called when a property must be set |
Inheritance
Class | Description |
---|---|
IVarInvokeable | Interface needed for custom variants that need to implement dynamic properties and methods |
See also
Name | Description |
---|---|
TCustomVariantType | Base class for a custom variant type |
TInvokeableVariantType | TCustomVariantType descendent that implements DispInvoke |