mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 11:38:19 +02:00
* Add GetTypeName, GetPropName
This commit is contained in:
parent
2484efc2e7
commit
1a32b53f2c
@ -1150,6 +1150,7 @@ unit TypInfo;
|
||||
|
||||
// general property handling
|
||||
Function GetTypeData(TypeInfo : PTypeInfo) : PTypeData;
|
||||
Function GetTypeName(aTypeInfo : PTypeInfo) : String;
|
||||
Function AlignTypeData(p : Pointer) : Pointer; inline;
|
||||
Function AlignTParamFlags(p : Pointer) : Pointer; inline;
|
||||
Function AlignPTypeInfo(p : Pointer) : Pointer; inline;
|
||||
@ -1161,6 +1162,7 @@ Function GetPropInfo(Instance: TObject; const PropName: string): PPropInfo;
|
||||
Function GetPropInfo(Instance: TObject; const PropName: string; AKinds: TTypeKinds): PPropInfo;
|
||||
Function GetPropInfo(AClass: TClass; const PropName: string): PPropInfo;
|
||||
Function GetPropInfo(AClass: TClass; const PropName: string; AKinds: TTypeKinds): PPropInfo;
|
||||
Function GetPropName(aPropInfo : PPropInfo) : string;
|
||||
|
||||
Function FindPropInfo(Instance: TObject; const PropName: string): PPropInfo;
|
||||
Function FindPropInfo(Instance: TObject; const PropName: string; AKinds: TTypeKinds): PPropInfo;
|
||||
@ -1757,6 +1759,11 @@ begin
|
||||
ArrayToSet(PropInfo^.PropType, Value, Result);
|
||||
end;
|
||||
|
||||
function GetTypeName(aTypeInfo: PTypeInfo): String;
|
||||
begin
|
||||
Result:=aTypeInfo^.Name;
|
||||
end;
|
||||
|
||||
Function AlignTypeData(p : Pointer) : Pointer;
|
||||
{$packrecords c}
|
||||
type
|
||||
@ -1939,6 +1946,11 @@ begin
|
||||
Result:=GetPropInfo(PTypeInfo(AClass.ClassInfo),PropName,AKinds);
|
||||
end;
|
||||
|
||||
function GetPropName(aPropInfo: PPropInfo): string;
|
||||
begin
|
||||
Result:=aPropInfo^.Name;
|
||||
end;
|
||||
|
||||
|
||||
Function GetPropInfo(Instance: TObject; const PropName: string; AKinds: TTypeKinds) : PPropInfo;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user