cadetill's blog | Copyright © Xavier Martínez (cadetill)

# Class TGMInterfacedCollection

Description
Hierarchy
Fields
Methods
Properties

## Unit

GMLib.Classes

## Declaration

`type TGMInterfacedCollection = class(TCollection, IGMControlChanges, IGMOwnerLang, IGMToStr)`

## Description

Base class for all classes that inherit from `TCollection` into GMLib.

Implements `IGMControlChanges`, `IGMToStr` and `IGMOwnerLang` interfaces.

## Hierarchy

- TObject
- TPersistent
- TCollection
- TGMInterfacedCollection

## Overview

### Methods

| `constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); virtual;`
| `function GetOwner: TPersistent; override;`
| `function GetOwnerLang: TGMLang; virtual;`
| `function PropToString: string; virtual;`
| `procedure Assign(Source: TPersistent); override;`
| `procedure Clear;`
| `procedure Delete(Index: Integer);`
| `procedure Move(CurIndex, NewIndex: Integer);`
| `procedure PropertyChanged(Prop: TPersistent; PropName: string);`

### Properties

| `property Items[I:Integer]: TGMInterfacedCollectionItem read GetItems write SetItems;`
| `property OnChange: TNotifyEvent read FOnChange write FOnChange;`

## Description

### Methods

| `constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); virtual;`
Class constructor. ###### Parameters AOwner Object owner. ItemClass Identifies the TCollectionItem descendants that must be used to represent the items in the collection.

| `function GetOwner: TPersistent; override;`
Function that return the object owner. ###### Returns Owner of object

| `function GetOwnerLang: TGMLang; virtual;`
Returns the TGMLang of the Owner. If Owner is not assigned or not supports IGMOwnerLang interface then should be returned `lnEnglish`. ###### Returns TGMLang of the owner object.

| `function PropToString: string; virtual;`
Converts all class properties values to a string separated by comma used to send values to a JavaScript function. ###### Returns string with all properties.

| `procedure Assign(Source: TPersistent); override;`
Call `Assign` to copy the properties or other attributes form an object to another. The standard form of a call to `Assign` method is `Destination.Assign(Source);` which tells the `Destination` object to copy the contents of the `Source` object to itself. ###### Parameters Source Object to copy the content.

| `procedure Clear;`
Deletes all items from the collection.

| `procedure Delete(Index: Integer);`
Deletes a single item from the collection. ###### Parameters Index Position to delete

| `procedure Move(CurIndex, NewIndex: Integer);`
Moves an item to a new position into the collection. ###### Parameters CurIndex Index of Item to move NewIndex Destination index

| `procedure PropertyChanged(Prop: TPersistent; PropName: string);`
Method to call into the owner object when changes a property into the current object. ###### Parameters Prop Object property that has changed. PropName Name of the property that has changed.

### Properties

| `property Items[I:Integer]: TGMInterfacedCollectionItem read GetItems write SetItems;`
List of items from collection.

| `property OnChange: TNotifyEvent read FOnChange write FOnChange;`
Event triggered when a property changes.

Generated by PasDoc 0.15.0.