How to call function by name

Dear Experts,

I have a simple question.

If I have a class A with ClassDef. I can get TClass
object for this class from the object a like

TClass *cl = a->Class();

or If I don’t have an object, I can get by

TClass *cl = TClass::GetClass(“name”);

Could you tell me how I can call a (static) member function of the class
by name in my C++ program? (Tell me both Reflex way and Cint way + where I could have looked it up)

Class A {

static funci(int i);
static funcv(void);

};

Thanks!

Nobu

Hi,

what about gROOT->ProcessLine(TString::Fromat("((retType)0x%x) = name::func(%d)", &ret, parameter))? This is the preferred solution because it is independent of the underlying reflection implementation.

Cheers, Axel.

Thanks, Axel.

Works fine. I needed to use static variable for ret, not to get seg fault.

Nobu