Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/scoped_connection.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 6.6 KB
RevLine 
[12]1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class scoped_connection</title>
5<link rel="stylesheet" href="boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="index.html" title="The Boost C++ Libraries">
8<link rel="up" href="signals/reference.html#id2543701" title="Header &lt;boost/signals/connection.hpp&gt;">
9<link rel="prev" href="connection.html" title="Class connection">
10<link rel="next" href="visit_each.html" title="Function template visit_each">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
15<td align="center"><a href="../../index.htm">Home</a></td>
16<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../people/people.htm">People</a></td>
18<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="connection.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="signals/reference.html#id2543701"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="visit_each.html"><img src="images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="scoped_connection"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class scoped_connection</span></h2>
29<p>boost::signals::scoped_connection &#8212; Limits a signal-slot connection lifetime to a particular scope.</p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
33<span class="bold"><strong>class</strong></span> scoped_connection : <span class="bold"><strong>private</strong></span> noncopyable   <span class="emphasis"><em>// Exposition only</em></span>
34{
35<span class="bold"><strong>public</strong></span>:
36  <span class="emphasis"><em>// <a href="scoped_connection.html#scoped_connectionconstruct-copy-destruct">construct/copy/destruct</a></em></span>
37  <a href="scoped_connection.html#id2564687-bb">scoped_connection</a>(<span class="bold"><strong>const</strong></span> <a href="connection.html" title="Class connection">connection</a>&amp;);
38  <a href="scoped_connection.html#id2577592-bb">~scoped_connection</a>();
39
40  <span class="emphasis"><em>// <a href="scoped_connection.html#id2553215-bb">connection management</a></em></span>
41  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="scoped_connection.html#id2538480-bb">disconnect</a>() <span class="bold"><strong>const</strong></span>;
42  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="scoped_connection.html#id2542961-bb">connected</a>() <span class="bold"><strong>const</strong></span>;
43};</pre></div>
44<div class="refsect1" lang="en">
45<a name="id2737794"></a><h2>Description</h2>
46<div class="refsect2" lang="en">
47<a name="id2737797"></a><h3>
48<a name="scoped_connectionconstruct-copy-destruct"></a><code class="computeroutput">scoped_connection</code> construct/copy/destruct</h3>
49<div class="orderedlist"><ol type="1">
50<li>
51<pre class="literallayout"><a name="id2564687-bb"></a>scoped_connection(<span class="bold"><strong>const</strong></span> <a href="connection.html" title="Class connection">connection</a>&amp; other);</pre>
52<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
53
54    <code class="computeroutput">this</code> references
55          the connection referenced by
56          <code class="computeroutput">other</code>.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
57
58    Will not throw.</p>
59</li>
60<li>
61<pre class="literallayout"><a name="id2577592-bb"></a>~scoped_connection();</pre>
62<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
63
64    If
65          <code class="computeroutput">this-&gt;<a href="scoped_connection.html#id2542961-bb">connected</a>()</code>,
66          disconnects the signal-slot connection.</p>
67</li>
68</ol></div>
69</div>
70<div class="refsect2" lang="en">
71<a name="id2737910"></a><h3>
72<a name="id2553215-bb"></a><code class="computeroutput">scoped_connection</code> connection management</h3>
73<div class="orderedlist"><ol type="1">
74<li>
75<pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2538480-bb"></a>disconnect() <span class="bold"><strong>const</strong></span>;</pre>
76<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Effects</span></b>:
77
78    If
79             <code class="computeroutput">this-&gt;<a href="scoped_connection.html#id2542961-bb">connected</a>()</code>,
80             disconnects the signal and slot referenced by this;
81             otherwise, this operation is a no-op.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Postconditions</span></b>:
82
83    <code class="computeroutput">!this-&gt;<a href="scoped_connection.html#id2542961-bb">connected</a>()</code>.</p>
84</li>
85<li>
86<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2542961-bb"></a>connected() <span class="bold"><strong>const</strong></span>;</pre>
87<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
88
89    <code class="computeroutput">true</code> if this
90            references a non-NULL connection that is still active
91            (connected), and <code class="computeroutput">false</code>
92            otherwise.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
93
94    Will not throw.</p>
95</li>
96</ol></div>
97</div>
98</div>
99</div>
100<table width="100%"><tr>
101<td align="left"></td>
102<td align="right"><small>Copyright © 2001-2004 Douglas Gregor</small></td>
103</tr></table>
104<hr>
105<div class="spirit-nav">
106<a accesskey="p" href="connection.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="signals/reference.html#id2543701"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="visit_each.html"><img src="images/next.png" alt="Next"></a>
107</div>
108</body>
109</html>
Note: See TracBrowser for help on using the repository browser.