[omniORB] multiple interface inheritance

Duncan Grisby dgrisby@uk.research.att.com
Thu, 12 Aug 1999 10:55:00 +0100


On Thursday 12 August, andrew.brown@bt.com wrote:

> When I use a class to implement two interfaces e.g.
> 
> class implementation :
> 	public virtual _sk_interface1,
> 	public virtual _sk_interface2
> 
> 
> I get the compile time errors:

[...]

> What is the best way to achieve multiple interface inheritance with
> omniORB2?

You cannot declare a C++ class which implements more than one IDL
interface. You should declare a new IDL interface which inherits from
the two base interfaces, then provide an implementation of that.

Alternatively, you can create a servant which supports more than one
interface using the DSI, but then you have to do a lot more work
yourself, and lose a lot of compile-time type checking.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --