[omniORB] Inheritance

Duncan Grisby dgrisby@uk.research.att.com
Mon, 30 Apr 2001 14:46:39 +0100


On Friday 27 April, Kevin Bailey wrote:

> Will this hierarchy work ?
[...]

It all depends on what you've declared in IDL. If your IDL uses
inheritance, you can do what you want. e.g.

  // IDL
  interface Base { ... };
  interface Derived : Base { ... };

  // C++
  class Base_i : public virtual POA_Base { ... };
  class Derived_i : public virtual POA_Derived, public virtual Base_i { ... };

Make sure you use virtual inheritance, otherwise bad things will
happen.

On the other hand, if your IDL interfaces don't inherit from each
other, you can't declare a servant class which derives from more than
one skeleton class.

Cheers,

Duncan.

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