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

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sat Jul 25 1998 - 11:45:00 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:35 MET