IUnknown

Regards
Paul
[EMAIL PROTECTED]
(Wellington - New Zealand)


-----Original Message-----
From: Aaron Scott-Boddendijk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 27 January 2000 11:17 PM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Interface Types


> Using QueryInterface (or in D5, Supports) will enable you to determine
> whether a particular interface supports another - this is generally more
> useful than determining whether it inherits from it directly.  Who needs
> inheritance when you're using interfaces?!  :)  You can also go
MyInterface
> := TMyObject AS IMyInterface; (returns nil if TMyObject doesn't support
it).
> But no, there doesn't appear to be a way to determine whether one
interface
> is inherited from another (ie. you can't use IS).

Sorry my question was perhaps poorly structured....

I need to test if a an interface A supports interface B where at compiletime
I do not know which interface B is... So how can you store an interface
reference.

I know how to store a class reference since a class reference is of type
TClass...

what is the equivelent for interfaces such that you could build a list which
'accepts'
only interfaces supporting a runtime assigned interface.

IList stores IListItem

IList also has an Add(LI :IListItem):Boolean function indicating whether it
accepted
the IListItem being accepted... The accepted interface (or interfaces) are
defined
by an Accepts(I :Interface):Boolean; function...

--
Aaron@home


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to