Sandeep

You can also delegate the inplemenation of an interface in delphi

So in your case ClassC inherits from ClassA and implements InterfaceB
(defined alongside ClassB)
ClassC has a subject of Class B which it delegates its implementation of
InterfaceB to

ie

TClassC - class(TClassA, InterfaceB)
private
  FClassB: TClassB
property
  InstClassB read FClassB write FClassB implements InterfaceB
end

I think this is called a 'decorator' patten

Neven

----- Original Message -----
From: Sandeep <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, 13 June 2001 14:19
Subject: Re: RE: [DUG]: Interfaces


> How do interfaces help i n multiple inheritence? If
> I have a ClassA and ClassB then if I want to inherit ClassC from
> ClassA its simple. But if I want to inherit from ClassA and ClassB
> then using interface I have to implement all the functions in ClassB
> again in ClassC, so how does it makes life simple?
>
>
> Sandeep
>
> Software Developer
> CFL
> [EMAIL PROTECTED]
> http://www.cfl.co.nz
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to