mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 22:50:24 +02:00
* Introduce AsOrdinal. Patch by Lipinast Lekrisov
This commit is contained in:
parent
5a6b4ed8e4
commit
6c1c3e35ee
@ -71,6 +71,7 @@ type
|
||||
TRttiIndexedProperty = class;
|
||||
TRttiField = Class;
|
||||
TRttiProperty = class;
|
||||
TRttiOrdinalType = class;
|
||||
TRttiInstanceType = class;
|
||||
TRttiRecordType = class;
|
||||
|
||||
@ -361,6 +362,7 @@ type
|
||||
FProperties : TRttiPropertyArray;
|
||||
FIndexedProperties : TRttiIndexedPropertyArray;
|
||||
function GetAsInstance: TRttiInstanceType;
|
||||
function GetAsOrdinal: TRttiOrdinalType;
|
||||
function GetAsRecord: TRttiRecordType;
|
||||
protected
|
||||
FTypeData: PTypeData;
|
||||
@ -401,6 +403,7 @@ type
|
||||
property BaseType: TRttiType read GetBaseType;
|
||||
property Handle: PTypeInfo read FTypeInfo;
|
||||
property AsInstance: TRttiInstanceType read GetAsInstance;
|
||||
property AsOrdinal: TRttiOrdinalType read GetAsOrdinal;
|
||||
property AsRecord: TRttiRecordType read GetAsRecord;
|
||||
property TypeKind: TTypeKind read GetTypeKind;
|
||||
property TypeSize: integer read GetTypeSize;
|
||||
@ -7183,6 +7186,11 @@ begin
|
||||
result := TRttiInstanceType(self);
|
||||
end;
|
||||
|
||||
function TRttiType.GetAsOrdinal: TRttiOrdinalType;
|
||||
begin
|
||||
Result := TRttiOrdinalType(Self);
|
||||
end;
|
||||
|
||||
function TRttiType.GetAsRecord: TRttiRecordType;
|
||||
begin
|
||||
result := TRttiRecordType(self);
|
||||
|
Loading…
Reference in New Issue
Block a user