Sophie

Sophie

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

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::adapts&lt; T_functor &gt; Struct 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="structsigc_1_1adapts.html">adapts</a>
  </div>
</div>
<div class="contents">
<h1>sigc::adapts&lt; T_functor &gt; Struct Template Reference<br/>
<small>
[<a class="el" href="group__adaptors.html">Adaptors</a>]</small>
</h1><!-- doxytag: class="sigc::adapts" --><!-- doxytag: inherits="sigc::adaptor_base" -->
<p>Base type for adaptors. <a href="#_details">More...</a></p>

<p><code>#include &lt;sigc++/adaptors/adaptor_trait.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sigc::adapts&lt; T_functor &gt;:</div>
<div class="dynsection">
<div class="center"><img src="structsigc_1_1adapts__inherit__graph.png" border="0" usemap="#sigc_1_1adapts_3_01T__functor_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="sigc_1_1adapts_3_01T__functor_01_4_inherit__map" id="sigc_1_1adapts_3_01T__functor_01_4_inherit__map">
<area shape="rect" href="structsigc_1_1bind__functor_3_010_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,24,1160,51"/><area shape="rect" href="structsigc_1_1bind__functor_3_011_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,75,1160,101"/><area shape="rect" href="structsigc_1_1bind__functor_3_012_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,125,1160,152"/><area shape="rect" href="structsigc_1_1bind__functor_3_013_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,176,1160,203"/><area shape="rect" href="structsigc_1_1bind__functor_3_014_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,227,1160,253"/><area shape="rect" href="structsigc_1_1bind__functor_3_015_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,277,1160,304"/><area shape="rect" href="structsigc_1_1bind__functor_3_016_00_01T__functor_00_01T__bound_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds an argument to the wrapped functor." alt="" coords="728,328,1160,355"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds 1 argument(s) to the wrapped functor." alt="" coords="729,379,1159,405"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01nil_00_01nil_00_01nil_00_01nil_00_01nil_01_4.html" title="Adaptor that binds 2 argument(s) to the wrapped functor." alt="" coords="712,429,1176,456"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01T__type3_00_01n6d14effad731c8dfead9984e87967108.html" title="Adaptor that binds 3 argument(s) to the wrapped functor." alt="" coords="693,480,1195,507"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01T__type3_00_01T8abd615cc403946700f41917bb90042c.html" title="Adaptor that binds 4 argument(s) to the wrapped functor." alt="" coords="676,531,1212,557"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01T__type3_00_01Tf230465d8da8d21a2da815d7eb05b413.html" title="Adaptor that binds 5 argument(s) to the wrapped functor." alt="" coords="657,581,1231,608"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01T__type3_00_01T5d526f12c92849dac4a70f282eec9dc2.html" title="Adaptor that binds 6 argument(s) to the wrapped functor." alt="" coords="640,632,1248,659"/><area shape="rect" href="structsigc_1_1bind__functor_3-1_00_01T__functor_00_01T__type1_00_01T__type2_00_01T__type3_00_01T1564029be5092b4f54029884f8072971.html" title="Adaptor that binds 7 argument(s) to the wrapped functor." alt="" coords="621,683,1267,709"/><area shape="rect" href="structsigc_1_1bind__return__functor.html" title="Adaptor that fixes the return value of the wrapped functor." alt="" coords="811,733,1077,760"/><area shape="rect" href="structsigc_1_1hide__functor_3_010_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,784,1063,811"/><area shape="rect" href="structsigc_1_1hide__functor_3_011_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,835,1063,861"/><area shape="rect" href="structsigc_1_1hide__functor_3_012_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,885,1063,912"/><area shape="rect" href="structsigc_1_1hide__functor_3_013_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,936,1063,963"/><area shape="rect" href="structsigc_1_1hide__functor_3_014_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,987,1063,1013"/><area shape="rect" href="structsigc_1_1hide__functor_3_015_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,1037,1063,1064"/><area shape="rect" href="structsigc_1_1hide__functor_3_016_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="825,1088,1063,1115"/><area shape="rect" href="structsigc_1_1hide__functor_3-1_00_01T__functor_01_4.html" title="Adaptor that adds a dummy parameter to the wrapped functor." alt="" coords="824,1139,1064,1165"/><area shape="rect" href="structsigc_1_1retype__functor.html" title="Adaptor that performs C&#45;style casts on the parameters passed on to the functor." alt="" coords="827,1189,1061,1216"/><area shape="rect" href="structsigc_1_1retype__return__functor.html" title="Adaptor that perform a C&#45;style cast on the return value of a functor." alt="" coords="803,1240,1085,1267"/><area shape="rect" href="structsigc_1_1retype__return__functor_3_01void_00_01T__functor_01_4.html" title="Adaptor that perform a C&#45;style cast on the return value of a functor." alt="" coords="787,1291,1101,1317"/><area shape="rect" href="structsigc_1_1adaptor__base.html" title="A hint to the compiler." alt="" coords="193,657,335,684"/><area shape="rect" href="structsigc_1_1functor__base.html" title="A hint to the compiler." alt="" coords="7,657,143,684"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="structsigc_1_1adapts-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="a914e75556dae1fdcf0162c4c99aca79d"></a><!-- doxytag: member="sigc::adapts::result_type" ref="a914e75556dae1fdcf0162c4c99aca79d" args="" -->
typedef adaptor_trait<br class="typebreak"/>
&lt; T_functor &gt;::result_type&#160;</td><td class="memItemRight" valign="bottom"><b>result_type</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c3f3b614455552f4cd5d88b1f330248"></a><!-- doxytag: member="sigc::adapts::adaptor_type" ref="a5c3f3b614455552f4cd5d88b1f330248" args="" -->
typedef adaptor_trait<br class="typebreak"/>
&lt; T_functor &gt;::adaptor_type&#160;</td><td class="memItemRight" valign="bottom"><b>adaptor_type</b></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsigc_1_1adapts.html#a947b69ccbdcabd4ef4163dcab96096f8">adapts</a> (const T_functor&amp; _A_functor)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an adaptor that wraps the passed functor. <a href="#a947b69ccbdcabd4ef4163dcab96096f8"></a><br/></td></tr>
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f4b37eb160708baf17de57f2abce7a7"></a><!-- doxytag: member="sigc::adapts::functor_" ref="a2f4b37eb160708baf17de57f2abce7a7" args="" -->
adaptor_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsigc_1_1adapts.html#a2f4b37eb160708baf17de57f2abce7a7">functor_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adaptor that is invoked from operator()(). <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template &lt;class T_functor&gt;<br/>
 struct sigc::adapts&lt; T_functor &gt;</h3>

