TFPObjectList class
TFPList descendent which manages objects.Declaration
TFPObjectList = class(TObject)Inheritance
- TFPObjectList
- TObject
Description
TFPObjectList is a
TFPList
based list 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 TObjectList, TFPObjectList offers
no notification mechanism of list operations, allowing it to be faster than
TObjectList. For the same reason, it is also not a descendent of
TFPList (although it uses one internally).
See also
Properties
Capacity | public | Capacity of the list. |
Count | public | Number of elements in the list. |
OwnsObjects | public | Should the list free elements when they are removed. |
Items | public | Indexed access to the elements of the list. |
List | public | Internal list used to keep the objects. |
Methods
GetItem | protected | |
SetItem | protected | |
SetCapacity | protected | |
GetCapacity | protected | |
Create | public | Create a new object list. |
Destroy | public | Clears the list and destroys the list instance. |
Clear | public | Clear all elements in the list. |
Add | public | Add an object to the list. |
Delete | public | Delete an element from the list. |
Exchange | public | Exchange the location of two objects. |
Expand | public | Expand the capacity of the list. |
Extract | public | Extract an object from the list. |
Remove | public | Remove an item 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 a new 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. |
Move | public | Move an object to another location in the list. |
Assign | public | Copy the contents of a list. |
Pack | public | Remove all Nil references from the list. |
Sort | public | Sort the list of objects. |
ForEachCall | public | For each object in the list, call a method or procedure, passing it the object. |
Inherited
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.
