1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <!DOCTYPE header PUBLIC
"-//Boost//DTD BoostBook XML V1.0//EN"
3 "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
4 <header name=
"boost/signals/trackable.hpp">
5 <namespace name=
"boost">
6 <namespace name=
"signals">
7 <class name=
"trackable">
8 <purpose>Enables safe use of multicast callbacks.
</purpose>
11 <para>The
<code>trackable
</code> class provides automatic
12 disconnection of signals and slots when objects bound in
13 slots (via pointer or reference) are destroyed. The
14 <code>trackable
</code> class may only be used as a public
15 base class for some other class; when used as such, that
16 class may be bound to function objects used as part of
17 slots. The manner in which a
<code>trackable
</code> object
18 tracks the set of signal-slot connections it is a part of is
21 <para>The actual use of
<code>trackable
</code> is contingent
22 on the presence of appropriate
23 <functionname>visit_each
</functionname> overloads for any
24 type that may contain pointers or references to trackable
29 <effects><para>Sets the list of connected slots to empty.
</para></effects>
30 <throws><para>Will not throw.
</para></throws>
34 <parameter name=
"other">
35 <paramtype>const
<classname>trackable
</classname>&</paramtype>
38 <effects><para>Sets the list of connected slots to empty.
</para></effects>
39 <throws><para>Will not throw.
</para></throws>
40 <rationale><para>Signal-slot connections can only be created via calls to an explicit connect method, and therefore cannot be created here when trackable objects are copied.
</para></rationale>
44 <effects><para>Disconnects all signal/slot connections that
45 contain a pointer or reference to this trackable object that
47 <functionname>visit_each
</functionname>.
</para></effects>
51 <parameter name=
"other">
52 <paramtype>const
<classname>trackable
</classname>&</paramtype>
55 <effects><para>Sets the list of connected slots to empty.
</para></effects>
56 <returns><para><code>*this
</code></para></returns>
57 <throws><para>Will not throw.
</para></throws>
58 <rationale><para>Signal-slot connections can only be created via calls to an explicit connect method, and therefore cannot be created here when trackable objects are copied.
</para></rationale>