TCollection object
Manage a collection of pointers of objects.
Declaration
TCollection = class(TObject)Inheritance
- TCollection
- 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
The TCollection object manages a collection of pointers or objects.
It also provides a series of methods to manipulate these pointers or
objects.
Whether or not objects are used depends on the kind of calls you use. All kinds come in 2 flavors, one for objects, one for pointers.
Methods
Init | Instantiate a new collection. | |
Load | Initialize a new collection and load collection from a stream. | |
Done | Clean up collection, release all memory. | |
At | Return the item at a certain index. | |
IndexOf | Find the position of a certain item. | |
GetItem | Read one item off the stream. | |
LastThat | Return last item which matches a test. | |
FirstThat | Return first item which matches a test. | |
Pack | Remove all >Nil pointers from the collection. | |
FreeAll | Release all objects from the collection. | |
DeleteAll | Delete all elements from the collection. Objects are not destroyed. | |
Free | Free item from collection, calling it's destructor. | |
Insert | Insert a new item in the collection at the end. | |
Delete | Delete an item from the collection, but does not destroy it. | |
AtFree | Free an item at the indicates position, calling it's destructor. | |
FreeItem | Destroy a non-nil item. | |
AtDelete | Delete item at certain position. | |
ForEach | Execute procedure for each item in the list. | |
SetLimit | Set maximum number of elements in the collection. | |
Error | Set error code. | |
AtPut | Set collection item, overwriting an existing value. | |
AtInsert | Insert an element at a certain position in the collection. | |
Store | Write collection to a stream. | |
PutItem | Put one item on the stream. |
Fields
Items | Pointer to list of items. | |
Count | Current count of items. | |
Limit | Max number of items. | |
Delta | Number of pointers to allocate when adding items. |
Inherited
From TObject (41)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress 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.
