[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
List to manage object instances.
Source position: contnrs.pp line 74
type TObjectList = class(TList) |
||
public |
||
constructor Create(); |
|
Create a new object list. |
function Add(); |
|
Add an object to the list. |
function Extract(); |
|
Extract an object from the list. |
function Remove(); |
|
Remove (and possibly free) an element from the list. |
function IndexOf(); |
|
Search for an object in the list |
function FindInstanceOf(); |
|
Search for an instance of a certain class |
procedure Insert(); |
|
Insert an object in the list. |
function First; |
|
Return the first non-nil object in the list |
function Last; |
|
Return the last non-nil object in the list. |
property OwnsObjects: Boolean; [rw] |
|
Should the list free elements when they are removed. |
|
Indexed access to the elements of the list. |
|
end; |
|
List to manage object instances. |
|
| | ||
| | ||
TObjectList is a TList descendent which has as the default array property TObjects instead of pointers. By default it also manages the objects: when an object is deleted or removed from the list, it is automatically freed. This behaviour can be disabled when the list is created.
In difference with TFPObjectList, TObjectList offers a notification mechanism of list change operations: insert, delete. This slows down bulk operations, so if the notifications are not needed, TFPObjectList may be more appropriate.
|
TFPList descendent which manages objects. |
|
|
List to manage component instances. |
|
|
List of classes. |