mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 12:07:58 +02:00
* Add GetMulticastObserver
This commit is contained in:
parent
594090b215
commit
094f8a7be7
@ -195,6 +195,7 @@ Type
|
||||
|
||||
TComponent = Class;
|
||||
TStringList = Class;
|
||||
IInterfaceList = Interface;
|
||||
|
||||
EObserver = Class(Exception);
|
||||
|
||||
@ -370,6 +371,7 @@ Type
|
||||
function TryIsObserving(const aID: Integer; out aIntf: IInterface): Boolean; virtual;
|
||||
function GetSingleCastObserver(const aID: Integer): IInterface; virtual;
|
||||
function GetMultiCastObserverArray(const aID: Integer) : TIInterfaceArray; virtual;
|
||||
function GetMultiCastObserver(const aID: Integer) : IInterfaceList; virtual;
|
||||
end;
|
||||
|
||||
{ TLinkObservers }
|
||||
|
@ -138,6 +138,19 @@ begin
|
||||
raise EObserverException.CreateFmt(SerrObserverNoMulticastFound, [aID]);
|
||||
end;
|
||||
|
||||
function TObservers.GetMultiCastObserver(const aID: Integer): IInterfaceList;
|
||||
|
||||
Var
|
||||
IntfArray : TIInterfaceArray;
|
||||
Intf : IInterface;
|
||||
|
||||
begin
|
||||
Result:=TInterfaceList.Create;
|
||||
IntfArray:=GetMultiCastObserverArray(aId);
|
||||
For Intf in IntfArray do
|
||||
Result.Add(Intf);
|
||||
end;
|
||||
|
||||
{ TObservers.TIDArray }
|
||||
|
||||
procedure TObservers.TIDArray.Add(const aInterface: IInterface);
|
||||
|
Loading…
Reference in New Issue
Block a user