proposed modif for boost connection
I took a look at libsidc++ and found very interresting the way of blocking/unblocking connections. I added some small modifications in boost::signals lib in order to have this functionality (2 patches in attachment to apply at the parent of the boost_1_32_0 distrib). Only the interface of connection has changed (3 new methods), and I added a boolean flag in basic_connection struct. So, my questions are: 1) is it interresting to incorporate it (for me, YES, it is veru useful)? 2) is it a safe implementation? You can test it like that: MySignal sig ; boost::signals::connection conn1 = sig.connect(&fct1) ; boost::signals::connection conn2 = sig.connect(&fct2) ; sig(10) ; // call fct1 and fct2 conn1.block() ; sig(20) ; // call only fct2 conn1.unblock() ; sig(30) ; // call fct1 and fct2
On Thursday 10 February 2005 05:46 am, frantz.maerten@igeoss.com wrote:
I took a look at libsidc++ and found very interresting the way of blocking/unblocking connections.
I added some small modifications in boost::signals lib in order to have this functionality (2 patches in attachment to apply at the parent of the boost_1_32_0 distrib). Only the interface of connection has changed (3 new methods), and I added a boolean flag in basic_connection struct.
I've checked in this code, modified slightly and with docs & tests. I made three changes: - is_blocked() -> blocked(), to match the standard's naming conventions and libsigc++ - block() now takes a boolean parameter (again, matching libsigc++) - blocked() returns true when the slot is disconnected or blocked. Thanks for the patch! Doug
participants (2)
-
Douglas Gregor
-
frantz.maerten@igeoss.com