Sophie

Sophie

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

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::const_volatile_limit_reference&lt; T_type, I_derives_trackable &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.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="classsigc_1_1const__volatile__limit__reference.html">const_volatile_limit_reference</a>
  </div>
</div>
<div class="contents">
<h1>sigc::const_volatile_limit_reference&lt; T_type, I_derives_trackable &gt; Class Template Reference</h1><!-- doxytag: class="sigc::const_volatile_limit_reference" -->
<p>A const_volatile_limit_reference&lt;Foo&gt; object stores a reference (Foo&amp;), but make sure that, if Foo inherits from <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a>, then <a class="el" href="group__sigcfunctors.html#gadab29aed05524743da16319da4430541" title="This function performs a functor on each of the targets of a functor.">visit_each&lt;&gt;()</a> will "limit" itself to the <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> reference instead of the derived reference. <a href="#_details">More...</a></p>

<p><code>#include &lt;sigc++/limit_reference.h&gt;</code></p>

<p><a href="classsigc_1_1const__volatile__limit__reference-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<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="classsigc_1_1const__volatile__limit__reference.html#a9a01809bae79cb1b13ee50ce9d84dcb8">const_volatile_limit_reference</a> (const T_type&amp; _A_target)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#a9a01809bae79cb1b13ee50ce9d84dcb8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const T_type&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1const__volatile__limit__reference.html#ab3ce1b09cad7a91c24c510e5915e4b7e">visit</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the entity to visit for <a class="el" href="group__sigcfunctors.html#gadab29aed05524743da16319da4430541" title="This function performs a functor on each of the targets of a functor.">visit_each()</a>. <a href="#ab3ce1b09cad7a91c24c510e5915e4b7e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const volatile T_type&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1const__volatile__limit__reference.html#a541dc87d0bda7a418aaa3dca1f9928da">invoke</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the reference. <a href="#a541dc87d0bda7a418aaa3dca1f9928da"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template &lt;class T_type, bool I_derives_trackable = is_base_and_derived&lt;trackable, T_type&gt;::value&gt;<br/>
 class sigc::const_volatile_limit_reference&lt; T_type, I_derives_trackable &gt;</h3>

<p>A const_volatile_limit_reference&lt;Foo&gt; object stores a reference (Foo&amp;), but make sure that, if Foo inherits from <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a>, then <a class="el" href="group__sigcfunctors.html#gadab29aed05524743da16319da4430541" title="This function performs a functor on each of the targets of a functor.">visit_each&lt;&gt;()</a> will "limit" itself to the <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> reference instead of the derived reference. </p>
<p>This avoids use of a reference to the derived type when the derived destructor has run. That can be a problem when using virtual inheritance.</p>
<p>If Foo inherits from <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">trackable</a> then both the derived reference and the <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> reference are stored, so we can later retrieve the <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> reference without doing an implicit conversion. To retrieve the derived reference (so that you invoke methods or members of it), use <a class="el" href="classsigc_1_1const__volatile__limit__reference.html#a541dc87d0bda7a418aaa3dca1f9928da" title="Retrieve the reference.">invoke()</a>. To retrieve the <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">trackable</a> reference (so that you can call <a class="el" href="group__sigcfunctors.html#gadab29aed05524743da16319da4430541" title="This function performs a functor on each of the targets of a functor.">visit_each()</a> on it), you use <a class="el" href="classsigc_1_1const__volatile__limit__reference.html#ab3ce1b09cad7a91c24c510e5915e4b7e" title="Retrieve the entity to visit for visit_each().">visit()</a>.</p>
<p>If Foo does not inherit from <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a> then <a class="el" href="classsigc_1_1const__volatile__limit__reference.html#a541dc87d0bda7a418aaa3dca1f9928da" title="Retrieve the reference.">invoke()</a> and <a class="el" href="classsigc_1_1const__volatile__limit__reference.html#ab3ce1b09cad7a91c24c510e5915e4b7e" title="Retrieve the entity to visit for visit_each().">visit()</a> just return the derived reference.</p>
<p>This is used for bound (<a class="el" href="group__bind.html#ga2148290d2cf9c1961ec157a085badd5a" title="Creates an adaptor of type sigc::bind_functor which binds the passed argument to...">sigc::bind</a>) <a class="el" href="classsigc_1_1slot.html" title="Convenience wrapper for the numbered sigc::slot# templates.">slot</a> parameters (via <a class="el" href="classsigc_1_1bound__argument.html" title="A bound_argument&lt;Foo&gt; object stores a bound (for instance, with sigc::bind()...">bound_argument</a>), bound return values, and, with <a class="el" href="group__mem__fun.html#ga7d9ea809173f48bf5c76cf1989591602" title="Creates a functor of type sigc::mem_functor0 which wraps a method.">mem_fun()</a>, the reference to the handling object.</p>
<ul>
<li><em>T_type</em> The type of the reference. </li>
</ul>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9a01809bae79cb1b13ee50ce9d84dcb8"></a><!-- doxytag: member="sigc::const_volatile_limit_reference::const_volatile_limit_reference" ref="a9a01809bae79cb1b13ee50ce9d84dcb8" args="(const T_type &amp;_A_target)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = is_base_and_derived&lt;trackable, T_type&gt;::value&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsigc_1_1const__volatile__limit__reference.html">sigc::const_volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::<a class="el" href="classsigc_1_1const__volatile__limit__reference.html">const_volatile_limit_reference</a> </td>
          <td>(</td>
          <td class="paramtype">const T_type &amp;&#160;</td>
          <td class="paramname"> <em>_A_target</em></td>
          <td>&#160;)&#160;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </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_target</em>&#160;</td><td>The reference to limit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a541dc87d0bda7a418aaa3dca1f9928da"></a><!-- doxytag: member="sigc::const_volatile_limit_reference::invoke" ref="a541dc87d0bda7a418aaa3dca1f9928da" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = is_base_and_derived&lt;trackable, T_type&gt;::value&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const volatile T_type&amp; <a class="el" href="classsigc_1_1const__volatile__limit__reference.html">sigc::const_volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::invoke </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the reference. </p>
<p>This is always a reference to the derived instance. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The reference. </dd></dl>

</div>
</div>
<a class="anchor" id="ab3ce1b09cad7a91c24c510e5915e4b7e"></a><!-- doxytag: member="sigc::const_volatile_limit_reference::visit" ref="ab3ce1b09cad7a91c24c510e5915e4b7e" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = is_base_and_derived&lt;trackable, T_type&gt;::value&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const T_type&amp; <a class="el" href="classsigc_1_1const__volatile__limit__reference.html">sigc::const_volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::visit </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve the entity to visit for <a class="el" href="group__sigcfunctors.html#gadab29aed05524743da16319da4430541" title="This function performs a functor on each of the targets of a functor.">visit_each()</a>. </p>
<p>Depending on the template specialization, this is either a derived reference, or <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a>&amp; if T_type derives from <a class="el" href="structsigc_1_1trackable.html" title="Base class for objects with auto-disconnection.">sigc::trackable</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The reference. </dd></dl>

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