<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<!--
Copyright Frank Mori Hess 2009

Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-->
<header name="boost/signals2/signal_type.hpp" last-revision="$Date: 2007-03-06 16:51:55 -0500 (Tue, 06 Mar 2007) $">
  <namespace name="boost">
    <namespace name="signals2">
      <namespace name="keywords">
        <class name="signature_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="Signature"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>Signature</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(signature_type)</code>
            </para>
          </description>
        </class>
        <class name="combiner_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="Combiner"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>Combiner</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(combiner_type)</code>
            </para>
          </description>
        </class>
        <class name="group_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="Group"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>Group</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(group_type)</code>
            </para>
          </description>
        </class>
        <class name="group_compare_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="GroupCompare"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>GroupCompare</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(group_compare_type)</code>
            </para>
          </description>
        </class>
        <class name="slot_function_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="SlotFunction"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>SlotFunction</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(slot_function_type)</code>
            </para>
          </description>
        </class>
        <class name="extended_slot_function_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="ExtendedSlotFunction"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>ExtendedSlotFunction</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(extended_slot_function_type)</code>
            </para>
          </description>
        </class>
        <class name="mutex_type">
          <inherit access="public"><emphasis>unspecified-type</emphasis></inherit>
          <template>
            <template-type-parameter name="Mutex"/>
          </template>
          <purpose>A template keyword for <classname>signal_type</classname>.</purpose>
          <description>
            <para>
              This class is a template keyword which may be used to pass the wrapped <code>Mutex</code>
              template type to the <classname>signal_type</classname> metafunction as a named parameter.
            </para>
            <para>
              The code for this class is generated by a calling a macro from the Boost.Parameter library:
              <code>BOOST_PARAMETER_TEMPLATE_KEYWORD(mutex_type)</code>
            </para>
          </description>
        </class>
      </namespace>
      <class name="signal_type">
        <template>
          <template-type-parameter name="A0"/>
          <template-type-parameter name="A1">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
          <template-type-parameter name="A2">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
          <template-type-parameter name="A3">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
          <template-type-parameter name="A4">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
          <template-type-parameter name="A5">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
          <template-type-parameter name="A6">
            <default>boost::parameter::void_</default>
          </template-type-parameter>
        </template>
        <purpose>Specify a the template type parameters of a boost::signals2::signal using named parameters.</purpose>
        <description>
          <para>The <code>signal_type</code> metafunction employs the Boost.Parameter library to
            allow users to specify the template type parameters of a <classname>signal</classname>
            using named parameters.  The resulting signal type is provided through the
            <code>signal_type::type</code> typedef.  Named template type parameters
            can enhance readability of code, and provide convenience for specifying classes
            which have a large number of template parameters.
          </para>
          <para>The template type parameters may be passed positionally, similarly to passing them
            to the <classname>signal</classname> class directly.  Or, they may be passed as named template parameters
            by wrapping them in one of the template keyword classes provided in the
            <code>boost::signals2::keywords</code> namespace.  The supported template keywords are:
            <classname>keywords::signature_type</classname>, <classname>keywords::combiner_type</classname>,
            <classname>keywords::group_type</classname>, <classname>keywords::group_compare_type</classname>,
            <classname>keywords::slot_function_type</classname>, <classname>keywords::extended_slot_function_type</classname>,
            and <classname>keywords::mutex_type</classname>.
          </para>
          <para>The default types for unspecified template type parameters are the same as those for the
            <classname>signal</classname> class.
          </para>
          <para>
            Named template type parameters are especially convenient when you only wish to change a
            few of a signal's template type parameters from their defaults, and the parameters
            you wish to change are near the end of the signal's template parameter list.
            For example, if you only wish to change the <code>Mutex</code> template type
            parameter of a signal, you might write:
          </para>
<programlisting>namespace bs2 = boost::signals2;
using bs2::keywords;
bs2::signal_type&lt;void (), mutex_type&lt;bs2::dummy_mutex&gt; &gt;::type sig;
</programlisting>
          <para>For comparison, to specify the same type using the signal class directly looks like:</para>
<programlisting>namespace bs2 = boost::signals2;
bs2::signal
  &lt;
    void (),
    bs2::optional_last_value&lt;void&gt;,
    int,
    std::less&lt;int&gt;,
    boost::function&lt;void ()&gt;,
    boost::function&lt;void (const connection &amp;)&gt;,
    bs2::dummy_mutex
  &gt; sig;
</programlisting>
        </description>
        <typedef name="signature_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="combiner_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="group_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="group_compare_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="slot_function_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="extended_slot_function_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="mutex_type">
          <type><emphasis>implementation-detail</emphasis></type>
        </typedef>
        <typedef name="type">
          <type>typename signal&lt;signature_type, combiner_type, ..., mutex_type&gt;</type>
        </typedef>
      </class>
    </namespace>
  </namespace>
</header>
