avglvltree: changed associative arrays Count to SizeInt

git-svn-id: trunk@36129 -
This commit is contained in:
mattias 2012-03-17 18:00:17 +00:00
parent 0a38a4d2ea
commit 9f1c3de44f

View File

@ -65,7 +65,7 @@ type
function MoveNext: Boolean; function MoveNext: Boolean;
property Current: TAvgLvlTreeNode read FCurrent; property Current: TAvgLvlTreeNode read FCurrent;
property LowToHigh: boolean read FLowToHigh; property LowToHigh: boolean read FLowToHigh;
end; end;
{ TAvgLvlTree } { TAvgLvlTree }
@ -152,7 +152,7 @@ type
TPointerToPointerTree = class TPointerToPointerTree = class
private private
FItems: TAvgLvlTree; FItems: TAvgLvlTree;
function GetCount: Integer; function GetCount: SizeInt;
function GetValues(const Key: Pointer): Pointer; function GetValues(const Key: Pointer): Pointer;
procedure SetValues(const Key: Pointer; const AValue: Pointer); procedure SetValues(const Key: Pointer; const AValue: Pointer);
function FindNode(const Key: Pointer): TAvgLvlTreeNode; function FindNode(const Key: Pointer): TAvgLvlTreeNode;
@ -167,7 +167,7 @@ type
function GetLast(out Key, Value: Pointer): Boolean; function GetLast(out Key, Value: Pointer): Boolean;
function GetNext(const Key: Pointer; out NextKey, NextValue: Pointer): Boolean; function GetNext(const Key: Pointer; out NextKey, NextValue: Pointer): Boolean;
function GetPrev(const Key: Pointer; out PrevKey, PrevValue: Pointer): Boolean; function GetPrev(const Key: Pointer; out PrevKey, PrevValue: Pointer): Boolean;
property Count: Integer read GetCount; property Count: SizeInt read GetCount;
property Values[const Key: Pointer]: Pointer read GetValues write SetValues; default; property Values[const Key: Pointer]: Pointer read GetValues write SetValues; default;
property Tree: TAvgLvlTree read FItems; property Tree: TAvgLvlTree read FItems;
end; end;
@ -221,7 +221,7 @@ type
property CaseSensitive: boolean read FCaseSensitive; property CaseSensitive: boolean read FCaseSensitive;
property Tree: TAvgLvlTree read FTree; // tree of PStringMapItem property Tree: TAvgLvlTree read FTree; // tree of PStringMapItem
function FindNode(const s: string): TAvgLvlTreeNode; function FindNode(const s: string): TAvgLvlTreeNode;
function Count: integer; inline; function Count: SizeInt; inline;
function Equals(OtherTree: TCustomStringMap): boolean; reintroduce; function Equals(OtherTree: TCustomStringMap): boolean; reintroduce;
procedure Assign(Source: TCustomStringMap); virtual; procedure Assign(Source: TCustomStringMap); virtual;
property CompareItemsFunc: TListSortCompare read GetCompareItemsFunc; property CompareItemsFunc: TListSortCompare read GetCompareItemsFunc;
@ -240,7 +240,7 @@ type
property Current: string read GetCurrent; property Current: string read GetCurrent;
end; end;
{ TStringMap } { TStringMap - associative array string to boolean }
TStringMap = class(TCustomStringMap) TStringMap = class(TCustomStringMap)
public public
@ -329,7 +329,7 @@ type
property CompareNameWithItem: TListSortCompare read FCompareNameWithItem; property CompareNameWithItem: TListSortCompare read FCompareNameWithItem;
end; end;
{ TStringToPointerTree - Associative array } { TStringToPointerTree - Associative array from string to pointer }
TStringToPointerItem = record TStringToPointerItem = record
Name: string; Name: string;
@ -1977,7 +1977,7 @@ end;
{ TPointerToPointerTree } { TPointerToPointerTree }
function TPointerToPointerTree.GetCount: Integer; function TPointerToPointerTree.GetCount: SizeInt;
begin begin
Result:=FItems.Count; Result:=FItems.Count;
end; end;
@ -2218,7 +2218,7 @@ begin
end; end;
end; end;
function TCustomStringMap.Count: integer; function TCustomStringMap.Count: SizeInt;
begin begin
Result:=Tree.Count; Result:=Tree.Count;
end; end;