Re: [sigc] Deprecate signal<>::slots() ?



On Sa, 2016-04-23 at 20:17 +0000, James Lin wrote:
Murray Cumming wrote:


Does anyone actually use sigc::signal<>::slots() to iterate over
connected slots or to remove or add connected slots?
Is there an alternate mechanism to iterate over the slots connected
to a signal?

Currently we iterate over the signal's slots to temporarily block
(and later unblock) them.  However, this is very crude, and we would
very much prefer proper sigc::signal<>::block/unblock methods that
set a flag on the signal itself (rather than on its slots) because:

1. Blocking slots requires keeping tracking of which slots weren't
already blocked so that they won't be unblocked later.
2. Blocking a signal's slots won't affect slots connected to the
signal afterward.

So if you could add sigc::signal<>::block/unblock methods, then we
could stop using sigc::signal<>::slots (and have a better mechanism
to do what we want).

Wouldn't it be best to just not emit signals that you don't want to
emit?

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]