Re: Pointer to function which is method of i

From: Onuchin Valeriy (onuchin@sirius.ihep.su)
Date: Fri Jul 16 1999 - 13:22:32 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET