[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class to manage collections of named objects.
Source position: classesh.inc line 469
type TCollection = class(TPersistent) |
||
protected |
||
function GetAttrCount; dynamic; |
|
Returns the count of attributes associated with each item. |
function GetAttr(); dynamic; |
|
Returns an attribute of the collection. |
function GetItemAttr(); dynamic; |
|
Returns the attributes of an item. |
procedure Changed; |
|
Procedure called if an item is added to or removed from the collection. |
function GetItem(); |
|
Read handler for the TCollection.Items property. |
procedure SetItem(); |
|
Write handler for the TCollection.Items property. |
procedure SetItemName(); virtual; |
|
Virtual method to set the name of the specified item |
procedure SetPropName; virtual; |
|
Write handler for the TCollection.PropName property |
procedure Update(); virtual; |
|
Hander called when an item in the collection has changed. |
procedure Notify(); virtual; |
||
property PropName: String; [rw] |
|
Name of the property that this collection represents. |
property UpdateCount: Integer; [r] |
||
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 GetEnumerator; |
|
Create an IEnumerator instance |
function GetNamePath; override; |
|
Overrides TPersistent.GetNamePath to return a proper pathname. |
function Insert(); |
|
Insert an item in the collection. |
function FindItemID(); |
|
Searches for an Item in the collection, based on its TCollectionItem.ID property. |
procedure Exchange(); |
|
Exchange 2 items in the collection |
procedure Sort(); |
|
Sort the items in the collection |
|
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. |
|
| | ||
|
Base class of all classes. |
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. |
lazarus-ccr.sourceforge.net |