[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements an array of items with their associated objects.
Source position: objectlists.pas line 51
type generic TObjectArray <TItem,TObj>= class |
||
protected |
||
function Get(); |
|
Gets the value for the Items property. |
procedure Put(); |
|
Sets the value for the Items property. |
function GetObject(); |
|
Gets the value for the Objects property. |
procedure PutObject(); |
|
Sets the value for the Objects property. |
procedure SetCapacity(); |
|
Sets the value for the Capacity property. |
procedure SetCount(); |
|
Sets the value for the Count property. |
procedure Grow; |
|
Increases the storage Capacity for the class instance. |
procedure Shrink; |
|
Decreases the Capacity and allocated storage for the class instance. |
public |
||
destructor Destroy; override; |
|
Destructor for the class instance. |
function Add(); |
|
Adds the specified item to the storage for the class instance. |
function AddObject(); |
|
Adds the specified item and its associated object to the storage in the class instance. |
procedure Clear; virtual; |
|
Removes all item/object associations stored in the List. |
procedure Delete(); |
|
Deletes an item/object association stored at the specified position in the List. |
procedure Exchange(); |
|
Swaps the item/object associations at the specified positions in List. |
function First; |
|
Gets the first TItem class instance in the List, or Nil when empty. |
function IndexOf(); |
|
Gets the ordinal position in List where the specified TItem instance is stored. |
procedure Insert(); |
|
Inserts a new association at the specified position in List. |
procedure InsertObject(); |
|
Inserts an item/object association at the specified position in the List. |
function Last; |
|
Gets the last TItem instance in the List, or Nil when empty. |
procedure Move(); |
|
Relocates the association stored at the position in CurIndex to the position in NewIndex. |
procedure Assign(); |
|
Assigns TItem class instances specified in SrcList to the List storage in the class. |
function Remove(); |
|
Removes the association with the specified TItem class instance. |
procedure Pack; |
|
Removes all associations where the Item class instance is unassigned (contains Nil). |
|
Specifies the number of associations that can be stored in the List. |
|
|
Number of item/object associations currently stored in the List. |
|
property Items []: TItem; default; [rw] |
|
Provides indexed access to the TItem class instances stored in the List. |
property Objects []: TObj; [rw] |
|
Provides indexed access to the TObj class instances stored in the List. |
|
Provides access to the list which implements the storage for the item/object associations in the class instance. |
|
end; |
|
Implements an array of items with their associated objects. |
|
| | ||
TObject |
TObjectArray is a generic type used to implement an array of items and their associated objects. TObjectArray allows the association to be defined using the TItem and TObj class types. Internally, it uses a list of records with pointers to the Items and Objects stored in the class. Properties and methods are provided to maintain and access the entries in the class instance, and the allocated storage for the array type.
|
Record type with pointers to members in the association. |
|
|
Pointer to the T2Pointer record type. |
Version 4.0 | Generated 2025-05-03 | Home |