Boost logo

Boost Users :

From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2007-02-10 20:15:55


On Saturday 10 February 2007 07:33 pm, Timmo Stange wrote:
> >
> > If the signal is implemented with a pimpl via a shared_ptr, couldn't
> > boost::track just store a weak_ptr to the pimpl in the special case of
> > a signal argument? The signal could invoke the the boost::tracked by
> > using the get_pointer() function and invoking it as a pointer to a
> > function object (assuming the pimpl provides an operator() member
> > function). Is that is what you are already suggesting?
>
> Our influence on slot target storage and invocation is limited, as
> the client tells us what container type to use through a template
> parameter (SlotFunction). I would prefer to store a normal function
> object there instead of trying to trick it into invoking the object
> through a pointer and still getting the argument binding right.

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?

-- 
Frank



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