| Class TCollection (unit Collect) |
TObject
| Constructors |
constructor create(aLimit, aDelta : integer);| Functions |
procedure AtFree(Index: Integer);
procedure AtInsert( Index : integer; Item : Pointer);
procedure Clear(Item: Pointer);
procedure Delete( Item : Pointer);move compensates for overlaps
procedure DeleteAll;
destructor destroy;
function FirstThat( Test : Pointer) : Pointer;
procedure ForEach( Action : Pointer);
procedure FreeAll;
function IndexOf( Item : Pointer) : integer;
procedure Insert( Item : Pointer);
function LastThat( Test : Pointer) : Pointer;
procedure Pack;
procedure SetLimit( aLimit : integer);
procedure AtDelete (Index : integer);
procedure Error (Code,Info : Integer);
procedure FreeItem (Item : Pointer);
function At( Index : integer) : Pointer;
procedure AtPut( Index : integer; Item : Pointer);| Properties |
property Items : pointer| Events |
| Variables |
Count : integer;
Delta : integer;
It : PPointerList;
Limit : integer;| Constructors |
constructor create(aLimit, aDelta : integer);Current Number of Items
| Functions |
procedure AtFree(Index: Integer);deletes and disposes Item at specified position
procedure AtInsert( Index : integer; Item : Pointer);inserts Item at specified position
procedure Clear(Item: Pointer);formerly Free, renamed to Clear to avoid bypassing inherited TObject.Free; deletes and disposes Item
procedure Delete( Item : Pointer);deletes Item
move compensates for overlaps
procedure DeleteAll;deletes all Items without disposing them
destructor destroy;before deallocating object it disposes all items and the storage array
function FirstThat( Test : Pointer) : Pointer;finds first item that satisfies condition specified in function Test( Item: pointer): boolean
procedure ForEach( Action : Pointer);calls procedure Action( Item: pointer) for each item in collection
procedure FreeAll;disposes all items; set counter to zero
function IndexOf( Item : Pointer) : integer;finds position of Item using a linear search
procedure Insert( Item : Pointer);inserts Item at the end of collection
function LastThat( Test : Pointer) : Pointer;finds last item that satisfies condition specified in function Test( Item: pointer): boolean
procedure Pack;packs collection by removing nil Items
procedure SetLimit( aLimit : integer);expands array of pointers
procedure AtDelete (Index : integer);Number of items by which the collection grows when full} { deletes item at index position
procedure Error (Code,Info : Integer);generates CollException
procedure FreeItem (Item : Pointer);destroys specified Item; override this method if Item is not a descendant of TObject
function At( Index : integer) : Pointer;return item at index position
procedure AtPut( Index : integer; Item : Pointer);replace item at index position
| Properties |
property Items : pointerdirect access to items through position
| Events |
| Variables |
Count : integer;
Delta : integer;Current Allocated size of array
It : PPointerList;
Limit : integer;array of pointers