[gcjx] Expand visitor interface

Ranjit Mathew rmathew@gmail.com
Thu Oct 13 04:09:00 GMT 2005


On 12 Oct 2005 18:52:46 -0600, Tom Tromey <tromey@redhat.com> wrote:
> >>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:
>
> Ranjit> Now if only I can come up with a simple way of tackling
> Ranjit> model_generic_invocation instances...
>
> You could have specializations of
> model_generic_invocation<T>::visit(visitor*) ..?

I'm not completely sure what you mean here.
My first attempt was something like:

template<typename T>
model_generic_invocation<T>::visit (visitor *v)
{
  v->visit_generic_invocation ( (T *)this, ...);
}

I need to provide enough information in the
parameters for visit_generic_invocation() here
so that the dummy implementations can call
the appropriate visit_xxx() methods with the
required information, so that the existing
visitors don't break. However, without knowing
the actual instantiation for 'T', I can't seem to
extract this information. :-/

Ranjit.

--
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/



More information about the Java-patches mailing list