mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:59:19 +02:00
* add TFPHashList.FindIndexOf
git-svn-id: trunk@5906 -
This commit is contained in:
parent
2d7b828694
commit
a526430509
@ -221,6 +221,7 @@ type
|
|||||||
function Extract(item: Pointer): Pointer;
|
function Extract(item: Pointer): Pointer;
|
||||||
function IndexOf(Item: Pointer): Integer;
|
function IndexOf(Item: Pointer): Integer;
|
||||||
function Find(const AName:string): Pointer;
|
function Find(const AName:string): Pointer;
|
||||||
|
function FindIndexOf(const AName:string): Integer;
|
||||||
function FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
function FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
||||||
function Rename(const AOldName,ANewName:string): Integer;
|
function Rename(const AOldName,ANewName:string): Integer;
|
||||||
function Remove(Item: Pointer): Integer;
|
function Remove(Item: Pointer): Integer;
|
||||||
@ -287,6 +288,7 @@ type
|
|||||||
function Remove(AObject: TObject): Integer;
|
function Remove(AObject: TObject): Integer;
|
||||||
function IndexOf(AObject: TObject): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
|
function IndexOf(AObject: TObject): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
|
||||||
function Find(const s:string): TObject; {$ifdef CCLASSESINLINE}inline;{$endif}
|
function Find(const s:string): TObject; {$ifdef CCLASSESINLINE}inline;{$endif}
|
||||||
|
function FindIndexOf(const s:string): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
|
||||||
function FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
function FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
||||||
function Rename(const AOldName,ANewName:string): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
|
function Rename(const AOldName,ANewName:string): Integer; {$ifdef CCLASSESINLINE}inline;{$endif}
|
||||||
function FindInstanceOf(AClass: TClass; AExact: Boolean; AStartAt: Integer): Integer;
|
function FindInstanceOf(AClass: TClass; AExact: Boolean; AStartAt: Integer): Integer;
|
||||||
@ -1364,6 +1366,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFPHashList.FindIndexOf(const AName:string): Integer;
|
||||||
|
var
|
||||||
|
PrevIndex : Integer;
|
||||||
|
begin
|
||||||
|
Result:=InternalFind(FPHash(AName),AName,PrevIndex);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TFPHashList.FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
function TFPHashList.FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
||||||
var
|
var
|
||||||
Index,
|
Index,
|
||||||
@ -1692,6 +1702,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFPHashObjectList.FindIndexOf(const s:string): Integer;
|
||||||
|
begin
|
||||||
|
result:=FHashList.FindIndexOf(s);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TFPHashObjectList.FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
function TFPHashObjectList.FindWithHash(const AName:string;AHash:LongWord): Pointer;
|
||||||
begin
|
begin
|
||||||
Result:=TObject(FHashList.FindWithHash(AName,AHash));
|
Result:=TObject(FHashList.FindWithHash(AName,AHash));
|
||||||
|
Loading…
Reference in New Issue
Block a user