diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /doc/html/signals | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'doc/html/signals')
-rw-r--r-- | doc/html/signals/reference.html | 10 | ||||
-rw-r--r-- | doc/html/signals/s04.html | 47 | ||||
-rw-r--r-- | doc/html/signals/s05.html | 28 | ||||
-rw-r--r-- | doc/html/signals/s06.html | 76 | ||||
-rw-r--r-- | doc/html/signals/tests.html | 10 | ||||
-rw-r--r-- | doc/html/signals/tutorial.html | 196 |
6 files changed, 192 insertions, 175 deletions
diff --git a/doc/html/signals/reference.html b/doc/html/signals/reference.html index d3039e9f95..6e6776b67f 100644 --- a/doc/html/signals/reference.html +++ b/doc/html/signals/reference.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Reference</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> <link rel="prev" href="tutorial.html" title="Tutorial"> <link rel="next" href="../boost/signalN.html" title="Class template signalN"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="signals.reference"></a>Reference</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#header.boost.signal_hpp">Header <boost/signal.hpp></a></span></dt> <dt><span class="section"><a href="reference.html#header.boost.signals.slot_hpp">Header <boost/signals/slot.hpp></a></span></dt> <dt><span class="section"><a href="reference.html#header.boost.signals.trackable_hpp">Header <boost/signals/trackable.hpp></a></span></dt> @@ -74,7 +74,7 @@ <pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">signals</span> <span class="special">{</span> <span class="keyword">class</span> <a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a><span class="special">;</span> - <span class="keyword">void</span> <a class="link" href="../boost/signals/connection.html#boost.signals.connection.swap_id1377718"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a><span class="special">&</span><span class="special">,</span> <a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a><span class="special">&</span><span class="special">)</span><span class="special">;</span> + <span class="keyword">void</span> <a class="link" href="../boost/signals/connection.html#boost.signals.connection.swap_idp100263744"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a><span class="special">&</span><span class="special">,</span> <a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a><span class="special">&</span><span class="special">)</span><span class="special">;</span> <span class="keyword">class</span> <a class="link" href="../boost/signals/scoped_connection.html" title="Class scoped_connection">scoped_connection</a><span class="special">;</span> <span class="special">}</span> <span class="special">}</span></pre> @@ -93,7 +93,7 @@ <pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="keyword">class</span> <a class="link" href="../boost/last_value.html" title="Class template last_value">last_value</a><span class="special">;</span> - <span class="keyword">template</span><span class="special"><</span><span class="special">></span> <span class="keyword">class</span> <a class="link" href="../boost/last_value_void_id818100.html" title="Class last_value<void>">last_value</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span><span class="special">;</span> + <span class="keyword">template</span><span class="special"><</span><span class="special">></span> <span class="keyword">class</span> <a class="link" href="../boost/last_value_voi_idp95171696.html" title="Class last_value<void>">last_value</a><span class="special"><</span><span class="keyword">void</span><span class="special">></span><span class="special">;</span> <span class="special">}</span></pre> </div> </div> diff --git a/doc/html/signals/s04.html b/doc/html/signals/s04.html index 3ae3d02730..e0e825137a 100644 --- a/doc/html/signals/s04.html +++ b/doc/html/signals/s04.html @@ -3,10 +3,10 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Frequently Asked Questions</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> -<link rel="prev" href="../boost/last_value_void_id818100.html" title="Class last_value<void>"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> +<link rel="prev" href="../boost/last_value_voi_idp95171696.html" title="Class last_value<void>"> <link rel="next" href="s05.html" title="Design Overview"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -20,28 +20,45 @@ </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="../boost/last_value_void_id818100.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../signals.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="../boost/last_value_voi_idp95171696.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../signals.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="id3204968"></a>Frequently Asked Questions</h2></div></div></div> +<a name="idp426491472"></a>Frequently Asked Questions</h2></div></div></div> <div class="qandaset"> -<a name="id3204976"></a><dl> -<dt>1. <a href="s04.html#id3204978">Don't noncopyable signal semantics mean that a class +<a name="idp426492496"></a><dl> +<dt>1. <a href="s04.html#idp426492752">Is Boost.Signals being actively maintained?</a> +</dt> +<dt>2. <a href="s04.html#idp426496272">Don't noncopyable signal semantics mean that a class with a signal member will be noncopyable as well?</a> </dt> -<dt>2. <a href="s04.html#id3205001">Is Boost.Signals thread-safe?</a> +<dt>3. <a href="s04.html#idp426498624">Is Boost.Signals thread-safe?</a> </dt> -<dt>3. <a href="s04.html#id3205021">How do I get Boost.Signals to work with Qt?</a> +<dt>4. <a href="s04.html#idp426500832">How do I get Boost.Signals to work with Qt?</a> </dt> </dl> -<table border="0" width="100%" summary="Q and A Set"> +<table border="0" style="width: 100%;"> +<colgroup> <col align="left" width="1%"> <col> +</colgroup> <tbody> <tr class="question"> <td align="left" valign="top"> -<a name="id3204978"></a><a name="id3204980"></a><p><b>1.</b></p> +<a name="idp426492752"></a><a name="idp426493008"></a><p><b>1.</b></p> +</td> +<td align="left" valign="top"><p>Is Boost.Signals being actively maintained?</p></td> +</tr> +<tr class="answer"> +<td align="left" valign="top"></td> +<td align="left" valign="top"><p>No. Please migrate to <a href="http://www.boost.org/doc/html/signals2.html" target="_top">Boost.Signals2</a>. + There is a + <a href="http://www.boost.org/doc/html/signals2/api_changes.html#signals2.porting" target="_top">porting guide</a> + in the Signals2 documentation.</p></td> +</tr> +<tr class="question"> +<td align="left" valign="top"> +<a name="idp426496272"></a><a name="idp426496528"></a><p><b>2.</b></p> </td> <td align="left" valign="top"><p>Don't noncopyable signal semantics mean that a class with a signal member will be noncopyable as well?</p></td> @@ -56,7 +73,7 @@ </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id3205001"></a><a name="id3205003"></a><p><b>2.</b></p> +<a name="idp426498624"></a><a name="idp426498880"></a><p><b>3.</b></p> </td> <td align="left" valign="top"><p>Is Boost.Signals thread-safe?</p></td> </tr> @@ -69,7 +86,7 @@ </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id3205021"></a><a name="id3205023"></a><p><b>3.</b></p> +<a name="idp426500832"></a><a name="idp426501088"></a><p><b>4.</b></p> </td> <td align="left" valign="top"><p>How do I get Boost.Signals to work with Qt?</p></td> </tr> @@ -160,7 +177,7 @@ namespace boost </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> -<td align="left"><p><small>Last revised: May 21, 2008 at 21:57:05 +0100</small></p></td> +<td align="left"></td> <td align="right"><div class="copyright-footer">Copyright © 2001-2004 Douglas Gregor<p>Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p> @@ -168,7 +185,7 @@ namespace boost </tr></table> <hr> <div class="spirit-nav"> -<a accesskey="p" href="../boost/last_value_void_id818100.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../signals.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> +<a accesskey="p" href="../boost/last_value_voi_idp95171696.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../signals.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> diff --git a/doc/html/signals/s05.html b/doc/html/signals/s05.html index 096deec7d5..79adeea5ee 100644 --- a/doc/html/signals/s05.html +++ b/doc/html/signals/s05.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Design Overview</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> <link rel="prev" href="s04.html" title="Frequently Asked Questions"> <link rel="next" href="s06.html" title="Design Rationale"> </head> @@ -24,16 +24,16 @@ </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="id3205183"></a>Design Overview</h2></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="s05.html#id3205189">Type Erasure</a></span></dt> -<dt><span class="section"><a href="s05.html#id3205259"><code class="computeroutput">connection</code> class</a></span></dt> -<dt><span class="section"><a href="s05.html#id3205376">Slot Call Iterator</a></span></dt> -<dt><span class="section"><a href="s05.html#id3205575"><code class="computeroutput">visit_each</code> function template</a></span></dt> +<a name="idp426518112"></a>Design Overview</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="s05.html#idp426519136">Type Erasure</a></span></dt> +<dt><span class="section"><a href="s05.html#idp426526400"><code class="computeroutput">connection</code> class</a></span></dt> +<dt><span class="section"><a href="s05.html#idp426539664">Slot Call Iterator</a></span></dt> +<dt><span class="section"><a href="s05.html#idp426561472"><code class="computeroutput">visit_each</code> function template</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205189"></a>Type Erasure</h3></div></div></div> +<a name="idp426519136"></a>Type Erasure</h3></div></div></div> <p>"Type erasure", where static type information is eliminated by the use of dynamically dispatched interfaces, is used extensively within the Boost.Signals library to reduce the amount @@ -59,7 +59,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205259"></a><code class="computeroutput">connection</code> class</h3></div></div></div> +<a name="idp426526400"></a><code class="computeroutput">connection</code> class</h3></div></div></div> <p> The <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> class is central to the behavior of the Boost.Signals library. It is the only entity within the Boost.Signals system that has knowledge of @@ -84,7 +84,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205376"></a>Slot Call Iterator</h3></div></div></div> +<a name="idp426539664"></a>Slot Call Iterator</h3></div></div></div> <p> The slot call iterator is conceptually a stack of iterator adaptors that modify the behavior of the underlying iterator through the list of slots. The following table describes the type @@ -130,7 +130,7 @@ <tr> <td align="left"><p>Transform Iterator Adaptor</p></td> <td align="left"><p>This transform iterator adaptor performs an - <code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">any_cast</a></code> to + <code class="computeroutput"><a class="link" href="../boost/any_cast_idp41191712.html" title="Function any_cast">any_cast</a></code> to extract a reference to the slot function with the appropriate slot function type.</p></td> </tr> @@ -160,7 +160,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205575"></a><code class="computeroutput">visit_each</code> function template</h3></div></div></div> +<a name="idp426561472"></a><code class="computeroutput">visit_each</code> function template</h3></div></div></div> <p> The <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code> function template is a mechanism for discovering objects that are stored within another object. Function template @@ -198,7 +198,7 @@ foo(at, 0); </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> -<td align="left"><p><small>Last revised: November 25, 2007 at 18:38:02 +0000</small></p></td> +<td align="left"></td> <td align="right"><div class="copyright-footer">Copyright © 2001-2004 Douglas Gregor<p>Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p> diff --git a/doc/html/signals/s06.html b/doc/html/signals/s06.html index 0075c3a78e..b157aeccbb 100644 --- a/doc/html/signals/s06.html +++ b/doc/html/signals/s06.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Design Rationale</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> <link rel="prev" href="s05.html" title="Design Overview"> <link rel="next" href="tests.html" title="Testsuite"> </head> @@ -24,18 +24,18 @@ </div> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="id3205723"></a>Design Rationale</h2></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="s06.html#id3205731">Choice of Slot Definitions</a></span></dt> -<dt><span class="section"><a href="s06.html#id3205815">User-level Connection Management</a></span></dt> -<dt><span class="section"><a href="s06.html#id3205980">Combiner Interface</a></span></dt> -<dt><span class="section"><a href="s06.html#id3206061">Connection Interfaces: += operator</a></span></dt> -<dt><span class="section"><a href="s06.html#id3206232"><code class="computeroutput">trackable</code> rationale</a></span></dt> -<dt><span class="section"><a href="s06.html#id3206415">Comparison with other Signal/Slot implementations</a></span></dt> +<a name="idp426577568"></a>Design Rationale</h2></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="s06.html#idp426578544">Choice of Slot Definitions</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426587936">User-level Connection Management</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426606192">Combiner Interface</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426621280">Connection Interfaces: += operator</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426640656"><code class="computeroutput">trackable</code> rationale</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426660768">Comparison with other Signal/Slot implementations</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205731"></a>Choice of Slot Definitions</h3></div></div></div> +<a name="idp426578544"></a>Choice of Slot Definitions</h3></div></div></div> <p> The definition of a slot differs amongst signals and slots libraries. Within Boost.Signals, a slot is defined in a very loose manner: it can be any function object that is callable given @@ -44,7 +44,7 @@ signal. However, alternative definitions have associated pros and cons that were considered prior to the construction of Boost.Signals.</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <p><span class="bold"><strong>Slots derive from a specific base class</strong></span>: generally a scheme such as this will require @@ -85,7 +85,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205815"></a>User-level Connection Management</h3></div></div></div> +<a name="idp426587936"></a>User-level Connection Management</h3></div></div></div> <p> Users need to have fine control over the connection of signals to slots and their eventual disconnection. The approach taken by Boost.Signals is to return a @@ -93,13 +93,13 @@ connected/disconnected query, manual disconnection, and an automatic disconnection on destruction mode. Some other possible interfaces include:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><span class="bold"><strong>Pass slot to disconnect</strong></span>: in this interface model, the disconnection of a slot connected with - <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id829361-bb">connect</a>(slot)</code> is + <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a>(slot)</code> is performed via - <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id1420589-bb">disconnect</a>(slot)</code>. Internally, + <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#idp211498240-bb">disconnect</a>(slot)</code>. Internally, a linear search using slot comparison is performed and the slot, if found, is removed from the list. Unfortunately, querying connectedness will generally also end up as @@ -108,7 +108,7 @@ simple function pointers, member function pointers and a limited set of compositions and argument binders: to match the slot given in the call to - <code class="computeroutput"><a class="link" href="../boost/signalN.html#id1420589-bb">disconnect</a></code> with an + <code class="computeroutput"><a class="link" href="../boost/signalN.html#idp211498240-bb">disconnect</a></code> with an existing slot we would need to be able to compare arbitrary function objects, which is not feasible.</p></li> <li class="listitem"> @@ -118,7 +118,7 @@ slots to be arbitrary function objects. While this approach is essentially equivalent to the approach taken by Boost.Signals, it is possibly more error-prone for several reasons:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="circle"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> <li class="listitem"><p>Connections and disconnections must be paired, so the problem becomes similar to the problems incurred when pairing <code class="computeroutput">new</code> and <code class="computeroutput">delete</code> for @@ -147,7 +147,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3205980"></a>Combiner Interface</h3></div></div></div> +<a name="idp426606192"></a>Combiner Interface</h3></div></div></div> <p> The Combiner interface was chosen to mimic a call to an algorithm in the C++ standard library. It is felt that by viewing slot call results as merely a sequence of values accessed by input @@ -275,14 +275,14 @@ private: </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3206061"></a>Connection Interfaces: += operator</h3></div></div></div> +<a name="idp426621280"></a>Connection Interfaces: += operator</h3></div></div></div> <p> Boost.Signals supports a connection syntax with the form - <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id829361-bb">connect</a>(slot)</code>, but a + <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a>(slot)</code>, but a more terse syntax <code class="computeroutput">sig += slot</code> has been suggested (and has been used by other signals & slots implementations). There are several reasons as to why this syntax has been rejected:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><span class="bold"><strong>It's unnecessary</strong></span>: the connection syntax supplied by Boost.Signals is no less powerful that that supplied by the <code class="computeroutput">+=</code> @@ -315,10 +315,10 @@ private: </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3206232"></a><code class="computeroutput">trackable</code> rationale</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="s06.html#id3206273"><code class="computeroutput">trackable</code> copying behavior</a></span></dt> -<dt><span class="section"><a href="s06.html#id3206332">Why derivation from <code class="computeroutput">trackable</code>?</a></span></dt> +<a name="idp426640656"></a><code class="computeroutput">trackable</code> rationale</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="s06.html#idp426645280"><code class="computeroutput">trackable</code> copying behavior</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426651440">Why derivation from <code class="computeroutput">trackable</code>?</a></span></dt> </dl></div> <p> The <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> class is the primary user interface to automatic connection @@ -329,7 +329,7 @@ private: participate in automatic connection management.</p> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3206273"></a><code class="computeroutput">trackable</code> copying behavior</h4></div></div></div> +<a name="idp426645280"></a><code class="computeroutput">trackable</code> copying behavior</h4></div></div></div> <p> The copying behavior of <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> is essentially that <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> subobjects @@ -347,10 +347,10 @@ private: </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3206332"></a>Why derivation from <code class="computeroutput">trackable</code>?</h4></div></div></div> +<a name="idp426651440"></a>Why derivation from <code class="computeroutput">trackable</code>?</h4></div></div></div> <p> For <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> to work properly, there are two constraints:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> must have storage space to keep track of all connections made to this object.</p></li> @@ -365,14 +365,14 @@ private: </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3206415"></a>Comparison with other Signal/Slot implementations</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="s06.html#id3206421">libsigc++</a></span></dt> -<dt><span class="section"><a href="s06.html#id3206478">.NET delegates</a></span></dt> +<a name="idp426660768"></a>Comparison with other Signal/Slot implementations</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="s06.html#idp426661472">libsigc++</a></span></dt> +<dt><span class="section"><a href="s06.html#idp426668816">.NET delegates</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3206421"></a>libsigc++</h4></div></div></div> +<a name="idp426661472"></a>libsigc++</h4></div></div></div> <p> <a href="http://libsigc.sourceforge.net" target="_top">libsigc++</a> is a C++ signals & slots library that originally started as part of an initiative to wrap the C interfaces to <a href="http://www.gtk.org" target="_top">GTK</a> libraries in C++, and has @@ -384,7 +384,7 @@ private: connections and automatic connection lifetime management. There are some major differences in design that separate these libraries:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><span class="bold"><strong>Slot definitions</strong></span>: slots in libsigc++ are created using a set of primitives defined by the library. These primitives allow binding of @@ -404,14 +404,14 @@ private: </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3206478"></a>.NET delegates</h4></div></div></div> +<a name="idp426668816"></a>.NET delegates</h4></div></div></div> <p> <a href="http://www.microsoft.com" target="_top">Microsoft</a> has introduced the .NET Framework and an associated set of languages and language extensions, one of which is the delegate. Delegates are similar to signals and slots, but they are more limited than most C++ signals and slots implementations in that they:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>Require exact type matches between a delegate and what it is calling.</p></li> <li class="listitem"><p>Only return the result of the last target called, with no option for customization.</p></li> @@ -422,7 +422,7 @@ private: </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> -<td align="left"><p><small>Last revised: November 25, 2007 at 18:38:02 +0000</small></p></td> +<td align="left"></td> <td align="right"><div class="copyright-footer">Copyright © 2001-2004 Douglas Gregor<p>Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p> diff --git a/doc/html/signals/tests.html b/doc/html/signals/tests.html index ee67a71fa9..832538d4dd 100644 --- a/doc/html/signals/tests.html +++ b/doc/html/signals/tests.html @@ -3,11 +3,11 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Testsuite</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> <link rel="prev" href="s06.html" title="Design Rationale"> -<link rel="next" href="../signals2.html" title="Chapter 25. Boost.Signals2"> +<link rel="next" href="../signals2.html" title="Chapter 27. Boost.Signals2"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> @@ -25,10 +25,10 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="signals.tests"></a>Testsuite</h2></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="tests.html#id3206538">Acceptance tests</a></span></dt></dl></div> +<div class="toc"><dl class="toc"><dt><span class="section"><a href="tests.html#idp426675504">Acceptance tests</a></span></dt></dl></div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3206538"></a>Acceptance tests</h3></div></div></div> +<a name="idp426675504"></a>Acceptance tests</h3></div></div></div> <div class="informaltable"><table class="table"> <colgroup> <col> diff --git a/doc/html/signals/tutorial.html b/doc/html/signals/tutorial.html index 7648eeabf1..bb9536e2a1 100644 --- a/doc/html/signals/tutorial.html +++ b/doc/html/signals/tutorial.html @@ -3,10 +3,10 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Tutorial</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../signals.html" title="Chapter 24. Boost.Signals"> -<link rel="prev" href="../signals.html" title="Chapter 24. Boost.Signals"> +<link rel="up" href="../signals.html" title="Chapter 26. Boost.Signals"> +<link rel="prev" href="../signals.html" title="Chapter 26. Boost.Signals"> <link rel="next" href="reference.html" title="Reference"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -25,19 +25,19 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="signals.tutorial"></a>Tutorial</h2></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="tutorial.html#id3193099">How to Read this Tutorial</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3193162">Compatibility Note</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3193274">Hello, World! (Beginner)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3193430">Calling multiple slots</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3193844">Passing values to and from slots</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3194758">Connection Management</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195532">Example: Document-View</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195660">Linking against the Signals library</a></span></dt> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="tutorial.html#idp425116528">How to Read this Tutorial</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425123312">Compatibility Note</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425136992">Hello, World! (Beginner)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425154192">Calling multiple slots</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425201488">Passing values to and from slots</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425308368">Connection Management</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425395488">Example: Document-View</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425410672">Linking against the Signals library</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3193099"></a>How to Read this Tutorial</h3></div></div></div> +<a name="idp425116528"></a>How to Read this Tutorial</h3></div></div></div> <p>This tutorial is not meant to be read linearly. Its top-level structure roughly separates different concepts in the library (e.g., handling calling multiple slots, passing values to and from @@ -57,7 +57,7 @@ will not need to read the <span class="emphasis"><em>Advanced</em></span> sectio </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3193162"></a>Compatibility Note</h3></div></div></div> +<a name="idp425123312"></a>Compatibility Note</h3></div></div></div> <p>Boost.Signals has two syntactical forms: the preferred form and the compatibility form. The preferred form fits more closely with the C++ language and reduces the number of separate template parameters @@ -82,7 +82,7 @@ we can keep this table up-to-date.</p> </tr></thead> <tbody><tr> <td align="left"> - <div class="itemizedlist"><ul class="itemizedlist" type="disc"> + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>GNU C++ 2.95.x, 3.0.x, 3.1.x</p></li> <li class="listitem"><p>Comeau C++ 4.2.45.2</p></li> <li class="listitem"><p>SGI MIPSpro 7.3.0</p></li> @@ -92,7 +92,7 @@ we can keep this table up-to-date.</p> </ul></div> </td> <td align="left"> - <div class="itemizedlist"><ul class="itemizedlist" type="disc"> + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><span class="emphasis"><em>Any compiler supporting the preferred syntax</em></span></p></li> <li class="listitem"><p>Microsoft Visual C++ 6.0, 7.0</p></li> <li class="listitem"><p>Borland C++ 5.5.1</p></li> @@ -105,7 +105,7 @@ we can keep this table up-to-date.</p> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3193274"></a>Hello, World! (Beginner)</h3></div></div></div> +<a name="idp425136992"></a>Hello, World! (Beginner)</h3></div></div></div> <p>The following example writes "Hello, World!" using signals and slots. First, we create a signal <code class="computeroutput">sig</code>, a signal that takes no arguments and has a void return value. Next, we connect @@ -141,7 +141,7 @@ struct HelloWorld // Connect a HelloWorld slot HelloWorld hello; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(hello); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(hello); // Call all of the slots sig(); @@ -164,7 +164,7 @@ struct HelloWorld // Connect a HelloWorld slot HelloWorld hello; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(hello); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(hello); // Call all of the slots sig(); @@ -175,14 +175,14 @@ sig(); </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3193430"></a>Calling multiple slots</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="tutorial.html#id3193435">Connecting multiple slots (Beginner)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3193620">Ordering slot call groups (Intermediate)</a></span></dt> +<a name="idp425154192"></a>Calling multiple slots</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="tutorial.html#idp425154736">Connecting multiple slots (Beginner)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425176000">Ordering slot call groups (Intermediate)</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3193435"></a>Connecting multiple slots (Beginner)</h4></div></div></div> +<a name="idp425154736"></a>Connecting multiple slots (Beginner)</h4></div></div></div> <p>Calling a single slot from a signal isn't very interesting, so we can make the Hello, World program more interesting by splitting the work of printing "Hello, World!" into two completely separate @@ -227,8 +227,8 @@ signal, and when we call the signal both slots will be called.</p> <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code><void ()> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(Hello()); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(World()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(Hello()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(World()); sig(); </pre> @@ -237,8 +237,8 @@ sig(); <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signal0</a></code><void> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(Hello()); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(World()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(Hello()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(World()); sig(); </pre> @@ -253,7 +253,7 @@ Hello, World! </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3193620"></a>Ordering slot call groups (Intermediate)</h4></div></div></div> +<a name="idp425176000"></a>Ordering slot call groups (Intermediate)</h4></div></div></div> <p>Slots are free to have side effects, and that can mean that some slots will have to be called before others even if they are not connected in that order. The Boost.Signals library allows slots to be placed into groups that are ordered in @@ -277,16 +277,16 @@ are, by default, <code class="computeroutput">int</code>s, and are ordered by th <td align="left"> <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code><void ()> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(1, World()); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(0, Hello()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(1, World()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(0, Hello()); sig(); </pre> </td> <td align="left"> <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signal0</a></code><void> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(1, World()); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(0, Hello()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(1, World()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(0, Hello()); sig(); </pre> </td> @@ -302,7 +302,7 @@ group parameter and those that don't? The "unnamed" slots (i.e., those that have been connected without specifying a group name) can be placed at the front or back of the slot list (by passing <code class="computeroutput">boost::signals::at_front</code> or <code class="computeroutput">boost::signals::at_back</code> -as the last parameter to <code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>, respectively), and defaults to the end of the list. When +as the last parameter to <code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>, respectively), and defaults to the end of the list. When a group is specified, the final parameter describes where the slot will be placed within the group ordering. If we add a new slot to our example like this:</p> @@ -315,7 +315,7 @@ struct GoodMorning } }; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(GoodMorning()); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(GoodMorning()); </pre> <p>... we will get the result we wanted:</p> <pre class="programlisting"> @@ -326,14 +326,14 @@ Hello, World! </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3193844"></a>Passing values to and from slots</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="tutorial.html#id3193849">Slot Arguments (Beginner)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3194094">Signal Return Values (Advanced)</a></span></dt> +<a name="idp425201488"></a>Passing values to and from slots</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="tutorial.html#idp425202048">Slot Arguments (Beginner)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425231328">Signal Return Values (Advanced)</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3193849"></a>Slot Arguments (Beginner)</h4></div></div></div> +<a name="idp425202048"></a>Slot Arguments (Beginner)</h4></div></div></div> <p>Signals can propagate arguments to each of the slots they call. For instance, a signal that propagates mouse motion events might want to pass along the new mouse coordinates and whether the mouse @@ -377,10 +377,10 @@ void print_quotient(float x, float y) <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code><void (float, float)> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_difference); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_quotient); sig(5, 3); </pre> @@ -389,10 +389,10 @@ sig(5, 3); <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signal2</a></code><void, float, float> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_difference); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&print_quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&print_quotient); sig(5, 3); </pre> @@ -417,7 +417,7 @@ connected to <code class="computeroutput">sig</code> must therefore be able to t </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3194094"></a>Signal Return Values (Advanced)</h4></div></div></div> +<a name="idp425231328"></a>Signal Return Values (Advanced)</h4></div></div></div> <p>Just as slots can receive arguments, they can also return values. These values can then be returned back to the caller of the signal through a <em class="firstterm">combiner</em>. The combiner is a mechanism @@ -451,10 +451,10 @@ float difference(float x, float y) { return x-y; } <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code><float (float x, float y)> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&quotient); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&difference); std::cout << sig(5, 3) << std::endl; </pre> @@ -468,10 +468,10 @@ float difference(float x, float y) { return x-y; } <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signal2</a></code><float, float, float> sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&quotient); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&difference); std::cout << sig(5, 3) << std::endl; </pre> @@ -553,10 +553,10 @@ follows the signal's calling signature:</p> <p>Now we can connect slots that perform arithmetic functions and use the signal:</p> <pre class="programlisting"> -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&quotient); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&difference); std::cout << sig(5, 3) << std::endl; </pre> @@ -598,10 +598,10 @@ Again, we can create a signal with this new combiner: <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code><float (float, float), aggregate_values<std::vector<float> > > sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&quotient); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&difference); std::vector<float> results = sig(5, 3); std::copy(results.begin(), results.end(), @@ -613,10 +613,10 @@ std::copy(results.begin(), results.end(), <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signal2</a></code><float, float, float, aggregate_values<std::vector<float> > > sig; -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&quotient); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&product); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&sum); -sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(&difference); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&quotient); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&product); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&sum); +sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(&difference); std::vector<float> results = sig(5, 3); std::copy(results.begin(), results.end(), @@ -667,19 +667,19 @@ struct DistributeRequest { </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3194758"></a>Connection Management</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="tutorial.html#id3194763">Disconnecting Slots (Beginner)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3194886">Blocking Slots (Beginner)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3194965">Scoped connections (Intermediate)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195015">Disconnecting equivalent slots (Intermediate)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195099">Automatic connection management (Intermediate)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195302">When can disconnections occur? (Intermediate)</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id3195373">Passing slots (Intermediate)</a></span></dt> +<a name="idp425308368"></a>Connection Management</h3></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="tutorial.html#idp425308912">Disconnecting Slots (Beginner)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425323120">Blocking Slots (Beginner)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425332208">Scoped connections (Intermediate)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425337808">Disconnecting equivalent slots (Intermediate)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425347216">Automatic connection management (Intermediate)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425370832">When can disconnections occur? (Intermediate)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#idp425378320">Passing slots (Intermediate)</a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3194763"></a>Disconnecting Slots (Beginner)</h4></div></div></div> +<a name="idp425308912"></a>Disconnecting Slots (Beginner)</h4></div></div></div> <p>Slots aren't expected to exist indefinately after they are connected. Often slots are only used to receive a few events and are then disconnected, and the programmer needs control to decide @@ -688,14 +688,14 @@ when a slot should no longer be connected.</p> <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">boost::signals::connection</a></code> class. The <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> class uniquely represents the connection between a particular signal and a particular slot. The -<code class="computeroutput"><a class="link" href="../boost/signals/connection.html#id833913-bb">connected</a>()</code> method checks if the signal and slot are -still connected, and the <code class="computeroutput"><a class="link" href="../boost/signals/connection.html#id799010-bb">disconnect()</a></code> method +<code class="computeroutput"><a class="link" href="../boost/signals/connection.html#idp147727984-bb">connected</a>()</code> method checks if the signal and slot are +still connected, and the <code class="computeroutput"><a class="link" href="../boost/signals/connection.html#idp144248848-bb">disconnect()</a></code> method disconnects the signal and slot if they are connected before it is called. Each call to the signal's <code class="computeroutput">connect()</code> method returns a connection object, which can be used to determine if the connection still exists or to disconnect the signal and slot.</p> <pre class="programlisting"> -boost::signals::connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(HelloWorld()); +boost::signals::connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(HelloWorld()); if (c.<code class="computeroutput">connected</code>()) { <span class="emphasis"><em>// c is still connected to the signal</em></span> sig(); <span class="emphasis"><em>// Prints "Hello, World!"</em></span> @@ -709,7 +709,7 @@ sig(); <span class="emphasis"><em>// Does nothing: there are no connected slots< </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3194886"></a>Blocking Slots (Beginner)</h4></div></div></div> +<a name="idp425323120"></a>Blocking Slots (Beginner)</h4></div></div></div> <p>Slots can be temporarily "blocked", meaning that they will be ignored when the signal is invoked but have not been disconnected. The <code class="computeroutput">block</code> member function @@ -717,7 +717,7 @@ temporarily blocks a slot, which can be unblocked via <code class="computeroutput">unblock</code>. Here is an example of blocking/unblocking slots:</p> <pre class="programlisting"> -boost::signals::connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(HelloWorld()); +boost::signals::connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(HelloWorld()); sig(); <span class="emphasis"><em>// Prints "Hello, World!"</em></span> c.<code class="computeroutput">block</code>(); <span class="emphasis"><em>// block the slot</em></span> @@ -730,7 +730,7 @@ sig(); <span class="emphasis"><em>// Prints "Hello, World!"</em></span> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3194965"></a>Scoped connections (Intermediate)</h4></div></div></div> +<a name="idp425332208"></a>Scoped connections (Intermediate)</h4></div></div></div> <p>The <code class="computeroutput">boost::signals::scoped_connection</code> class references a signal/slot connection that will be disconnected when the <code class="computeroutput">scoped_connection</code> class goes out of scope. This @@ -738,7 +738,7 @@ ability is useful when a connection need only be temporary, e.g.,</p> <pre class="programlisting"> { - boost::signals::scoped_connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(ShortLived()); + boost::signals::scoped_connection c = sig.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(ShortLived()); sig(); <span class="emphasis"><em>// will call ShortLived function object</em></span> } sig(); <span class="emphasis"><em>// ShortLived function object no longer connected to sig</em></span> @@ -746,10 +746,10 @@ sig(); <span class="emphasis"><em>// ShortLived function object no longer connec </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3195015"></a>Disconnecting equivalent slots (Intermediate)</h4></div></div></div> +<a name="idp425337808"></a>Disconnecting equivalent slots (Intermediate)</h4></div></div></div> <p>One can disconnect slots that are equivalent to a given function object using a form of the -<code class="computeroutput"><a class="link" href="../boost/signalN.html#id1420589-bb">disconnect</a></code> method, so long as +<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp211498240-bb">disconnect</a></code> method, so long as the type of the function object has an accessible <code class="computeroutput">==</code> operator. For instance: @@ -797,7 +797,7 @@ sig.disconnect(&foo); </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3195099"></a>Automatic connection management (Intermediate)</h4></div></div></div> +<a name="idp425347216"></a>Automatic connection management (Intermediate)</h4></div></div></div> <p>Boost.Signals can automatically track the lifetime of objects involved in signal/slot connections, including automatic disconnection of slots when objects involved in the slot call are @@ -852,7 +852,7 @@ public: // ... NewsMessageArea newsMessageArea = new NewsMessageArea(/* ... */); // ... -deliverNews.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(boost::bind(&NewsMessageArea::displayNews, +deliverNews.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(boost::bind(&NewsMessageArea::displayNews, newsMessageArea, _1)); </pre> <p>However, what if the user closes the news message area, @@ -885,10 +885,10 @@ this limitation.</p> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3195302"></a>When can disconnections occur? (Intermediate)</h4></div></div></div> +<a name="idp425370832"></a>When can disconnections occur? (Intermediate)</h4></div></div></div> <p>Signal/slot disconnections occur when any of these conditions occur:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>The connection is explicitly disconnected via the connection's <code class="computeroutput">disconnect</code> method directly, or indirectly via the signal's <code class="computeroutput">disconnect</code> method or @@ -912,7 +912,7 @@ signal.</p> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3195373"></a>Passing slots (Intermediate)</h4></div></div></div> +<a name="idp425378320"></a>Passing slots (Intermediate)</h4></div></div></div> <p>Slots in the Boost.Signals library are created from arbitrary function objects, and therefore have no fixed type. However, it is commonplace to require that slots be passed through interfaces that @@ -947,7 +947,7 @@ void Button::doOnClick( const OnClick::slot_type& slot ) { - onClick.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(slot); + onClick.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(slot); } void printCoordinates(long x, long y) @@ -978,7 +978,7 @@ void Button::doOnClick( const OnClick::slot_type& slot ) { - onClick.<code class="computeroutput"><a class="link" href="../boost/signalN.html#id829361-bb">connect</a></code>(slot); + onClick.<code class="computeroutput"><a class="link" href="../boost/signalN.html#idp146240304-bb">connect</a></code>(slot); } void printCoordinates(long x, long y) @@ -1002,7 +1002,7 @@ hidden in an implementation detail file.</p> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3195532"></a>Example: Document-View</h3></div></div></div> +<a name="idp425395488"></a>Example: Document-View</h3></div></div></div> <p>Signals can be used to implement flexible Document-View architectures. The document will contain a signal to which each of the views can connect. The following <code class="computeroutput">Document</code> class @@ -1127,7 +1127,7 @@ public: </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="id3195660"></a>Linking against the Signals library</h3></div></div></div> +<a name="idp425410672"></a>Linking against the Signals library</h3></div></div></div> <p>Part of the Boost.Signals library is compiled into a binary library that must be linked into your application to use Signals. Please refer to @@ -1137,7 +1137,7 @@ public: </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> -<td align="left"><p><small>Last revised: January 29, 2007 at 20:05:29 +0000</small></p></td> +<td align="left"></td> <td align="right"><div class="copyright-footer">Copyright © 2001-2004 Douglas Gregor<p>Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p> |