type TExContainerType = class(
TAnsiStringBase04ZeroVector
)
TAnsiStringObjectVector
.TAnsiStringBase04ZeroVector
> TAnsiStringBase04Vector
> TAnsiStringVector
> TExContainerType
> TBase04ZeroVector
> TBase04Vector
> TExVector
> TExContainer
> TErrorObject
None.
function ExistAllObjects(const AObjs: array of TExObjectType): Boolean; |
Returns True
if all of the AObjs
in the array exist in the Items' Obj Elements of the container, otherwise returns False
. Comparison starts with the first Item.
function ExistAnyObjects(const AObjs: array of TExObjectType): Boolean; |
Returns True
if at least one of the AObjs
in the array exists in the Items' Obj Elements of the container, otherwise returns False
. Comparison starts with the first Item.
function ExistsBackObject(const AObj: TExObjectType): Boolean; |
Returns True if AObj
exists among the Items' Obj Elements of the container, otherwise returns False. Comparison starts with the last Item.
function ExistsObject(const AObj: TExObjectType): Boolean; |
Returns True if AObj
exists among the Items' Obj Elements of the container, otherwise returns False. Comparison starts with the first Item.
function ExistsSortedObject(const Obj: TExObjectType): Boolean; |
function FindDescObject(const AObj: TExObjectType; out Index: Integer): Boolean; |
function FindObject(const Obj: TExObjectType; out Index: Integer): Boolean; |
function GetFirstObject: TExObjectType; |
Returns the Obj Element of the first Item in the container.
function GetLastObject: TExObjectType; |
Returns the Obj Element of the last Item in the container.
function GetObject(const Item: Pointer): TExObjectType; |
Returns the Obj Element of the Item pointed to by Item
.
function GetObjectAt(const Index: Integer): TExObjectType; |
Returns the Obj Element of the Item referenced by a 0-based Index
.
function IndexBackOfObject(const AObj: TExObjectType): Integer; |
Returns the position of the last occurrence of an Item whose Object Element is the same as AObj
. IndexBackOfObject
returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If AObj
is not in the vector, IndexBackOfObject
returns -1.
function IndexOfObject(const AObj: TExObjectType): Integer; |
Returns the position of the first occurrence of an Item whose Obj Element is the same as AObj
. IndexOfObject
returns the 0-based Index of the Item, i.e. 0 for the first Item, 1 for the second, and so on. If AObj
is not in the vector, IndexOfObject
returns -1.
function InsertNameObjectLast(const AName: TExNameType; const AObj: TExObjectType): Integer; |
Inserts a new Item to the end of the vector and stores AName
and AObj
to the new Item's Name and Obj Elements respectively. InsertNameObjectLast
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
procedure InsertObjectAt(const Index: Integer; const AObj: TExObjectType); |
Inserts a new Item at the position specified by Index
and stores AObj
to the new Item's Obj Element.
function InsertObjectFirst(const Obj: TExObjectType): Integer; |
Inserts a new Item to the beginning of the vector and stores Obj
to the new Item's Obj Element. InsertObjectFirst
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
function InsertObjectLast(const Obj: TExObjectType): Integer; |
Inserts a new Item to the end of the vector and stores Obj
to the new Item's Obj Element. InsertObjectLast
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0.
function InsertObjectSorted(const AObj: TExObjectType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Obj Elements in ascending order. The new position will be based on comparisons with AObj
.
AddObjectSorted
relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByObject
to prepare an unsorted vector for using AddObjectSorted
.
AddObjectSorted
does not allow duplicates in the vector. If AObj
is already present in the vector, no new Item will be inserted and AObj
will not be stored.
AddObjectSorted
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
function InsertObjectSortedDesc(const AObj: TExObjectType): Integer; |
Inserts a new Item at the appropriate position to a vector already sorted by its Items' Obj Elements in descending order. The new position will be based on comparisons with AObj
.
AddObjectSortedDesc
relies on the vector to be in sorted order already; do not use it on unsorted vectors. Call SortByObjectDesc
to prepare an unsorted vector for using AddObjectSortedDesc
.
AddObjectSortedDesc
does not allow duplicates in the vector. If AObject
is already present in the vector, no new Item will be inserted and AObj
will not be stored.
AddObjectSortedDesc
returns the Index position of the new Item in the vector, where the first Item in the vector has an Index of 0. If no new Item has been added (to avoid duplicates), the result will be -1.
function ItemOfObject(const Obj: TExObjectType): Pointer; |
procedure RemoveAllObjects(const AObj: TExObjectType); |
Removes all Items whose Obj Element is the same as AObj
from the container.
procedure RemoveBackAllObjects(const AObj: TExObjectType); |
Removes all Items whose Obj Element is the same as AObj
from the container starting at the last Item.
procedure SetFirstObject(const Obj: TExObjectType); |
Stores Obj
to the Obj Element of the first Item in the container.
procedure SetLastObject(const Obj: TExObjectType); |
Stores Obj
to the Obj Element of the last Item in the container.
procedure SetObject(const Item: Pointer; const Obj: TExObjectType); |
Stores Obj
to the Obj Element of the Item pointed to by Item
.
procedure SetObjectAt(const Index: Integer; const Obj: TExObjectType); |
Stores Obj
to the Obj Element of the Item referenced by a 0-based Index
.
procedure SortByObject; |
Sorts all Items in the container by their Obj Element in ascending order.
procedure SortByObjectDesc; |
Sorts all Items in the container by their Obj Element in descending order.
FirstObject: TExObjectType; |
LastObject: TExObjectType; |
Obj[const Item: Pointer]: TExObjectType; |
ObjectAt[const Index: Integer]: TExObjectType; |
FirstObject: TExObjectType; |
Reads or modifies the Obj Element of the first Item in the container.
LastObject: TExObjectType; |
Reads or modifies the Obj Element of the last Item in the container.
Obj[const Item: Pointer]: TExObjectType; |
Reads or writes the Obj Element of the Item pointed to by Item
.
ObjectAt[const Index: Integer]: TExObjectType; |
Lists the Object Element of the container's Items, referenced by a 0-based Index
. Use Objects
to read or modify the Obj Element of an Item at a particular position. Index
gives the position of the Item, where 0 is the position of the first Item, 1 is the position of the second Item, and so on.