
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 23 February 2007 16:50 pm, Timmo Stange wrote:
Frank Mori Hess wrote:
However, my way also allows track() to be called an arbitrary number of times before connecting the slot. How would multiple tracked objects be handled with a track(p).connect()/.connect_to() syntax?
I suppose track() would return a reference to the slot_type, so that you could do:
signal_type::slot_type( f, p1.get(), p2.get() ).track( p1 ).track( p2 ).connect_to(...);
Ah, yes. track() has to return a reference to the slot for my suggestion signal.connect(signal_type::slot_type( f, p.get() ).track( p )); to work as well.
Another question is if both alternatives should be provided, or if tracking should only work when you create a slot_type object explicitly.
I have no problem with only providing tracking support through slot::track().
I'd also like to mention that you can effectively hide the tracking from the connection setup site with the original implementation. If you only provide a typedef for the functor you want to be used for the connection, visit_each can collect the information automatically (or at least in a way invisible to the connecting code).
I'm not following what you're saying here. Can you give some kind of example for what you're suggesting? - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFF32Qp5vihyNWuA4URAnrrAJwJNzqb0zzQrBojAdK4SfT7L1+d/ACfYtIB Cj8GatxyOXCgO7TBzdCpuu0= =diYH -----END PGP SIGNATURE-----