Class TObjectContainer

DescriptionHierarchyFieldsMethodsProperties

Unit

ObjectContainer

Declaration

type TObjectContainer = class(TObject)

Description

Class implementing a generic container. TObjectContainer stores objects of the most basic type (TObject) and is similar to the class TObjectList that is present in version 5 of Delphi (and also in later versions).

Hierarchy

TObjectContainer > TObject

Methods

Overview

Public constructor Create(OwnsObjects: Boolean = True);
Public destructor Destroy; override;
Public function Add(Obj: TObject): Integer;
Public procedure Assign(const ObjectContainer: TObjectContainer);
Public procedure Clear;

Description

Public constructor Create(OwnsObjects: Boolean = True);

Constructor.

parameters
OwnsObjects
determines whether the container should release the space allocated by the contained objects (by calling their Free method) or not.
Public destructor Destroy; override;

Destructor. Destroys the container instance and, if OwnsObjects is set to True, the contained objects.

Public function Add(Obj: TObject): Integer;
 
Public procedure Assign(const ObjectContainer: TObjectContainer);
 
Public procedure Clear;

Clear the list of contained objects and sets Count to zero. If the OwnsObjects is True, each object's Free method is called before removal.

Properties

Overview

Public property Count: Integer;
Public property M[i: Integer]: TObject;
Public property OwnsObjects: Boolean;

Description

Public property Count: Integer;

Number of objects in the container.

Public property M[i: Integer]: TObject;

Default property that retrieves an object based in the supplied index.

Public property OwnsObjects: Boolean;

Determines whether the container should release the space allocated by the contained objects (by calling their Free method) or not.


Generated by PasDoc 0.8.8.3 on 2005-05-28 08:13:49