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

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

C# random value from dictionary and tuple -

spring - Java 1.8 ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet -