[omniORB] Ambiguous inheritance error
Gary D. Duzan
gdd0@gte.com
Tue, 23 Feb 1999 14:05:13 -0500
I don't believe that will work. Unless I'm mistaken, you'll end up
with multiple instances of omniObject and CORBA::Object from
Test::_sk_A (via A_i), Test::_sk_B (via B_i), and Test::_sk_C. It
might actually compile, but it won't register properly with the BOA.
Gary Duzan
GTE Laboratories
p.s. There seems to be considerable lag in the list today. My earlier
suggested hack which was practically identical to David's was actually
sent before I received that message. Just didn't want everyone to
think I wasn't paying attention. :-)
In Message <36D2F066.DF53C0D1@tumbleweed.com> ,
rshoup@tumbleweed.com (Randy Shoup) wrote:
=>Ah, the fun of virtual inheritance. You don't want C_i to inherit
=>virtually from A_i, B_i. Something having to do with the "dominance
=>rule", I suspect, though at this point it's probably just enough to say
=>that this works:
=>
=> class A_i : public virtual Test::_sk_A {
=> public:
=> void A_foo_1 ();
=> void A_foo_2 ();
=> };
=>
=> class B_i : public virtual Test::_sk_B {
=> public:
=> void B_foo_1 ();
=> void B_foo_2 ();
=> };
=>
=> class C_i : public virtual Test::_sk_C,
=> public A_i,
=> public B_i {
=> public:
=> void C_foo_1 ();
=> void C_foo_2 ();
=> };
=>
=>Thus you should be able to inherit both interface and implementation.
=>This is how we handle implementation classes of base interfaces in our
=>omniORB application.