|
@@ -47,7 +47,7 @@ type
|
|
FSize: Integer;
|
|
FSize: Integer;
|
|
function Get(Index: Integer): PPropInfo;
|
|
function Get(Index: Integer): PPropInfo;
|
|
public
|
|
public
|
|
- constructor Create(AObject: TObject; Filter: TTypeKinds);
|
|
|
|
|
|
+ constructor Create(AObject: TObject; Filter: TTypeKinds; Sorted: Boolean = True);
|
|
destructor Destroy; override;
|
|
destructor Destroy; override;
|
|
function Contains(P: PPropInfo): Boolean;
|
|
function Contains(P: PPropInfo): Boolean;
|
|
function Find(const AName: string): PPropInfo;
|
|
function Find(const AName: string): PPropInfo;
|
|
@@ -157,14 +157,14 @@ end;
|
|
|
|
|
|
{ TPropInfoList }
|
|
{ TPropInfoList }
|
|
|
|
|
|
-constructor TPropInfoList.Create(AObject: TObject; Filter: TTypeKinds);
|
|
|
|
|
|
+constructor TPropInfoList.Create(AObject: TObject; Filter: TTypeKinds; Sorted: Boolean);
|
|
begin
|
|
begin
|
|
if AObject <> nil then
|
|
if AObject <> nil then
|
|
begin
|
|
begin
|
|
- FCount := GetPropList(AObject.ClassInfo, Filter, nil);
|
|
|
|
|
|
+ FCount := GetPropList(AObject.ClassInfo, Filter, nil, Sorted);
|
|
FSize := FCount * SizeOf(Pointer);
|
|
FSize := FCount * SizeOf(Pointer);
|
|
GetMem(FList, FSize);
|
|
GetMem(FList, FSize);
|
|
- GetPropList(AObject.ClassInfo, Filter, FList);
|
|
|
|
|
|
+ GetPropList(AObject.ClassInfo, Filter, FList, Sorted);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|