TObjectList class
List to manage object instances.
Declaration
TObjectList = class(TList)Inheritance
Descends from it: TComponentList
Description
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.
See also
Properties
OwnsObjects | public | Should the list free elements when they are removed. |
Items | public | Indexed access to the elements of the list. |
Methods
Notify | protected | |
GetItem | protected | |
SetItem | protected | |
Create | public | Create a new object list. |
Add | public | Add an object to the list. |
Extract | public | Extract an object from the list. |
Remove | public | Remove (and possibly free) an element from the list. |
IndexOf | public | Search for an object in the list. |
FindInstanceOf | public | Search for an instance of a certain class. |
Insert | public | Insert an object in the list. |
First | public | Return the first non-nil object in the list. |
Last | public | Return the last non-nil object in the list. |
Inherited
From TList (27)
AddList Assign Capacity Clear Contains Count Delete Destroy Error Exchange Expand FPOAttachObserver FPODetachObserver FPONotifyObservers Get GetCapacity GetCount GetEnumerator GetList Grow List Move Pack Put SetCapacity SetCount Sort
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
