Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2004-12-24 19:33:13

Reece Dunn wrote:
> The handler is currently defined as boost::signal< bool ( event * ev )
> >, such that ev is the OS-specific event structure and the return
> value indicates is the message has been processed (and processing
> should be stopped). Since the signal has a non-member signature, you
> need a make_handler( Object * ob, bool ( Object::* h )( event *
> ev ))
> helper that constructs a function object that will call the member
> function.

Better would be boost::signal< boost::function<bool ( event * ev )> >. That
way the programmer can pass any type of C++ function as the handler, not
just member functions of classes from a monolithic bas class. Boost::bind<>
is very good at creating function types which boost::function objects can

Boost list run by bdawes at, gregod at, cpdaniel at, john at