Re: [orbitcpp-list] idl compiler has arrived
Status: Beta
Brought to you by:
philipd
|
From: Phil d. <ph...@us...> - 2000-03-02 14:16:34
|
Andreas Kloeckner wrote:
>
> remember this passage from my last mail?
>
> 8<----------------------------------------------------------------------
> one improvement for the two-method thing just came to my mind: keep the
> *_marshaller as well as the *_callback (i would call it *_caster for
> clarity) static methods and thus be able to put the *_marshaller into
> the epv. this saves an extra call in a non-inheritance setting.
> 8<----------------------------------------------------------------------
>
> it came to me that this is not as clear as i had thought. clarified
> version:
>
> * for the interface A declaring foo(), have the static foo_marshaller in
> the epv, reverted to the original foo(servant,env) arguments.
> foo_marshaller does not use any servant member except cpp_servant.
>
> * for inheriting interface B, create a *_caster like
>
> foo_caster(servant,env) {
> B *typed_servant =
> AServant fake_servant;
> fake_servant->cpp_servant = typed_servant; // causes cast
> return foo_marshaller(&fake_servant,env);
> }
>
> and put this in B's epvs.
>
I like this idea, and the implicit cast should do the thunking required
for virtual inheritance. I agree that we should go with this design.
Phil.
|