>Hi Masa,
>Thanks for your reply. I think it would be of limited use
>to have fixed argument lists, since once the facility
>becomes available many people want to use it for very
>different usages.
>So to my opinion it is then better to wait until a
>general solution has been found to the problem.
>Still I have some feeling that the most easy way is
>to introduce some sort of interface function which
>can return the pointer to an object which has been
>given to it as an argument.
I think we are talking about mixing compiled and interpreted pointer to
function. How about providing automatic source code generator for you?
You give function name and argument lists, then the generator creates the
interface method to the pointer to function.
And I need to inform you that pointer to function processing is slow in cint.
If we do something smart, we'll have to pay the cost of execution speed.
>Question : If I would use &f instead of *f in the example above,
>would it then be possible ?
I'm sorry I'm not sure which f you are refering to.
Paolo Calafiura wrote:
>where FloatFunction is your interpreted function embedded in an object
>
>class FloatFunction {
> private:
> //function initial values, if any (e.g. the 25 in your example)
> public:
> FloatFunction(){};
> //any constructor that ser the function initial values, if needed
> float operator()(float x) {return (x*x-2*x+25);}
>}
>I guess that CINT will not complain about it.
This is an interesting idea. I haven't thought about this. Paolo extends
concept of pointer to function to a function object.
Masaharu Goto