<!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::slot3< T_return, T_arg1, T_arg2, T_arg3 > 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 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 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"><a class="el" href="namespacesigc.html">sigc</a>::<a class="el" href="classsigc_1_1slot3.html">slot3</a> </div> </div> <div class="contents"> <h1>sigc::slot3< T_return, T_arg1, T_arg2, T_arg3 > Class Template Reference<br/> <small> [<a class="el" href="group__slot.html">Slots</a>]</small> </h1><!-- doxytag: class="sigc::slot3" --><!-- doxytag: inherits="sigc::slot_base" --> <p>Converts an arbitrary functor to a unified type which is opaque. <a href="#_details">More...</a></p> <p><code>#include <sigc++/functors/slot.h></code></p> <div class="dynheader"> Inheritance diagram for sigc::slot3< T_return, T_arg1, T_arg2, T_arg3 >:</div> <div class="dynsection"> <div class="center"><img src="classsigc_1_1slot3__inherit__graph.png" border="0" usemap="#sigc_1_1slot3_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_01_4_inherit__map" alt="Inheritance graph"/></div> <map name="sigc_1_1slot3_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_01_4_inherit__map" id="sigc_1_1slot3_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_01_4_inherit__map"> <area shape="rect" href="classsigc_1_1slot_3_01T__return_00_01T__arg1_00_01T__arg2_00_01T__arg3_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Convenience wrapper for the numbered sigc::slot3 template." alt="" coords="5,239,405,265"/><area shape="rect" href="classsigc_1_1slot__base.html" title="Base type for slots." alt="" coords="148,84,263,111"/><area shape="rect" href="structsigc_1_1functor__base.html" title="A hint to the compiler." alt="" coords="137,7,273,33"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classsigc_1_1slot3-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69cca26f164c63de6ffa70a3806fb936"></a><!-- doxytag: member="sigc::slot3::result_type" ref="a69cca26f164c63de6ffa70a3806fb936" args="" --> typedef T_return </td><td class="memItemRight" valign="bottom"><b>result_type</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2aa9798df311c3de224e535788bb9a12"></a><!-- doxytag: member="sigc::slot3::arg1_type_" ref="a2aa9798df311c3de224e535788bb9a12" args="" --> typedef type_trait< T_arg1 >::take </td><td class="memItemRight" valign="bottom"><b>arg1_type_</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add77d4126a1dd4e56f19320767b9cc29"></a><!-- doxytag: member="sigc::slot3::arg2_type_" ref="add77d4126a1dd4e56f19320767b9cc29" args="" --> typedef type_trait< T_arg2 >::take </td><td class="memItemRight" valign="bottom"><b>arg2_type_</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afef6a5f4b398ef66242d1568e472a82c"></a><!-- doxytag: member="sigc::slot3::arg3_type_" ref="afef6a5f4b398ef66242d1568e472a82c" args="" --> typedef type_trait< T_arg3 >::take </td><td class="memItemRight" valign="bottom"><b>arg3_type_</b></td></tr> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">T_return </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996">operator()</a> (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Invoke the contained functor unless <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> is in blocking state. <a href="#a5bc54482d1e813a4dbded24a0893f996"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T_functor > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot3.html#a0672eb82919bdd0c2bd9ef38e28b9264">slot3</a> (const T_functor& _A_func)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> from an arbitrary functor. <a href="#a0672eb82919bdd0c2bd9ef38e28b9264"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa87acf0475e178f8d970bf05f84b04b"></a><!-- doxytag: member="sigc::slot3::slot3" ref="afa87acf0475e178f8d970bf05f84b04b" args="(const slot3 &src)" -->  </td><td class="memItemRight" valign="bottom"><b>slot3</b> (const <a class="el" href="classsigc_1_1slot3.html">slot3</a>& src)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsigc_1_1slot3.html">slot3</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot3.html#a2ff8f9202019d25ddab688128c504e72">operator=</a> (const <a class="el" href="classsigc_1_1slot3.html">slot3</a>& src)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Overrides this <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> making a copy from another <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a>. <a href="#a2ff8f9202019d25ddab688128c504e72"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <h3>template <class T_return, class T_arg1, class T_arg2, class T_arg3><br/> class sigc::slot3< T_return, T_arg1, T_arg2, T_arg3 ></h3> <p>Converts an arbitrary functor to a unified type which is opaque. </p> <p><a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">sigc::slot</a> itself is a functor or to be more precise a closure. It contains a single, arbitrary functor (or closure) that is executed in <a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>.</p> <p>The template arguments determine the function signature of <a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>:</p> <ul> <li><em>T_return</em> The return type of <a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>.</li> <li><em>T_arg1</em> Argument type used in the definition of <a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</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_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</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_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>. The default <code>nil</code> means no argument.</li> </ul> <p>To use simply assign the <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> to the desired functor. If the functor is not compatible with the parameter list defined with the template arguments compiler errors are triggered. When called the <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> will invoke the functor with minimal copies. <a class="el" href="classsigc_1_1slot__base.html#a69042c2e2b0e5449fbf8203e862192a7" title="Sets the blocking state.">block()</a> and <a class="el" href="classsigc_1_1slot__base.html#ad93eaf25fae13186a1af8f699c6004a1" title="Unsets the blocking state.">unblock()</a> can be used to block the functor's invocation from <a class="el" href="classsigc_1_1slot3.html#a5bc54482d1e813a4dbded24a0893f996" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a> temporarily.</p> <p>You should use the more convenient unnumbered <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">sigc::slot</a> template. </p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a0672eb82919bdd0c2bd9ef38e28b9264"></a><!-- doxytag: member="sigc::slot3::slot3" ref="a0672eb82919bdd0c2bd9ef38e28b9264" args="(const T_functor &_A_func)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return , class T_arg1 , class T_arg2 , class T_arg3 > </div> <div class="memtemplate"> template <class T_functor > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classsigc_1_1slot3.html">sigc::slot3</a>< T_return, T_arg1, T_arg2, T_arg3 >::<a class="el" href="classsigc_1_1slot3.html">slot3</a> </td> <td>(</td> <td class="paramtype">const T_functor & </td> <td class="paramname"> <em>_A_func</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructs a <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> from an arbitrary functor. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>_A_func</em> </td><td>The desirer functor the new <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> should be assigned to. </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a5bc54482d1e813a4dbded24a0893f996"></a><!-- doxytag: member="sigc::slot3::operator()" ref="a5bc54482d1e813a4dbded24a0893f996" args="(arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return , class T_arg1 , class T_arg2 , class T_arg3 > </div> <table class="memname"> <tr> <td class="memname">T_return <a class="el" href="classsigc_1_1slot3.html">sigc::slot3</a>< T_return, T_arg1, T_arg2, T_arg3 >::operator() </td> <td>(</td> <td class="paramtype">arg1_type_ </td> <td class="paramname"> <em>_A_a1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">arg2_type_ </td> <td class="paramname"> <em>_A_a2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">arg3_type_ </td> <td class="paramname"> <em>_A_a3</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Invoke the contained functor unless <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> is in blocking state. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>_A_a1</em> </td><td>Argument to be passed on to the functor. </td></tr> <tr><td valign="top"></td><td valign="top"><em>_A_a2</em> </td><td>Argument to be passed on to the functor. </td></tr> <tr><td valign="top"></td><td valign="top"><em>_A_a3</em> </td><td>Argument to be passed on to the functor. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The return value of the functor invocation. </dd></dl> </div> </div> <a class="anchor" id="a2ff8f9202019d25ddab688128c504e72"></a><!-- doxytag: member="sigc::slot3::operator=" ref="a2ff8f9202019d25ddab688128c504e72" args="(const slot3 &src)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return , class T_arg1 , class T_arg2 , class T_arg3 > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classsigc_1_1slot3.html">slot3</a>& <a class="el" href="classsigc_1_1slot3.html">sigc::slot3</a>< T_return, T_arg1, T_arg2, T_arg3 >::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classsigc_1_1slot3.html">slot3</a>< T_return, T_arg1, T_arg2, T_arg3 >& </td> <td class="paramname"> <em>src</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Overrides this <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> making a copy from another <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>src</em> </td><td>The <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> from which to make a copy. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>this</code>. </dd></dl> <p>Reimplemented from <a class="el" href="classsigc_1_1slot__base.html#a19522528264f1646f8ed982b0042ffad">sigc::slot_base</a>.</p> </div> </div> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 21:44:47 2010 for libsigc++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>