Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template signal

boost::signal — Safe multicast callback.

Synopsis

// In header: <boost/signal.hpp>

template<typename Signature, typename Combiner = last_value<R>, 
         typename Group = int, typename GroupCompare = std::less<Group>, 
         typename SlotFunction = functionN<Signature> > 
class signal : public signalN<R, T1, T2, ..., TN, Combiner, Group, GroupCompare, SlotFunction>
{
public:
  // construct/copy/destruct
  signal(const combiner_type& = combiner_type(), 
         const group_compare_type& = group_compare_type());
};

Description

Class template signal is a thin wrapper around the numbered class templates signal0, signal1, etc. It accepts a function type with N arguments instead of N separate arguments, and derives from the appropriate signalN instantiation.

All functionality of this class template is in its base class signalN.

Template Parameters

  1. typename Signature

  2. typename Combiner = last_value<R>
  3. typename Group = int
  4. typename GroupCompare = std::less<Group>
  5. typename SlotFunction = functionN<Signature>

signal public construct/copy/destruct

  1. signal(const combiner_type& combiner = combiner_type(), 
           const group_compare_type& compare = group_compare_type());

    Effects:

    Initializes the base class with the given combiner and comparison objects.

PrevUpHomeNext