Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/signals/doc/reference/connection.xml @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 8.8 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3   Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
4 
5   Distributed under the Boost Software License, Version 1.0.
6   (See accompanying file LICENSE_1_0.txt or copy at
7   http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
10  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
11<header name="boost/signals/connection.hpp" last-revision="$Date: 2006/11/03 19:45:41 $">
12  <namespace name="boost">
13    <namespace name="signals">
14      <class name="connection">
15        <!-- Models LessThanComparable and EqualityComparable -->
16        <purpose>Query/disconnect a signal-slot connection.</purpose>
17
18        <description>
19          <para>The <classname>connection</classname> class represents
20          a connection between a Signal and a Slot. It is a
21          lightweight object that has the ability to query whether the
22          signal and slot are currently connected, and to disconnect
23          the signal and slot. It is always safe to query or
24          disconnect a connection.</para>
25        </description>
26
27        <constructor>
28          <effects><para>Sets the currently represented connection to the
29          NULL connection.</para></effects>
30          <postconditions><para><computeroutput>!this-><methodname>connected</methodname>()</computeroutput>.</para></postconditions>
31          <throws><para>Will not throw.</para></throws>
32        </constructor>
33
34        <constructor>
35          <parameter name="other"> 
36            <paramtype>const <classname>connection</classname>&amp;</paramtype>
37          </parameter>
38
39          <effects><para><computeroutput>this</computeroutput> references
40          the connection referenced by
41          <computeroutput>other</computeroutput>.</para></effects>
42
43          <throws><para>Will not throw.</para></throws>
44        </constructor>
45
46        <copy-assignment>
47          <parameter name="other"> 
48            <paramtype>const <classname>connection</classname>&amp;</paramtype>
49          </parameter>
50
51          <effects><para><computeroutput>this</computeroutput> references
52          the connection referenced by
53          <computeroutput>other</computeroutput>.</para></effects>
54
55          <throws><para>Will not throw.</para></throws>
56        </copy-assignment>
57
58        <method-group name="connection management">
59          <method name="disconnect" cv="const">
60             <type>void</type>
61             <effects><para>If
62             <computeroutput>this-&gt;<methodname>connected</methodname>()</computeroutput>,
63             disconnects the signal and slot referenced by this;
64             otherwise, this operation is a no-op.</para></effects>
65
66             <postconditions><para><computeroutput>!this-&gt;<methodname>connected</methodname>()</computeroutput>.</para></postconditions>
67          </method>
68
69          <method name="connected" cv="const">
70            <type>bool</type>
71            <returns><para><computeroutput>true</computeroutput> if this
72            references a non-NULL connection that is still active
73            (connected), and <computeroutput>false</computeroutput>
74            otherwise.</para></returns>
75            <throws><para>Will not throw.</para></throws>
76          </method>
77        </method-group>
78
79        <method-group name="blocking">
80          <method name="block">
81            <type>void</type>
82            <parameter name="should_block">
83              <paramtype>bool</paramtype>
84              <default>true</default>
85            </parameter>
86            <requires><simpara><code>connected()</code></simpara></requires>
87            <postconditions><simpara><code>blocked() == should_block</code></simpara></postconditions>
88            <throws><simpara>Will not throw.</simpara></throws>
89          </method>
90          <method name="unblock">
91            <type>void</type>
92            <requires><simpara><code>connected()</code></simpara></requires>
93            <postconditions><simpara><code>!blocked()</code></simpara></postconditions>
94            <throws><simpara>Will not throw.</simpara></throws>
95          </method>
96          <method name="blocked" cv="const">
97            <type>bool</type>
98            <returns><simpara><code>true</code> if the associated slot is either disconnected or blocked, <code>false</code> otherwise.</simpara></returns>
99            <throws><simpara>Will not throw.</simpara></throws>
100          </method>
101        </method-group>
102
103        <method-group name="modifiers">
104          <method name="swap">
105            <type>void</type>
106            <parameter name="other">
107              <paramtype>const <classname>connection</classname>&amp;</paramtype>
108            </parameter>
109            <effects><para>Swaps the connections referenced in
110            <computeroutput>this</computeroutput> and
111            <computeroutput>other</computeroutput>.</para></effects>
112 
113            <throws><para>Will not throw.</para></throws>
114          </method> 
115        </method-group>
116
117        <method-group name="comparisons">
118          <method name="operator==" cv="const">
119            <type>bool</type>
120            <parameter name="other">
121              <paramtype>const <classname>connection</classname>&amp;</paramtype>
122            </parameter>
123
124            <returns><para><computeroutput>true</computeroutput> if
125            <computeroutput>this</computeroutput> and
126            <computeroutput>other</computeroutput> reference the same
127            connection or both reference the NULL connection, and
128            <computeroutput>false</computeroutput>
129            otherwise.</para></returns>
130
131            <throws><para>Will not throw.</para></throws>
132          </method>
133
134          <method name="operator&lt;" cv="const">
135            <type>bool</type>
136            <parameter name="other">
137              <paramtype>const <classname>connection</classname>&amp;</paramtype>
138            </parameter>
139
140            <returns><para><computeroutput>true</computeroutput> if the
141            connection referenced by
142            <computeroutput>this</computeroutput> precedes the
143            connection referenced by
144            <computeroutput>other</computeroutput> based on some
145            unspecified ordering, and
146            <computeroutput>false</computeroutput>
147            otherwise.</para></returns>
148
149            <throws><para>Will not throw.</para></throws>
150          </method>
151        </method-group>
152
153        <free-function-group name="specialized algorithms">
154          <function name="swap">
155            <type>void</type>
156            <parameter name="x">
157              <paramtype><classname>connection</classname>&amp;</paramtype>
158            </parameter>
159            <parameter name="y">
160              <paramtype><classname>connection</classname>&amp;</paramtype>
161            </parameter>
162
163            <effects><para><computeroutput>x.swap(y)</computeroutput></para></effects>
164            <throws><para>Will not throw.</para></throws>
165          </function>
166        </free-function-group>
167      </class>
168
169      <class name="scoped_connection">
170        <inherit access="private">
171          <type><classname>noncopyable</classname></type>
172          <purpose>Exposition only</purpose>
173        </inherit>
174        <purpose>Limits a signal-slot connection lifetime to a particular scope.</purpose>
175
176        <constructor>
177          <parameter name="other"> 
178            <paramtype>const <classname>connection</classname>&amp;</paramtype>
179          </parameter>
180
181          <effects><para><computeroutput>this</computeroutput> references
182          the connection referenced by
183          <computeroutput>other</computeroutput>.</para></effects>
184
185          <throws><para>Will not throw.</para></throws>
186        </constructor>
187
188        <destructor>
189          <effects><para>If
190          <computeroutput>this-&gt;<methodname>connected</methodname>()</computeroutput>,
191          disconnects the signal-slot connection.</para></effects>
192        </destructor>
193
194        <method-group name="connection management">
195          <method name="disconnect" cv="const">
196            <type>void</type>
197             <effects><para>If
198             <computeroutput>this-&gt;<methodname>connected</methodname>()</computeroutput>,
199             disconnects the signal and slot referenced by this;
200             otherwise, this operation is a no-op.</para></effects>
201
202             <postconditions><para><computeroutput>!this-&gt;<methodname>connected</methodname>()</computeroutput>.</para></postconditions>
203          </method>
204
205          <method name="connected" cv="const">
206            <type>bool</type>
207            <returns><para><computeroutput>true</computeroutput> if this
208            references a non-NULL connection that is still active
209            (connected), and <computeroutput>false</computeroutput>
210            otherwise.</para></returns>
211            <throws><para>Will not throw.</para></throws>
212          </method>
213        </method-group>
214      </class>
215    </namespace>
216  </namespace>
217</header>
Note: See TracBrowser for help on using the repository browser.