Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > bd29e346140bd3fbcbf1674e576e565a > files > 223

libsigc++2.0-doc-2.2.7-1mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libsigc++: sigc::signal&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespacesigc.html">sigc</a>::<a class="el" href="classsigc_1_1signal.html">signal</a>
  </div>
</div>
<div class="contents">
<h1>sigc::signal&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt; Class Template Reference<br/>
<small>
[<a class="el" href="group__signal.html">Signals</a>]</small>
</h1><!-- doxytag: class="sigc::signal" --><!-- doxytag: inherits="signal7&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil &gt;" -->
<p>Convenience wrapper for the numbered <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">sigc::signal</a># templates. <a href="#_details">More...</a></p>

<p><code>#include &lt;sigc++/signal.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sigc::signal&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt;:</div>
<div class="dynsection">
<div class="center"><img src="classsigc_1_1signal__inherit__graph.png" border="0" usemap="#sigc_1_1signal_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_00_01T__arg4_00_01T__arg5_00_01T__arg6_00_01T__arg7_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="sigc_1_1signal_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_00_01T__arg4_00_01T__arg5_00_01T__arg6_00_01T__arg7_01_4_inherit__map" id="sigc_1_1signal_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_00_01T__arg4_00_01T__arg5_00_01T__arg6_00_01T__arg7_01_4_inherit__map">
<area shape="rect" href="classsigc_1_1signal7.html" title="sigc::signal7\&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil \&gt;" alt="" coords="348,5,908,32"/><area shape="rect" href="structsigc_1_1signal__base.html" title="Base class for the sigc::signal# templates." alt="" coords="169,5,297,32"/><area shape="rect" href="structsigc_1_1trackable.html" title="Base class for objects with auto&#45;disconnection." alt="" coords="7,5,119,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classsigc_1_1signal-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1signal_1_1accumulated.html">accumulated</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience wrapper for the numbered <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">sigc::signal</a># templates. <a href="classsigc_1_1signal_1_1accumulated.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a271b486daa2bf801ed7d019da9aa33a1"></a><!-- doxytag: member="sigc::signal::signal" ref="a271b486daa2bf801ed7d019da9aa33a1" args="(const signal &amp;src)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>signal</b> (const <a class="el" href="classsigc_1_1signal.html">signal</a>&amp; src)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template &lt;class T_return, class T_arg1 = nil, class T_arg2 = nil, class T_arg3 = nil, class T_arg4 = nil, class T_arg5 = nil, class T_arg6 = nil, class T_arg7 = nil&gt;<br/>
 class sigc::signal&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt;</h3>

<p>Convenience wrapper for the numbered <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">sigc::signal</a># templates. </p>
<p><a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> can be used to <a class="el" href="classsigc_1_1signal7.html#adc55ac9b0f935fd87a67904022e03cb2" title="Add a slot to the list of slots.">connect()</a> slots that are invoked during subsequent calls to <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. Any functor or <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> can be passed into <a class="el" href="classsigc_1_1signal7.html#adc55ac9b0f935fd87a67904022e03cb2" title="Add a slot to the list of slots.">connect()</a>. It is converted into a <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> implicitly.</p>
<p>If you want to connect one <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> to another, use <a class="el" href="classsigc_1_1signal7.html#a0948c25035b18b01efa60d08b26f6d51" title="Creates a functor that calls emit() on this signal.">make_slot()</a> to retrieve a functor that emits the <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> when invoked.</p>
<p>Be careful if you directly pass one <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> into the <a class="el" href="classsigc_1_1signal7.html#adc55ac9b0f935fd87a67904022e03cb2" title="Add a slot to the list of slots.">connect()</a> method of another: a shallow copy of the <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> is made and the signal's slots are not disconnected until both the <a class="el" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal</a> and its clone are destroyed which is probably not what you want!</p>
<p>An STL-style list interface for the signal's list of slots can be retrieved with <a class="el" href="classsigc_1_1signal7.html#a68153d9079b4881352113079cd6216f7" title="Creates an STL-style interface for the signal&#39;s list of slots.">slots()</a>. This interface supports iteration, insertion and removal of slots.</p>
<p>The template arguments determine the function signature of the <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a> function:</p>
<ul>
<li><em>T_return</em> The desired return type of the <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a> function.</li>
<li><em>T_arg1</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg2</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg3</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg4</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg5</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg6</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
<li><em>T_arg7</em> Argument type used in the definition of <a class="el" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit()</a>. The default <code>nil</code> means no argument.</li>
</ul>
<p>To specify an accumulator type the nested class <a class="el" href="classsigc_1_1signal_1_1accumulated.html" title="Convenience wrapper for the numbered sigc::signal# templates.">signal::accumulated</a> can be used.</p>
<dl class="user"><dt><b>Example:</b></dt><dd><div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> foo(<span class="keywordtype">int</span>) {}
   <a class="code" href="classsigc_1_1signal.html" title="Convenience wrapper for the numbered sigc::signal# templates.">sigc::signal&lt;void, long&gt;</a> sig;
   sig.<a class="code" href="classsigc_1_1signal7.html#adc55ac9b0f935fd87a67904022e03cb2" title="Add a slot to the list of slots.">connect</a>(<a class="code" href="group__ptr__fun.html#gada8b678665c14dc85eb32d25b7299465" title="Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member...">sigc::ptr_fun</a>(&amp;foo));
   sig.<a class="code" href="classsigc_1_1signal7.html#a5ee8eaa67f05f84ee185841142a34fb0" title="Triggers the emission of the signal.">emit</a>(19);
</pre></div> </dd></dl>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 21:44:45 2010 for libsigc++ by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>