Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Support traits and function objects

There are a few things that must be defined in order for a class to function seamlessly as a component within the library.

Components that produce data must specialize:

boost::signals::is_component
Boost.TypeTraits style trait - true for data-producing components.
boost::signals::get_signal_type
Metafunction returning the underlying boost::signal type of the produced data (currently, underlying signal signature). If the component is a class with a type signal_type, it is already supported.
boost::signals::get_signal
Function object returning a reference to the underlying signal.

Components that consume data must specialize:

boost::signals::get_slot
Function object returning a boost::function of the underlying slot.
Copyright © 2007 Stjepan Rajko

PrevUpHomeNext