<!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< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > 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.7.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main 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="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"> <ul> <li><a class="el" href="namespacesigc.html">sigc</a> </li> <li><a class="el" href="classsigc_1_1signal.html">signal</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>sigc::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > Class Template Reference<br/> <small> [<a class="el" href="group__signal.html">Signals</a>]</small> </h1> </div> </div> <div class="contents"> <!-- doxytag: class="sigc::signal" --><!-- doxytag: inherits="signal7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil >" --> <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 <sigc++/signal.h></code></p> <!-- startSectionHeader --><div class="dynheader"> Inheritance diagram for sigc::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >:<!-- endSectionHeader --></div> <!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent"> <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" id="node2" href="classsigc_1_1signal7.html" title="sigc::signal7\< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, nil \>" alt="" coords="347,5,909,35"/><area shape="rect" id="node4" href="structsigc_1_1signal__base.html" title="Base class for the sigc::signal# templates." alt="" coords="168,5,299,35"/><area shape="rect" id="node6" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection." alt="" coords="5,5,120,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div> <p><a href="classsigc_1_1signal-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1signal_1_1accumulated.html">accumulated</a></td></tr> <tr><td class="mdescLeft"> </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><a name="pub-methods"></a> 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 &src)" -->  </td><td class="memItemRight" valign="bottom"><b>signal</b> (const <a class="el" href="classsigc_1_1signal.html">signal</a>& src)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <h3>template <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><br/> class sigc::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 ></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>signal 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 slot 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 slot implicitly.</p> <p>If you want to connect one signal 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 signal when invoked.</p> <p>Be careful if you directly pass one signal 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 signal is made and the signal's slots are not disconnected until both the signal 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'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<void, long></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 function...">sigc::ptr_fun</a>(&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 class="footer"/><address class="footer"><small>Generated on Tue Mar 8 2011 11:44:41 for libsigc++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>