Re: Pointer to function which is method of i
Onuchin Valeriy (onuchin@sirius.ihep.su)
Fri, 16 Jul 1999 15:22:32 +0400
Masaharu Goto wrote:
>
> Dear Valery,
>
> >Dear Masaharu,
> >How to get pointer to function which is one of the
> >methods of interpreted class ?
> >
> > Thank in advance, Valery
>
> Currently, there is no way to deal with pointer to member function.
> This is mainly a parsing problem with ::* and ->* operator.
>
> If you use ERTTI API, you could get something like it.
>
> #include <ertti.h>
> main() {
> G__MetnodInfo m("YourClass");
> m.Next();
> void *p2mf = m.PointerToFunc();
> if(m.Property()&G__BIT_ISCOMPILED)
> printf("pointer to precompiled interface method\n");
> else if(m.Property()&G__BIT_BYTECODE)
> printf("pointer to bytecode function\n");
> else
> printf("pointer to interpreted function\n");
> }
>
> But it is difficult to use this pointer.
>
> Thank you
> Masaharu Goto
----------------------------------------------------------------------------
Dear Rooters,
if it is possible to have Dictionary for interpreted class by
adding code from ClassDef/ClassImp macros?
Thank in advance, with best regards, Valery