Sophie

Sophie

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

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::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.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="structsigc_1_1adapts.html">adapts</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> &#124;
<a href="#pub-attribs">Public Attributes</a> </div>
  <div class="headertitle">
<h1>sigc::adapts&lt; T_functor &gt; Struct Template Reference<br/>
<small>
[<a class="el" href="group__adaptors.html">Adaptors</a>]</small>
</h1> </div>
</div>
<div class="contents">
<!-- 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>
<!-- startSectionHeader --><div class="dynheader">
Inheritance diagram for sigc::adapts&lt; T_functor &gt;:<!-- endSectionHeader --></div>
<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
<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" id="node7" 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="729,15,1161,44"/><area shape="rect" id="node9" 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="729,68,1161,98"/><area shape="rect" id="node11" 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="729,122,1161,151"/><area shape="rect" id="node13" 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="729,175,1161,204"/><area shape="rect" id="node15" 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="729,228,1161,258"/><area shape="rect" id="node17" 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="729,282,1161,311"/><area shape="rect" id="node19" 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="729,335,1161,364"/><area shape="rect" id="node21" 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="731,388,1160,418"/><area shape="rect" id="node23" 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,442,1179,471"/><area shape="rect" id="node25" 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="695,495,1196,524"/><area shape="rect" id="node27" 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,548,1215,578"/><area shape="rect" id="node29" 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="659,602,1232,631"/><area shape="rect" id="node31" 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,655,1251,684"/><area shape="rect" id="node33" 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="623,708,1268,738"/><area shape="rect" id="node35" href="structsigc_1_1bind__return__functor.html" title="Adaptor that fixes the return value of the wrapped functor." alt="" coords="811,762,1080,791"/><area shape="rect" id="node37" 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="827,815,1064,844"/><area shape="rect" id="node39" 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="827,868,1064,898"/><area shape="rect" id="node41" 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="827,922,1064,951"/><area shape="rect" id="node43" 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="827,975,1064,1004"/><area shape="rect" id="node45" 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="827,1028,1064,1058"/><area shape="rect" id="node47" 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="827,1082,1064,1111"/><area shape="rect" id="node49" 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="827,1135,1064,1164"/><area shape="rect" id="node51" 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="825,1188,1065,1218"/><area shape="rect" id="node53" 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,1242,1064,1271"/><area shape="rect" id="node55" href="structsigc_1_1retype__return__functor.html" title="Adaptor that performs a C&#45;style cast on the return value of a functor." alt="" coords="804,1295,1087,1324"/><area shape="rect" id="node57" href="structsigc_1_1retype__return__functor_3_01void_00_01T__functor_01_4.html" title="Adaptor that performs a C&#45;style cast on the return value of a functor." alt="" coords="787,1348,1104,1378"/><area shape="rect" id="node2" href="structsigc_1_1adaptor__base.html" title="A hint to the compiler." alt="" coords="193,682,335,711"/><area shape="rect" id="node4" href="structsigc_1_1functor__base.html" title="A hint to the compiler." alt="" coords="5,682,144,711"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>

<p><a href="structsigc_1_1adapts-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="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><a name="pub-methods"></a>
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><a name="pub-attribs"></a>
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>adapts 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> sigc::deduce_result_type&lt;T_functor, T_arg1, T_arg2&gt;::type <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01172.html#ga2c2933c16c723af4d77eb939438617ca">type</a>; };
   <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> <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01172.html#ga2c2933c16c723af4d77eb939438617ca">deduce_result_type&lt;T_arg1&gt;::type</a>
   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> <a class="codeRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01172.html#ga2c2933c16c723af4d77eb939438617ca">deduce_result_type&lt;T_arg1, T_arg2&gt;::type</a>
   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>&#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 class="params">
    <tr><td class="paramname">_A_functor</td><td>Functor to invoke from operator()(). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Mar 8 2011 11:44:42 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>