|
Boost Users : |
From: Timmo Stange (ts_at_[hidden])
Date: 2007-02-25 17:12:32
Peter Dimov wrote:
> You don't need tracking for the above example; bind( slot, _2, _1 ) stores a
> copy of slot. Signals currently need tracking because they're noncopyable
> and are bound using ref(). A copyable signal does not, regardless of the
> semantics of the copy (deep, shallow, or something in between - deep for the
> signal, shallow for the contained slots).
How would such a copy behave regarding connect() and disconnect()?
Neither should affect the original signal, so this would be either
a deep copy or an implementation with copy on write semantics.
I already don't like the fact that there is no distinction between
control over connections and control over invocation. Every entity
that is allowed to connect to a signal can also emit it, unless you
provide a separate connect() yourself and hide the actual signal.
In that case only the signal's owner can connect it to another signal
and the whole tracking idea becomes somewhat uninteresting. Is a
shared signal (in the sense of a shared_ptr) common practice?
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