Author: jinq0123@xxxxxxx Date: Thu Jun 4 04:49:09 2009 New Revision: 258 Modified: trunk/doc/html/signals.html trunk/doc/html/signals2.html Log: 完成Signals2介绍.同时更新Signals的介绍. Modified: trunk/doc/html/signals.html ============================================================================== --- trunk/doc/html/signals.html (original) +++ trunk/doc/html/signals.html Thu Jun 4 04:49:09 2009 @@ -159,7 +159,7 @@ callback receivers (also called event targets or subscribers), which are called when the signal is "emitted."</p> -<p>Boost.Signals 库是一个可控的信号插槽(signals and slots)系统的实现。 +<p>Boost.Signals 库实现了一个可控的信号插槽(signals and slots)系统。 信号代表了具有多个目标的回调, 在类似的系统中也称为发布者(publisher)或事件(event)。 @@ -189,9 +189,9 @@ user to specify the manner in which multiple return values are combined.</p> -<p>当信号连接多个插槽时, -关于插槽的返回值和信号的返回值之间的关系有个问题。 -Boost.Signals 允许用户指定合并多个返回值的方式。 +<p>当信号连接多个插槽时,插槽的返回值和信号的返回值之间是什么关系呢? +这是个问题。 +Boost.Signals 允许用户合并多个返回值,并指定合并的方式。 </p> </div> @@ -208,7 +208,7 @@ </tr> <tr> -<td align="left"><p><small>译文更新:2008.7.10</small></p></td> +<td align="left"><p><small>译文更新:2008.6.4</small></p></td> <td align="right"><div class="copyright-footer"></div></td> </tr> Modified: trunk/doc/html/signals2.html ============================================================================== --- trunk/doc/html/signals2.html (original) +++ trunk/doc/html/signals2.html Thu Jun 4 04:49:09 2009 @@ -1,11 +1,11 @@ <html> <head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<title>Chapter 17. Boost.Signals2</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Chapter 17. Boost.Signals2</title> <link rel="stylesheet" href="boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.74.3"><link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)"> +<link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="signals/tests.html" title="Testsuite"> <link rel="next" href="signals2/tutorial.html" title="Tutorial"> </head> @@ -25,21 +25,22 @@ <div class="chapter" lang="en"> <div class="titlepage"><div> <div><h2 class="title"> -<a name="signals2"></a>Chapter 17. Boost.Signals2</h2></div> +<a name="signals2"></a>Chapter 17. Boost.Signals2</h2></div> <div><div class="author"><h3 class="author"> <span class="firstname">Douglas</span> <span class="surname">Gregor</span> </h3></div></div> <div><div class="author"><h3 class="author"><span class="firstname">Frank</span> <span class="othername">Mori</span> <span class="surname">Hess</span>
</h3></div></div> -<div><p class="copyright">Copyright 2001-2004 Douglas Gregor</p></div> -<div><p class="copyright">Copyright 2007-2009 Frank Mori Hess</p></div> +<div><p class="copyright">Copyright (c) 2001-2004 Douglas Gregor</p></div> +<div><p class="copyright">Copyright (c) 2007-2009 Frank Mori Hess</p></div> <div><div class="legalnotice"> <a name="id3351304"></a><p>Distributed under 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>
</div></div> </div></div> + <div class="toc"> <p><b>Table of Contents</b></p> <dl> @@ -103,16 +104,95 @@<dd><dl><dt><span class="section"><a href="signals2/tests.html#id3387753">Acceptance tests</a></span></dt></dl></dd>
</dl> </div> + +<div class="toc"> +<p><b>目录</b></p> +<dl>+<dt><span class="section"><a href="signals2.html#id3351328">介绍 </a></span></dt> +<dd><dl><dt><span class="section"><a href="signals2.html#id3351365">Signals2</a></span></dt></dl></dd> +<dt><span class="section"><a href="signals2/tutorial.html">教程 </a></span></dt>
+<dd><dl>+<dt><span class="section"><a href="signals2/tutorial.html#id3351397">如何阅 读本教程</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3351460">对兼容 性的注释</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3351478">Hello, World!(初级 )</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3351586">调用多 个插槽</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3351941">传值到 插槽及回传</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3352571">连接管 理</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.document-view">例子:文档-视 图</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.extended-slot-type">让插槽可 以操作其连接(高级)</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#signals2.tutorial.signal-mutex-template-parameter">改 变信号的互斥体类型(高级)</a></span></dt> +<dt><span class="section"><a href="signals2/tutorial.html#id3353969">链接 Signals2 库</a></span></dt>
+</dl></dd>+<dt><span class="section"><a href="signals2/examples.html">例程 </a></span></dt>
+<dd><dl>+<dt><span class="section"><a href="signals2/examples.html#signals2.examples.misc">各种教学示例 </a></span></dt> +<dt><span class="section"><a href="signals2/examples.html#signals2.examples.document-view">文档-视图 </a></span></dt> +<dt><span class="section"><a href="signals2/examples.html#signals2.examples.deconstruct">用 deconstruct() 定义 postconstructor 和 predestructor</a></span></dt>
+</dl></dd>+<dt><span class="section"><a href="signals2/reference.html">参考 </a></span></dt>
+<dd><dl>+<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2_hpp">头文件 <boost/signals2.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.connection_hpp">头文件 <boost/signals2/connection.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.deconstruct_hpp">头文件 <boost/signals2/deconstruct.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.dummy_mutex_hpp">头文件 <boost/signals2/dummy_mutex.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.last_value_hpp">头文件 <boost/signals2/last_value.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.mutex_hpp">头文件 <boost/signals2/mutex.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.optional_last_value_hpp">头 文件 <boost/signals2/optional_last_value.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.shared_connection_block_hpp">头 文件 <boost/signals2/shared_connection_block.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_hpp">头文件 <boost/signals2/signal.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_base_hpp">头文件 <boost/signals2/signal_base.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.signal_type_hpp">头文件 <boost/signals2/signal_type.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.slot_hpp">头文件 <boost/signals2/slot.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.slot_base_hpp">头文件 <boost/signals2/slot_base.hpp></a></span></dt> +<dt><span class="section"><a href="signals2/reference.html#header.boost.signals2.trackable_hpp">头文件 <boost/signals2/trackable.hpp></a></span></dt>
+</dl></dd>+<dt><span class="section"><a href="signals2/thread-safety.html">线程安全性 </a></span></dt>
+<dd><dl>+<dt><span class="section"><a href="signals2/thread-safety.html#id3385400">介绍</a></span></dt> +<dt><span class="section"><a href="signals2/thread-safety.html#id3385455">信号与合并器</a></span></dt> +<dt><span class="section"><a href="signals2/thread-safety.html#id3385620">连接与其他类</a></span></dt>
+</dl></dd>+<dt><span class="section"><a href="signals2/faq.html">常见问题 </a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html">设计原理 </a></span></dt>
+<dd><dl>+<dt><span class="section"><a href="signals2/rationale.html#id3385960">用户 层连接管理</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386133">自动 连接管理</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386287">默认 合并器为 optional_last_value</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386348">合并 器接口</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386428">连接 的接口:+= 运算符</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386600">Signals2 互斥体类</a></span></dt> +<dt><span class="section"><a href="signals2/rationale.html#id3386712">与其 他信号/插槽实现的比较</a></span></dt>
+</dl></dd>+<dt><span class="section"><a href="signals2/porting.html">从 Boost.Signals 向 Boost.Signals2 移植</a></span></dt> +<dt><span class="section"><a href="signals2/tests.html">测试套件 </a></span></dt> +<dd><dl><dt><span class="section"><a href="signals2/tests.html#id3387753">验收测试</a></span></dt></dl></dd>
+</dl> +</div> + <div class="section" lang="en"> + <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="id3351328"></a>Introduction</h2></div></div></div> + +<div class="titlepage"><div><div><h2 class="title" style="clear: both"> +<a name="id3351328"></a>介绍</h2></div></div></div> +<div class="toc"><dl><dt><span class="section"><a href="signals2.html#id3351365">Signals2</a></span></dt></dl></div>
+ <p>The Boost.Signals2 library is an implementation of a managed signals and slots system. Signals represent callbacks with multiple targets, and are also called publishers or events in similar systems. Signals are connected to some set of slots, which are callback receivers (also called event targets or subscribers), which are called when the signal is "emitted."</p> + +<p>Boost.Signals2 库实现了一个可控的信号插槽(signals and slots)系统。 + 信号代表了具有多个目标的回调, + 在类似的系统中也称为发布者(publisher)或事件(event)。 + 信号与某组插槽相连接,插槽即回调的接收者 + (也称为事件目标,event target,或订阅者,subscriber), + 它们在信号"发出"时被调用。</p> + <p>Signals and slots are managed, in that signals and slots (or, more properly, objects that occur as part of the slots) can track connections and are capable of automatically disconnecting signal/slot @@ -120,14 +200,27 @@ signal/slot connections without expending a great effort to manage the lifetimes of those connections with regard to the lifetimes of all objects involved.</p> + +<p>信号和插槽是可控的, + 因为信号和插槽(或严格地说是作为插槽出现的对象)跟踪所有的连接, + 并能够在信号或插槽销毁时自动断开信号/插槽的连接。 + 这让使用者能够在建立信号/插槽连接的同时, + 不必费力地根据相关对象的生命期去管理那些连接的生命期。</p> + <p>When signals are connected to multiple slots, there is a question regarding the relationship between the return values of the slots and the return value of the signals. Boost.Signals2 allows the user to specify the manner in which multiple return values are combined.</p> + +<p>当信号连接多个插槽时,插槽的返回值和信号的返回值之间是什么关系呢? + 这是个问题。 + Boost.Signals2 允许用户合并多个返回值,并指定合并的方式。</p> + <div class="section" lang="en"> <div class="titlepage"><div><div><h3 class="title"> <a name="id3351365"></a>Signals2</h3></div></div></div> + <p>This documentation describes a thread-safe variant of the original Boost.Signals library. There have been some changes to the interface to support thread-safety, mostly with respect to @@ -136,13 +229,33 @@ Dimov, and Gottlob Frege for ideas and feedback, and to Douglas Gregor for the original version of Boost.Signals this effort was based on. </p> + +<p>本文描述的是原 Boost.Signals 库的一个线程安全的变体。 + 接口有所更改以支持线程安全,主要是在自动连接管理方面。 + 本实现由 Frank Mori Hess 编写。 + 同时感谢 Timmo Stange、Peter Dimov,和 Gottlob Frege 的意见和反馈, + 并感谢 Douglas Gregor,基于他的 Boost.Signals 才会有这个成果。 + </p> + </div> </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: June 12, 2007 at 14:01:23 -0400</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> -</tr></table> +</tr> + +<tr>+<td align="left"><p><small>翻译:<a href="http://blog.csdn.net/jq0123";>金庆 </a></small></p></td>
+<td align="right"><div class="copyright-footer"></div></td> +</tr> + +<tr> +<td align="left"><p><small>译文更新:2009.6.4</small></p></td> +<td align="right"><div class="copyright-footer"></div></td> +</tr> + +</table> <hr> <div class="spirit-nav"><a accesskey="p" href="signals/tests.html"><img src="../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="signals2/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a>