Re: [orbitcpp-list] to hell with inheritance ;)
Status: Beta
Brought to you by:
philipd
|
From: Phil D. <ph...@us...> - 2000-03-05 21:19:06
|
Andreas Kloeckner wrote: > > Hi Phil, > > something came to my mind just this moment. we cannot use inheritance on > the stubs, right? We may single-inherit them from CORBA::Object, but > that's about it. If we use virtual inheritance, the compiler will add > some thunking data, which will be broken (i.e. non-existent) the very > moment we reinterpret_cast a CORBA_Object_struct to be a stub. yet, the > spec demands implicit widening, so we need to add cast operators for > each and every base class. correct? is there any way around this? > I'm probably being thick, but I can't see why we need vtable inheritance for the stubs. There's no polymorphism done at the C++ level - all calls are just sent (statically linked) to the C stubs, which do epv polymorphism themselves (using Elliots shortcircuit classid mechanism). Or am I missing something? Hmmm... Maybe I haven't thought everything through: If we do multiple inheritance without virtual inheritance, you get multiple copies of CORBA::Object. Does that matter? > bye, > > andy > > PS: If any of my recent rather technical question-answer-style posts to > this list seemed rude or too demanding to you, I'd like to say sorry for > this. I didn't mean to be offensive in any way, just in case you felt it > to be like this. :) > No, I didn't take them like that - Thanks for being thoughtful though :-) Cheers, Phil. |