]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - untracked/docs/reference/html/classsigc_1_1volatile__limit__reference.html
Import libsigc++ 2.10.8 sources
[ext/sigc++-2.0.git] / untracked / docs / reference / html / classsigc_1_1volatile__limit__reference.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.9.1"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>libsigc++: sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt; Class Template Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="doxygen.css" rel="stylesheet" type="text/css" />
13 <link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
14 </head>
15 <body>
16 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
17 <div id="titlearea">
18 <table cellspacing="0" cellpadding="0">
19  <tbody>
20  <tr style="height: 56px;">
21   <td id="projectalign" style="padding-left: 0.5em;">
22    <div id="projectname">libsigc++
23    &#160;<span id="projectnumber">2.10.8</span>
24    </div>
25   </td>
26  </tr>
27  </tbody>
28 </table>
29 </div>
30 <!-- end header part -->
31 <!-- Generated by Doxygen 1.9.1 -->
32 <script type="text/javascript" src="menudata.js"></script>
33 <script type="text/javascript" src="menu.js"></script>
34 <script type="text/javascript">
35 /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
36 $(function() {
37   initMenu('',false,false,'search.php','Search');
38 });
39 /* @license-end */</script>
40 <div id="main-nav"></div>
41 <div id="nav-path" class="navpath">
42   <ul>
43 <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>
44 </div>
45 </div><!-- top -->
46 <div class="header">
47   <div class="summary">
48 <a href="#pub-methods">Public Member Functions</a> &#124;
49 <a href="classsigc_1_1volatile__limit__reference-members.html">List of all members</a>  </div>
50   <div class="headertitle">
51 <div class="title">sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt; Class Template Reference</div>  </div>
52 </div><!--header-->
53 <div class="contents">
54
55 <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.  
56  <a href="classsigc_1_1volatile__limit__reference.html#details">More...</a></p>
57
58 <p><code>#include &lt;sigc++/limit_reference.h&gt;</code></p>
59 <table class="memberdecls">
60 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
61 Public Member Functions</h2></td></tr>
62 <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>
63 <tr class="memdesc:acb3e6e1ecc628343f94faae718b58066"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classsigc_1_1volatile__limit__reference.html#acb3e6e1ecc628343f94faae718b58066">More...</a><br /></td></tr>
64 <tr class="separator:acb3e6e1ecc628343f94faae718b58066"><td class="memSeparator" colspan="2">&#160;</td></tr>
65 <tr class="memitem:a0157cc89d9db4032c7a8f9159ebaeff3"><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#a0157cc89d9db4032c7a8f9159ebaeff3">invoke</a> () const</td></tr>
66 <tr class="memdesc:a0157cc89d9db4032c7a8f9159ebaeff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the reference.  <a href="classsigc_1_1volatile__limit__reference.html#a0157cc89d9db4032c7a8f9159ebaeff3">More...</a><br /></td></tr>
67 <tr class="separator:a0157cc89d9db4032c7a8f9159ebaeff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
68 <tr class="memitem:a4d67fe2d9d27c326136a9e5ac13a1a75"><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#a4d67fe2d9d27c326136a9e5ac13a1a75">visit</a> () const</td></tr>
69 <tr class="memdesc:a4d67fe2d9d27c326136a9e5ac13a1a75"><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="classsigc_1_1volatile__limit__reference.html#a4d67fe2d9d27c326136a9e5ac13a1a75">More...</a><br /></td></tr>
70 <tr class="separator:a4d67fe2d9d27c326136a9e5ac13a1a75"><td class="memSeparator" colspan="2">&#160;</td></tr>
71 </table>
72 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
73 <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 />
74 class sigc::volatile_limit_reference&lt; T_type, I_derives_trackable &gt;</h3>
75
76 <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>
77 <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>
78 <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#a0157cc89d9db4032c7a8f9159ebaeff3" 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#a4d67fe2d9d27c326136a9e5ac13a1a75" title="Retrieve the entity to visit for visit_each().">visit()</a>.</p>
79 <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#a0157cc89d9db4032c7a8f9159ebaeff3" title="Retrieve the reference.">invoke()</a> and <a class="el" href="classsigc_1_1volatile__limit__reference.html#a4d67fe2d9d27c326136a9e5ac13a1a75" title="Retrieve the entity to visit for visit_each().">visit()</a> just return the derived reference.</p>
80 <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&lt;Foo&gt; 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>
81 <ul>
82 <li><em>T_type</em> The type of the reference. </li>
83 </ul>
84 </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
85 <a id="acb3e6e1ecc628343f94faae718b58066"></a>
86 <h2 class="memtitle"><span class="permalink"><a href="#acb3e6e1ecc628343f94faae718b58066">&#9670;&#160;</a></span>volatile_limit_reference()</h2>
87
88 <div class="memitem">
89 <div class="memproto">
90 <div class="memtemplate">
91 template &lt;class T_type , bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
92 <table class="mlabels">
93   <tr>
94   <td class="mlabels-left">
95       <table class="memname">
96         <tr>
97           <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>
98           <td>(</td>
99           <td class="paramtype">T_type &amp;&#160;</td>
100           <td class="paramname"><em>_A_target</em></td><td>)</td>
101           <td></td>
102         </tr>
103       </table>
104   </td>
105   <td class="mlabels-right">
106 <span class="mlabels"><span class="mlabel">inline</span></span>  </td>
107   </tr>
108 </table>
109 </div><div class="memdoc">
110
111 <p>Constructor. </p>
112 <dl class="params"><dt>Parameters</dt><dd>
113   <table class="params">
114     <tr><td class="paramname">_A_target</td><td>The reference to limit. </td></tr>
115   </table>
116   </dd>
117 </dl>
118
119 </div>
120 </div>
121 <h2 class="groupheader">Member Function Documentation</h2>
122 <a id="a0157cc89d9db4032c7a8f9159ebaeff3"></a>
123 <h2 class="memtitle"><span class="permalink"><a href="#a0157cc89d9db4032c7a8f9159ebaeff3">&#9670;&#160;</a></span>invoke()</h2>
124
125 <div class="memitem">
126 <div class="memproto">
127 <div class="memtemplate">
128 template &lt;class T_type , bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
129 <table class="mlabels">
130   <tr>
131   <td class="mlabels-left">
132       <table class="memname">
133         <tr>
134           <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>
135           <td>(</td>
136           <td class="paramname"></td><td>)</td>
137           <td> const</td>
138         </tr>
139       </table>
140   </td>
141   <td class="mlabels-right">
142 <span class="mlabels"><span class="mlabel">inline</span></span>  </td>
143   </tr>
144 </table>
145 </div><div class="memdoc">
146
147 <p>Retrieve the reference. </p>
148 <p>This is always a reference to the derived instance. </p><dl class="section return"><dt>Returns</dt><dd>The reference. </dd></dl>
149
150 </div>
151 </div>
152 <a id="a4d67fe2d9d27c326136a9e5ac13a1a75"></a>
153 <h2 class="memtitle"><span class="permalink"><a href="#a4d67fe2d9d27c326136a9e5ac13a1a75">&#9670;&#160;</a></span>visit()</h2>
154
155 <div class="memitem">
156 <div class="memproto">
157 <div class="memtemplate">
158 template &lt;class T_type , bool I_derives_trackable = std::is_base_of&lt;trackable, T_type&gt;::value&gt; </div>
159 <table class="mlabels">
160   <tr>
161   <td class="mlabels-left">
162       <table class="memname">
163         <tr>
164           <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>
165           <td>(</td>
166           <td class="paramname"></td><td>)</td>
167           <td> const</td>
168         </tr>
169       </table>
170   </td>
171   <td class="mlabels-right">
172 <span class="mlabels"><span class="mlabel">inline</span></span>  </td>
173   </tr>
174 </table>
175 </div><div class="memdoc">
176
177 <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>
178 <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>
179
180 </div>
181 </div>
182 </div><!-- contents -->
183 <!-- start footer part -->
184 <hr class="footer"/><address class="footer"><small>
185 Generated on Fri Feb 11 2022 15:40:59 for libsigc++ by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
186 </small></address>
187 </body>
188 </html>