Library 12. Signals

How Does the Signals Library Improve Your Programs?

• Flexible multicast callbacks for functions and function objects

• A robust mechanism for triggering and handling events

• Compatibility with function object factories, such as Boost.Bind and Boost.Lambda

The Boost.Signals library reifies signals and slots, where a signal is something that can be “emitted,” and slots are connections that receive such signals. This is a well-known design pattern that goes under a few different names—Observer, signals/slots, publisher/subscriber, events (and event targets)—but these names all refer to the same thing, which is a one-to-many relation between some source of information and instances that are interested in knowing when that ...

Get Beyond the C++ Standard Library: An Introduction to Boost now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.