[omniORB] multiple interface inheritance

Helge Penne Helge.Penne@datarespons.no
Thu, 12 Aug 1999 12:05:40 +0200


andrew.brown@bt.com wrote:

> Can anyone please help
>
> When I use a class to implement two interfaces e.g.
>
> class implementation :
>         public virtual _sk_interface1,
>         public virtual _sk_interface2
>
> ...
>
> What is the best way to achieve multiple interface inheritance with
> omniORB2?
>
> I have a way of doing it which involves looking at the operation being
> dispatched but there must be a better way???

I'm quite sure this would be possible using the "tie" approach (where a
template technique is used to connect skeleton and implementation using a
pointer), as opposed to the standard BOA approach (in which the implementation
class inherits from the skeleton class).  omniORB supports the tie approach
through a command line option to omniidl2, if I remember correctly.  You would
then create two tie objects (one for each interface) that point to the same
implementation object.  It's almost as easy to use as the normal BOA approach.

--
Helge Penne (helge.penne@datarespons.no)
Senior Software Development Engineer
Data Respons AS, Postboks 489, N-1323 Høvik, Norway
Phone: +47 67112081 / 22719957 (work/home)