Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > by-pkgid > f30eb1b4d08ac51d6fa9ede1cab27d6b > files > 296

libsigc++2.0-doc-2.2.9-2.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::slot&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.7.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <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="tabs2">
    <ul class="tablist">
      <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">
    <ul>
      <li><a class="el" href="namespacesigc.html">sigc</a> </li>
      <li><a class="el" href="classsigc_1_1slot.html">slot</a> </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
  <div class="headertitle">
<h1>sigc::slot&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__slot.html">Slots</a>]</small>
</h1> </div>
</div>
<div class="contents">
<!-- doxytag: class="sigc::slot" --><!-- doxytag: inherits="sigc::slot7" -->
<p>Convenience wrapper for the numbered <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">sigc::slot</a># templates. <a href="#_details">More...</a></p>

<p><code>#include &lt;sigc++/functors/slot.h&gt;</code></p>
<!-- startSectionHeader --><div class="dynheader">
Inheritance diagram for sigc::slot&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt;:<!-- endSectionHeader --></div>
<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
<div class="center"><img src="classsigc_1_1slot__inherit__graph.png" border="0" usemap="#sigc_1_1slot_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_1slot_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_1slot_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_1slot7.html" title="Converts an arbitrary functor to a unified type which is opaque." alt="" coords="5,160,531,189"/><area shape="rect" id="node4" href="classsigc_1_1slot__base.html" title="Base type for slots." alt="" coords="211,83,325,112"/><area shape="rect" id="node6" href="structsigc_1_1functor__base.html" title="A hint to the compiler." alt="" coords="199,5,337,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>

<p><a href="classsigc_1_1slot-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1966941e9654adfb3af4b994fd18a7f3"></a><!-- doxytag: member="sigc::slot::parent_type" ref="a1966941e9654adfb3af4b994fd18a7f3" args="" -->
typedef <a class="el" href="classsigc_1_1slot7.html">slot7</a>&lt; T_return, <br class="typebreak"/>
T_arg1, T_arg2, T_arg3, T_arg4, <br class="typebreak"/>
T_arg5, T_arg6, T_arg7 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>parent_type</b></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class T_functor &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classsigc_1_1slot.html#a5ef6d7b77b877fda0a67d33ea5d08c30">slot</a> (const T_functor&amp; _A_func)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a slot from an arbitrary functor. <a href="#a5ef6d7b77b877fda0a67d33ea5d08c30"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac53122c7f0f1f4dd9493e9ac88837ae2"></a><!-- doxytag: member="sigc::slot::slot" ref="ac53122c7f0f1f4dd9493e9ac88837ae2" args="(const slot &amp;src)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>slot</b> (const <a class="el" href="classsigc_1_1slot.html">slot</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::slot&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_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">sigc::slot</a># templates. </p>
<p>Slots convert arbitrary functors to unified types which are opaque. <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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_arg4</em> Argument type used in the definition of <a class="el" href="classsigc_1_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_arg5</em> Argument type used in the definition of <a class="el" href="classsigc_1_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_arg6</em> Argument type used in the definition of <a class="el" href="classsigc_1_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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_arg7</em> Argument type used in the definition of <a class="el" href="classsigc_1_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" 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 slot 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 slot 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 temporarily block the functor's invocation from <a class="el" href="classsigc_1_1slot7.html#a115f4dc171664e693a6bb7afc41778d4" title="Invoke the contained functor unless slot is in blocking state.">operator()()</a>.</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_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">sigc::slot&lt;void, long&gt;</a> s = <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>(&amp;foo);
 s(19);
</pre></div> </dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5ef6d7b77b877fda0a67d33ea5d08c30"></a><!-- doxytag: member="sigc::slot::slot" ref="a5ef6d7b77b877fda0a67d33ea5d08c30" args="(const T_functor &amp;_A_func)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
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; </div>
<div class="memtemplate">
template &lt;class T_functor &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsigc_1_1slot.html">sigc::slot</a>&lt; T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 &gt;::<a class="el" href="classsigc_1_1slot.html">slot</a> </td>
          <td>(</td>
          <td class="paramtype">const T_functor &amp;&#160;</td>
          <td class="paramname"> <em>_A_func</em>&#160;)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a slot from an arbitrary functor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_A_func</td><td>The desired functor the new slot should be assigned to. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Mar 8 2011 11:44:41 for libsigc++ by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>