[omniORB] Beginner's question on IOR and multiple interfaces
Duncan Grisby
duncan@grisby.org
Sun Sep 15 22:01:01 2002
On Tuesday 10 September, Ken Feuerman wrote:
> Alright, now my curiosity is piqued: Why *can't* you implement
> MyServant as virtually derived from POA_I and POA_J? Style
> questions aside, would it necessarily result in a compile-time or
> run-time error that is a consequence somehow of CORBA's
> specifications? (Inquiring minds want to know!)
The only way the ORB has to tell what interface a servant is
supporting is with virtual functions on the ServantBase object,
implemented by the POA_foo classes. If a servant derived from more
than one POA_* class, the virtual functions would be ambiguous. There
are application-visible things like _this() that wouldn't work, as
well.
You should get a compile time error if you try it.
Outside of the C++ mapping, you can't do it just because the CORBA
object model is defined that way.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --