Blob Blame History Raw
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>libsigc++: sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libsigc++
   &#160;<span id="projectnumber">2.10.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</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 id="navrow2" 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="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacesigc.html">sigc</a></li><li class="navelem"><a class="el" href="classsigc_1_1volatile__limit__reference.html">volatile_limit_reference</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsigc_1_1volatile__limit__reference-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A 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#ga64cb7832acc1e58efb5ffe0b4f5e9404" 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="classsigc_1_1volatile__limit__reference.html#details">More...</a></p>

<p><code>#include &lt;sigc++/limit_reference.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acb3e6e1ecc628343f94faae718b58066"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1volatile__limit__reference.html#acb3e6e1ecc628343f94faae718b58066">volatile_limit_reference</a> (T_type&amp; _A_target)</td></tr>
<tr class="memdesc:acb3e6e1ecc628343f94faae718b58066"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#acb3e6e1ecc628343f94faae718b58066">More...</a><br /></td></tr>
<tr class="separator:acb3e6e1ecc628343f94faae718b58066"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a932be0a7adce8fac57f269d551e271a3"><td class="memItemLeft" align="right" valign="top">volatile T_type&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1volatile__limit__reference.html#a932be0a7adce8fac57f269d551e271a3">invoke</a> () const </td></tr>
<tr class="memdesc:a932be0a7adce8fac57f269d551e271a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the reference.  <a href="#a932be0a7adce8fac57f269d551e271a3">More...</a><br /></td></tr>
<tr class="separator:a932be0a7adce8fac57f269d551e271a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14357ecc1a8e064d5f5531ce82542e74"><td class="memItemLeft" align="right" valign="top">const T_type&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsigc_1_1volatile__limit__reference.html#a14357ecc1a8e064d5f5531ce82542e74">visit</a> () const </td></tr>
<tr class="memdesc:a14357ecc1a8e064d5f5531ce82542e74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the entity to visit for <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" title="This function performs a functor on each of the targets of a functor. ">visit_each()</a>.  <a href="#a14357ecc1a8e064d5f5531ce82542e74">More...</a><br /></td></tr>
<tr class="separator:a14357ecc1a8e064d5f5531ce82542e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T_type, bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt;<br />
class sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt;</h3>

<p>A 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#ga64cb7832acc1e58efb5ffe0b4f5e9404" 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 trackable 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_1volatile__limit__reference.html#a932be0a7adce8fac57f269d551e271a3" title="Retrieve the reference. ">invoke()</a>. To retrieve the trackable reference (so that you can call <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" 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_1volatile__limit__reference.html#a14357ecc1a8e064d5f5531ce82542e74" 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_1volatile__limit__reference.html#a932be0a7adce8fac57f269d551e271a3" title="Retrieve the reference. ">invoke()</a> and <a class="el" href="classsigc_1_1volatile__limit__reference.html#a14357ecc1a8e064d5f5531ce82542e74" 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#ga2f099bc6056b32f2a58134ba8537c6f4" title="Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor...">sigc::bind</a>) slot parameters (via <a class="el" href="classsigc_1_1bound__argument.html" title="A bound_argument<Foo> object stores a bound (for instance, with sigc::bind(), or sigc::bind_return())...">bound_argument</a>), bound return values, and, with <a class="el" href="group__mem__fun.html#gadf6b6d22c503b439019f0a2e77352419" 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>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acb3e6e1ecc628343f94faae718b58066"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsigc_1_1volatile__limit__reference.html">sigc::volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::<a class="el" href="classsigc_1_1volatile__limit__reference.html">volatile_limit_reference</a> </td>
          <td>(</td>
          <td class="paramtype">T_type &amp;&#160;</td>
          <td class="paramname"><em>_A_target</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">_A_target</td><td>The reference to limit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a932be0a7adce8fac57f269d551e271a3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile T_type&amp; <a class="el" href="classsigc_1_1volatile__limit__reference.html">sigc::volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::invoke </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </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="section return"><dt>Returns</dt><dd>The reference. </dd></dl>

</div>
</div>
<a class="anchor" id="a14357ecc1a8e064d5f5531ce82542e74"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template &lt;class T_type, bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const T_type&amp; <a class="el" href="classsigc_1_1volatile__limit__reference.html">sigc::volatile_limit_reference</a>&lt; T_type, I_derives_trackable &gt;::visit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieve the entity to visit for <a class="el" href="group__sigcfunctors.html#ga64cb7832acc1e58efb5ffe0b4f5e9404" 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="section return"><dt>Returns</dt><dd>The reference. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Sep 20 2016 12:13:58 for libsigc++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>