Sign in Join
FPDoc Onlineexperiment

TCollection class

In unit Classes

Base class to manage collections of named objects.

Declaration

pascal
TCollection = class(TPersistent)

Inheritance

  1. TCollection
  2. TPersistent
  3. 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

PropNameprotectedName of the property that this collection represents.
UpdateCountprotected
CountpublicNumber of items in the collection.
ItemClasspublicClass pointer for each item in the collection.
ItemspublicIndexed array of items in the collection.

Methods

GetAttrCountprotectedReturns the count of attributes associated with each item.
GetAttrprotectedReturns an attribute of the collection.
GetItemAttrprotectedReturns the attributes of an item.
ChangedprotectedProcedure called if an item is added to or removed from the collection.
GetItemprotectedRead handler for the property.
SetItemprotectedWrite handler for the property.
SetItemNameprotectedVirtual method to set the name of the specified item.
SetPropNameprotectedWrite handler for the property.
UpdateprotectedHandler called when an item in the collection has changed.
Notifyprotected
CreatepublicCreates a new collection.
DestroypublicDestroys the collection and frees all the objects it manages.
OwnerpublicOwner of the collection.
AddpublicCreates and adds a new item to the collection.
AssignpublicAssigns one collection to another.
BeginUpdatepublicStart an update batch.
ClearpublicRemoves all items from the collection.
EndUpdatepublicEnds an update batch.
DeletepublicDelete an item from the collection.
GetEnumeratorpublicCreate an IEnumerator instance.
GetNamePathpublicOverrides to return a proper pathname.
InsertpublicInsert an item in the collection.
FindItemIDpublicSearches for an Item in the collection, based on its property.
ExchangepublicExchange 2 items in the collection.
MovepublicMove an item in the collection.
SortpublicSort 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.