Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-08-20 00:52:49

Edward Diener wrote:
>Why not use boost::signals for your event interface. It is much better than
>hand-coded actions and listeners, since any type of function can handle an
>event. The technology is already in Boost so why re-invent the wheel.

The signals library looks very good, but it solves half the problem. You
need to work out what types of signals are raised:
and have a signal for each. This would mean that you could have hundreds of

It might be easier to group events by type, use signals to dispatch them and
an event handler like I suggested to deal with them, e.g.
   MouseEvent( unsigned int event, const MouseEvent & info );
   KeyEvent( unsigned int event, const KeyEvent & info );

This might be useful for command/reflection type events, having a
   std::list< boost::signal< bool ( const Event & ) > >
or even
   std::map< std::string, boost::signal< ... > >


Express yourself with cool new emoticons

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