I have a standalone root gui, and i would like to give the user the possibility to declare new methods (always with the same prototype) in this gui. Is it possible? The goal is to make personnalised filters in my application.
what i want:
Enter your method:
Double_t isXPositive(myClass * m)
{
return (m->getX() > 0)
}
| OK |
Is it possible to execute this with cint insisde compiled code? and then use:
TMethodCall * m = new TMethodCall();
m->isXPositive(name, “myClass*”);
MyTrack * args[1];
args[0] = new myClass();
Double_t temp;
cour->SetParamPtrs(args);
cour->Execute(temp);
Hi Laurent,
yes, that’s possible. See CINT’s G__CallFunc (in CallFunc.h). Use cases are e.g. in tree/src/TSelectorCint.cxx - fFuncVersion might give you some hints. Let me know if you need more details!
Axel.