|
Boost Users : |
From: Edward Diener (eddielee_at_[hidden])
Date: 2003-08-27 15:51:32
Peter Dimov wrote:
> Douglas Gregor wrote:
>> 3) Trackability: there's a general tracking interface here that would
>> be really useful, but I haven't had the time to pull it out.
>
> I think I mentioned this before: one alternative tracking model is to
> catch
> bad_weak_ptr and autodisconnect.
Doesn't this require the end-user to wrap their trackable object, which has
an event handling member function, in a smart pointer if they want to be
automatically tracked ?
If so, it provides an alternative trackable model to the derivation one in
the current Boost.Signals library but with its own downside. The major one
would be that the object must be dynamically allocated. Whereas in the
current implementation this is not necessary. The plus side is that it would
no longer be necessary to derive from a particular base class in order to be
trackable. So there are definite tradeoffs both ways. If the library were
willing to live with and create multiple means that the object be trackable,
which I see as perfectly viable and in the spririt of C++, I would say it
should create your choice also.
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