Re: Callback-related libraries and terminology
Scott Meyers wrote:
kanze wrote:
Or inversely, what does boost::signal offer in addition to what
boost::function offers? I'm not that familiar with
boost::signal, but a quick glance at the doc didn't reveal the
most important addition for this sort of use: the possibility of
associating a filter with the callback, so that it will only be
called in certain circumstances.
I'm no expert, but AFAIK, Boost.Signal has no such functionality. Unlike
Boost.Function (and tr1::function),
That's my impression as well. Of course, since they take
boost::function as parameters, it wouldn't be difficult to
insert filtering there.
however, it is possible to "connect" multiple functions
(actually callable entities) to a single signal, which is why
I have this notion that a Boost signal can be thought of as a
"container" of callbacks.
A non-copiable container with a function interface which
automatically iterates over the elements.
--
James Kanze GABI Software
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]