Boost logo

Boost Users :

From: Timmo Stange (ts_at_[hidden])
Date: 2007-02-11 01:54:54


Frank Mori Hess wrote:
> Okay, so how about l slightly modify my suggestion to be: store the slot
> signal as a trivial wrapper function object that holds a weak_ptr to the
> signal's pimpl, and has an operator() function corresponding to signal
> invocation. Is that essentially your plan?

Yes, the signal classes in the original implementation are basically
a thin wrapper around it. I suggest to add something like a bool
"genuine" as a member, provide a protected copy constructor that
initializes it to false (while the public constructor sets it to
true) and work with full copies of the signal object. The
destructor can disconnect all slots when "genuine" is true.

Regards

Timmo Stange


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net