c++ - Is it possible to add some condition to `boost::signal` -


is possible add condition boost::signal. may boolean function , when emit signal should check if function returns true emit.

i don't want check condition during emitting because emitted many places. don't want check condition in slot because should not know condition.

if need emit signal many places way, add method it:

void emitsignal() {    if( /* condition */ ) {        _signal();    } } 

then call emitsignal() instead of emitting signal directly.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -