[aspectc-user] help: how can I modify the result returned from a function/method

Paolo Calafiura pcalafiura at lbl.gov
Fri Jun 18 07:56:48 CEST 2004

newbie question: I inserted a new data member into a Key class, and I
want to use the data member to redefine sorting based on this key. This
boils down to changing the return value of a method of this Key class
 bool Key::lessThan(const Key& rhs) const;
using the extra data member. I can insert a new method
 bool Key::threadedLessThan(const Key& rhs) const;
but I have found no way to replace all calls to lessThan with calls to
threadedLessThan. I can of course define an around advice for lessThan
and call threadedLessThan from inside there, but I don't see how to pass
the bool returned by threadedLessThan out to the caller of the original
 Using either tjp->result() or the result context seems to give me 
read-only access to the result...

 Thanks for any suggestion
Paolo Calafiura <pcalafiura at lbl.gov>

More information about the aspectc-user mailing list