On Friday 2004-04-23 20:45 +0200, Tomasz Motyl wrote:
> once again.. i wish i had a concrete class inheriting after two interfaces -
> xpcom abstract classes
> HOWTO DO?! some working simple example.. xpidl doesn't allow this..

xpidl translates interfaces from IDL into C++ (and other information),
but it doesn't have anything to do with concrete classes.

The rules of XPCOM do not allow interfaces to inherit from multiple
other interfaces.  However, concrete classes can, but that has nothing
to do with xpidl.

For examples of a class implementing two interfaces, see:

class nsGnomeVFSProtocolHandler :
http://lxr.mozilla.org/seamonkey/source/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp#810

class nsStreamLoader :
http://lxr.mozilla.org/seamonkey/source/netwerk/base/src/nsStreamLoader.h
http://lxr.mozilla.org/seamonkey/source/netwerk/base/src/nsStreamLoader.cpp

(Note that in this example, one of the interfaces inherited inherits
from another interface, so the classes implement three interfaces even
though they only inherit directly from two.)

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to