* Introduce TRttiMethodType.GetMethodKind. Patch by Lipinast Lekrisov

This commit is contained in:
Michaël Van Canneyt 2024-12-17 18:20:32 +01:00
parent 4a596a2de3
commit 0acff7a7c1

View File

@ -678,11 +678,14 @@ type
function ToString : string; override;
end;
{ TRttiMethodType }
TRttiMethodType = class(TRttiInvokableType)
private
FCallConv: TCallConv;
FReturnType: TRttiType;
FParams, FParamsAll: TRttiParameterArray;
function GetMethodKind: TMethodKind;
protected
function GetParameters(aWithHidden: Boolean): TRttiParameterArray; override;
function GetCallingConvention: TCallConv; override;
@ -690,6 +693,7 @@ type
function GetFlags: TFunctionCallFlags; override;
public
function Invoke(const aCallable: TValue; const aArgs: array of TValue): TValue; override;
property MethodKind: TMethodKind read GetMethodKind;
function ToString: string; override;
end;
@ -5870,6 +5874,11 @@ end;
{ TRttiMethodType }
function TRttiMethodType.GetMethodKind: TMethodKind;
begin
Result := FTypeData^.MethodKind;
end;
function TRttiMethodType.GetParameters(aWithHidden: Boolean): TRttiParameterArray;
type
TParamInfo = record