[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#rtl) |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class to manage collections of named objects.
Source position: classesh.inc line 380
type TCollection = class(TPersistent) |
||
public |
||
constructor Create(); |
|
Creates a new collection. |
destructor Destroy; override; |
|
Destroys the collection and frees all the objects it manages. |
function Owner; |
|
Owner of the collection. |
function Add; |
|
Creates and adds a new item to the collection. |
procedure Assign(); override; |
|
Assigns one collection to another. |
procedure BeginUpdate; virtual; |
|
Start an update batch. |
procedure Clear; |
|
Removes all items from the collection. |
procedure EndUpdate; virtual; |
|
Ends an update batch. |
procedure Delete(); |
|
Delete an item from the collection. |
function Insert(); |
|
Insert an item in the collection. |
function FindItemID(); |
|
Searches for an Item in the collection, based on its TCollectionItem.ID property. |
property Count: Integer; [r] |
|
Number of items in the collection. |
property ItemClass: TCollectionItemClass; [r] |
|
Class pointer for each item in the collection. |
property Items: TCollectionItem; [rw] |
|
Indexed array of items in the collection. |
end; |
|
Base class to manage collections of named objects. |
|
| | ||
|
Base class for streaming system and persistent properties. |
|
| | ||
TObject |
TCollection implements functionality to manage a collection of named objects. Each of these objects needs to be a descendent of the TCollectionItem class. Exactly which type of object is managed can be seen from the TCollection.ItemClass property.
Normally, no TCollection is created directly. Instead, a descendents of TCollection and TCollectionItem are created as a pair.
|
Basic object that is managed by a TCollection class. |
No notes exist for this page yet.