Function pointer from the dictionary

Hello,

I’m looking for a way to retrieve a function pointer from a string containing the name of the function. So for instance if I have the definition

void myfunc(int i) { … }

I would like to be able to retrieve the function pointer value &myfunc when providing the string “myfunc”.

Naively this would seem to be possible using the CINT/Reflex dictionary, but I can’t find a way to do it (the TFunction class has an InterrfaceMethod() accessor which apparently returns a function pointer, but after a bit of experimentation this doesn’t seem to be it).

If anybody knows how/if this can be done, please let me know…

Thanks,

  • Nicolas

[url]Macro and CPPUNIT