TROCollection<T>
Overview
Location
- Unit: uROArray.pas
- Ancestry: TCollection | TROCollection | TROCollection<T>
constructor Create overload
constructor Create
constructor Create (TCollectionItemClass) protected overload
constructor Create(aItemClass: TCollectionItemClass)
Parameters:
- aItemClass:
Add reintroduce
function Add: T
GetIndex (declared in TROCollection)
Searches for an item with a aPropertyName
property, which is accessible via GetPropValue and is equal to aPropertyValue
.
Returns the index of the first item found or -1
.
function GetIndex(const aPropertyName: string; const aPropertyValue: Variant; StartFrom: Integer; Options: TROSearchOptions): Integer
Parameters:
- aPropertyName: Name of the
published
property - aPropertyValue: Value of the property
- StartFrom: Item index to start from
- Options: Value of TROSearchOptions
GetItems protected
function GetItems(aIndex: Integer): T
Parameters:
- aIndex:
Items
property Items[Index: Integer]: T read write
LoadFromArray
procedure LoadFromArray(anArray: TROArray<T>)
Parameters:
- anArray:
SaveToArray
procedure SaveToArray(anArray: TROArray<T>)
Parameters:
- anArray:
Search (declared in TROCollection)
Handy wrapper for GetIndex, which returns the found item or NIL
.
function Search(const aPropertyName: string; const aPropertyValue: Variant; StartFrom: Integer; Options: TROSearchOptions): TCollectionItem
Parameters:
- aPropertyName: property name
- aPropertyValue: property value
- StartFrom: index
- Options: options
SetItems protected
procedure SetItems(aIndex: Integer; const Value: T)
Parameters:
- aIndex:
- Value:
Items
property Items[Index: Integer]: T read write
constructor Create overload
constructor Create
constructor Create (TCollectionItemClass) protected overload
constructor Create(aItemClass: TCollectionItemClass)
Parameters:
- aItemClass:
Add reintroduce
function Add: T
GetIndex (declared in TROCollection)
Searches for an item with a aPropertyName
property, which is accessible via GetPropValue and is equal to aPropertyValue
.
Returns the index of the first item found or -1
.
function GetIndex(const aPropertyName: string; const aPropertyValue: Variant; StartFrom: Integer; Options: TROSearchOptions): Integer
Parameters:
- aPropertyName: Name of the
published
property - aPropertyValue: Value of the property
- StartFrom: Item index to start from
- Options: Value of TROSearchOptions
GetItems protected
function GetItems(aIndex: Integer): T
Parameters:
- aIndex:
LoadFromArray
procedure LoadFromArray(anArray: TROArray<T>)
Parameters:
- anArray:
SaveToArray
procedure SaveToArray(anArray: TROArray<T>)
Parameters:
- anArray:
Search (declared in TROCollection)
Handy wrapper for GetIndex, which returns the found item or NIL
.
function Search(const aPropertyName: string; const aPropertyValue: Variant; StartFrom: Integer; Options: TROSearchOptions): TCollectionItem
Parameters:
- aPropertyName: property name
- aPropertyValue: property value
- StartFrom: index
- Options: options
SetItems protected
procedure SetItems(aIndex: Integer; const Value: T)
Parameters:
- aIndex:
- Value: