TCollection class
Base class to manage collections of named objects.
Declaration
TCollection = class(TPersistent)Inheritance
- TCollection
- TPersistent
- TObject
Descends from it: TCheckConstraints TConditionalStrings TCookies TCoolBands TCustomWebActions TDaemonDefs TDependencies TDialogButtons TFPExprIdentifierDefs TGridColumns THeaderSections THTTPRouteList TIniCollection TLCLCollection TListColumns TMediatorDefs TMediatorFieldInfoList TMimeItems TModuleFactory TNamedCollection TNotifyEventCollection TOwnedCollection TParams TPropertyMap TRequestInterceptorList TSortedCollection TSqlObjectIdentifierList TStatusPanels TStreamCollection TTemplateVars TUploadedFiles TZipFileEntries
Description
TCollection implements functionality to manage a collection
of named objects. Each of these objects needs to be a descendant of the
TCollectionItem class. Exactly which type of object is managed
can be seen from the
ItemClass property.
Normally, no TCollection is created directly. Instead, a
descendants of TCollection and TCollectionItem
are created as a pair.
See also
Properties
PropName | protected | Name of the property that this collection represents. |
UpdateCount | protected | |
Count | public | Number of items in the collection. |
ItemClass | public | Class pointer for each item in the collection. |
Items | public | Indexed array of items in the collection. |
Methods
GetAttrCount | protected | Returns the count of attributes associated with each item. |
GetAttr | protected | Returns an attribute of the collection. |
GetItemAttr | protected | Returns the attributes of an item. |
Changed | protected | Procedure called if an item is added to or removed from the collection. |
GetItem | protected | Read handler for the property. |
SetItem | protected | Write handler for the property. |
SetItemName | protected | Virtual method to set the name of the specified item. |
SetPropName | protected | Write handler for the property. |
Update | protected | Handler called when an item in the collection has changed. |
Notify | protected | |
Create | public | Creates a new collection. |
Destroy | public | Destroys the collection and frees all the objects it manages. |
Owner | public | Owner of the collection. |
Add | public | Creates and adds a new item to the collection. |
Assign | public | Assigns one collection to another. |
BeginUpdate | public | Start an update batch. |
Clear | public | Removes all items from the collection. |
EndUpdate | public | Ends an update batch. |
Delete | public | Delete an item from the collection. |
GetEnumerator | public | Create an IEnumerator instance. |
GetNamePath | public | Overrides to return a proper pathname. |
Insert | public | Insert an item in the collection. |
FindItemID | public | Searches for an Item in the collection, based on its property. |
Exchange | public | Exchange 2 items in the collection. |
Move | public | Move an item in the collection. |
Sort | public | Sort the items in the collection. |
Inherited
From TPersistent (6)
AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers GetOwner
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.
