RE: [Boost-users] boost::signals block/unblock
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of frantz.maerten@igeoss.com Sent: Tuesday, February 08, 2005 11:44 AM To: boost-users@lists.boost.org Subject: [Boost-users] boost::signals block/unblock
I wonder there's a way to connect a slot to signal (which gives a connection), temporarily disconnect this connection, and reconnect it later (like a block function)
My problem is that I need to emit a signal to the connected slots given a condition. If a connection satisfies the precondition, it will be notified, otherwise it is temporarily disconnected.
[Nat] Might it be simpler to test the condition in your custom combiner class? Leave all the slots connected, but for a given invocation, skip any that fail the condition.
Nat Goodspeed wrote:
[Nat] Might it be simpler to test the condition in your custom combiner class? Leave all the slots connected, but for a given invocation, skip any that fail the condition.
A different but related question: is it possible to examine the iterated connections from the combiner, or somehow associate state with each connection? How would the above be implemented, other than by creating a separate data structure that kept track of the ordinal any slots to skip? (This excluded method, in my opinion, largely negates the usefulness of the signals library in the first place, as it requires reimplementation of the basic primatives that the signals library is built on.) Aaron W. LaFramboise
participants (2)
-
Aaron W. LaFramboise
-
Nat Goodspeed