<p>Base type for adaptors. </p>
<p><a class="el" href="structsigc_1_1adapts.html" title="Base type for adaptors.">adapts</a> wraps adaptors, functors, function pointers and class methods. It contains a single member functor which is always a <a class="el" href="structsigc_1_1adaptor__base.html" title="A hint to the compiler.">sigc::adaptor_base</a>. The typedef adaptor_type defines the exact type that is used to store the adaptor, functor, function pointer or class method passed into the constructor. It differs from <em>T_functor</em> unless <em>T_functor</em> inherits from <a class="el" href="structsigc_1_1adaptor__base.html" title="A hint to the compiler.">sigc::adaptor_base</a>.</p>
<dl class="user"><dt><b>Example of a simple adaptor:</b></dt><dd><div class="fragment"><pre class="fragment"> <span class="keyword">template</span> &lt;T_functor&gt;
   <span class="keyword">struct </span>my_adpator : <span class="keyword">public</span> sigc::<a class="code" href="structsigc_1_1adapts.html#a947b69ccbdcabd4ef4163dcab96096f8" title="Constructs an adaptor that wraps the passed functor.">adapts</a>&lt;T_functor&gt;
   {
     <span class="keyword">template</span> &lt;<span class="keyword">class</span> T_arg1=<span class="keywordtype">void</span>, <span class="keyword">class</span> T_arg2=<span class="keywordtype">void</span>&gt;
     <span class="keyword">struct </span>deduce_result_type
     { <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structsigc_1_1deduce__result__type.html" title="Deduce the return type of a functor.">sigc::deduce_result_type&lt;T_functor, T_arg1, T_arg2&gt;::type</a> type; };
     <span class="keyword">typedef</span> <span class="keyword">typename</span> sigc::functor_trait&lt;T_functor&gt;::result_type result_type;

     result_type
     operator()() <span class="keyword">const</span>;

     <span class="keyword">template</span> &lt;<span class="keyword">class</span> T_arg1&gt;
     <span class="keyword">typename</span> deduce_result_type&lt;T_arg1&gt;::type
     operator()(T_arg1 _A_arg1) <span class="keyword">const</span>;

     <span class="keyword">template</span> &lt;<span class="keyword">class</span> T_arg1, <span class="keyword">class</span> T_arg2&gt;
     <span class="keyword">typename</span> deduce_result_type&lt;T_arg1, T_arg2&gt;::type
     operator()(T_arg1 _A_arg1, <span class="keyword">class</span> T_arg2) <span class="keyword">const</span>;

     <span class="keyword">explicit</span> adaptor_functor(<span class="keyword">const</span> T_functor&amp; _A_functor) <span class="comment">// Constructs a my_functor object that wraps the passed functor.</span>
       : sigc::<a class="code" href="structsigc_1_1adapts.html#a947b69ccbdcabd4ef4163dcab96096f8" title="Constructs an adaptor that wraps the passed functor.">adapts</a>&lt;T_functor&gt;(_A_functor) {}

     <span class="keyword">mutable</span> T_functor <a class="code" href="structsigc_1_1adapts.html#a2f4b37eb160708baf17de57f2abce7a7" title="Adaptor that is invoked from operator()().">functor_</a>; <span class="comment">// Functor that is invoked from operator()().</span>
   };
</pre></div> </dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a947b69ccbdcabd4ef4163dcab96096f8"></a><!-- doxytag: member="sigc::adapts::adapts" ref="a947b69ccbdcabd4ef4163dcab96096f8" args="(const T_functor &amp;_A_functor)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_functor&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structsigc_1_1adapts.html">sigc::adapts</a>&lt; T_functor &gt;::<a class="el" href="structsigc_1_1adapts.html">adapts</a> </td>
          <td>(</td>
          <td class="paramtype">const T_functor &amp;&#160;</td>
          <td class="paramname"> <em>_A_functor</em></td>
          <td>&#160;)&#160;</td>
          <td><code> [inline, explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs an adaptor that wraps the passed 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_functor</em>&#160;</td><td>Functor to invoke from operator()(). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 21:44:54 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>