RE:(Fwd) Re: Pointer-to-member operator

Masaharu Goto (MXJ02154@nifty.ne.jp)
Sat, 25 Jul 1998 18:45:00 +0900


Jonathan,

>Fair enough. You make an excellent point and I think you are right. I
>agree completely with your comment about loading native-compiled
>classes and that's the solution I am working toward for my own
>problem.
>
>I think that the pointer-to-member and address-of-member operators are
>important in an interpreted environment (for instance, allowing the
>user to say foo->ConstrainModel(&bar::f1) or
>foo->ConstrainModel(&bar::f2) on the command line to change
>constraints on a model. It pretty much kills data encapsulation when I
>can only pass pointers to functions at global scope. I can work around
>this, but eventually, if it doesn't bloat CINT too much, it would be
>nice to be able to use these operators.

I'll add your request in enhancement list.
As you pointed out, adding pointer to member in interpreted seession is not
very difficult.

Meanwhile, you could try G__CallFunc class. It is a substitute of pointer to
(member) function in cint. Documentation is in cint source package doc/ref.txt
.
What you want to do can be done by G__CallFunc. Of course in different
expression. G__CallFunc works both in interpreted and compiled source code.

Masaharu Goto