<!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::slot0< T_return > 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_1slot0.html">slot0</a> </div> </div> <div class="contents"> <h1>sigc::slot0< T_return > Class Template Reference<br/> <small> [<a class="el" href="group__slot.html">Slots</a>]</small> </h1><!-- doxytag: class="sigc::slot0" --><!-- 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::slot0< T_return >:</div> <div class="dynsection"> <div class="center"><img src="classsigc_1_1slot0__inherit__graph.png" border="0" usemap="#sigc_1_1slot0_3_01T__return_01_4_inherit__map" alt="Inheritance graph"/></div> <map name="sigc_1_1slot0_3_01T__return_01_4_inherit__map" id="sigc_1_1slot0_3_01T__return_01_4_inherit__map"> <area shape="rect" href="classsigc_1_1slot_3_01T__return_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Convenience wrapper for the numbered sigc::slot0 template." alt="" coords="5,239,320,265"/><area shape="rect" href="classsigc_1_1slot__base.html" title="Base type for slots." alt="" coords="105,84,220,111"/><area shape="rect" href="structsigc_1_1functor__base.html" title="A hint to the compiler." alt="" coords="95,7,231,33"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classsigc_1_1slot0-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="aca0c967b605e09d5a87015d95e93d4f7"></a><!-- doxytag: member="sigc::slot0::result_type" ref="aca0c967b605e09d5a87015d95e93d4f7" args="" --> typedef T_return </td><td class="memItemRight" valign="bottom"><b>result_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_1slot0.html#a217f897aa20f2a1a9fffcb6500598600">operator()</a> () 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="#a217f897aa20f2a1a9fffcb6500598600"></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_1slot0.html#ab5e8957dd339cc35bfc58fa64718eb51">slot0</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="#ab5e8957dd339cc35bfc58fa64718eb51"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acce9a5d9a4f939e405383092ba717f72"></a><!-- doxytag: member="sigc::slot0::slot0" ref="acce9a5d9a4f939e405383092ba717f72" args="(const slot0 &src)" -->  </td><td class="memItemRight" valign="bottom"><b>slot0</b> (const <a class="el" href="classsigc_1_1slot0.html">slot0</a>& src)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsigc_1_1slot0.html">slot0</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot0.html#a49bba0540dcc76fb19e49d19a1acd563">operator=</a> (const <a class="el" href="classsigc_1_1slot0.html">slot0</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="#a49bba0540dcc76fb19e49d19a1acd563"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <h3>template <class T_return><br/> class sigc::slot0< T_return ></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_1slot0.html#a217f897aa20f2a1a9fffcb6500598600" 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_1slot0.html#a217f897aa20f2a1a9fffcb6500598600" 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_1slot0.html#a217f897aa20f2a1a9fffcb6500598600" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>.</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_1slot0.html#a217f897aa20f2a1a9fffcb6500598600" 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="ab5e8957dd339cc35bfc58fa64718eb51"></a><!-- doxytag: member="sigc::slot0::slot0" ref="ab5e8957dd339cc35bfc58fa64718eb51" args="(const T_functor &_A_func)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return > </div> <div class="memtemplate"> template <class T_functor > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classsigc_1_1slot0.html">sigc::slot0</a>< T_return >::<a class="el" href="classsigc_1_1slot0.html">slot0</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="a217f897aa20f2a1a9fffcb6500598600"></a><!-- doxytag: member="sigc::slot0::operator()" ref="a217f897aa20f2a1a9fffcb6500598600" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return > </div> <table class="memname"> <tr> <td class="memname">T_return <a class="el" href="classsigc_1_1slot0.html">sigc::slot0</a>< T_return >::operator() </td> <td>(</td> <td class="paramname"></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 class="return"><dt><b>Returns:</b></dt><dd>The return value of the functor invocation. </dd></dl> </div> </div> <a class="anchor" id="a49bba0540dcc76fb19e49d19a1acd563"></a><!-- doxytag: member="sigc::slot0::operator=" ref="a49bba0540dcc76fb19e49d19a1acd563" args="(const slot0 &src)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template <class T_return > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classsigc_1_1slot0.html">slot0</a>& <a class="el" href="classsigc_1_1slot0.html">sigc::slot0</a>< T_return >::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classsigc_1_1slot0.html">slot0</a>< T_return >& </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>