[boost-doc-zh commit] r242 - 所有GB2312编码改为UTF-8.

  • From: codesite-noreply@xxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Tue, 14 Apr 2009 06:23:36 +0000

Author: jinq0123@xxxxxxx
Date: Mon Apr 13 21:23:05 2009
New Revision: 242

Modified:
   trunk/doc/html/boost/last_value.html
   trunk/doc/html/boost/last_value_void__id550974.html
   trunk/doc/html/boost/signal.html
   trunk/doc/html/boost/signalN.html
   trunk/doc/html/boost/signals/connection.html
   trunk/doc/html/boost/signals/scoped_connection.html
   trunk/doc/html/boost/signals/trackable.html
   trunk/doc/html/boost/slot.html
   trunk/doc/html/boost/visit_each.html
   trunk/doc/html/signals.html
   trunk/doc/html/signals/s05.html
   trunk/doc/html/signals/s06.html
   trunk/doc/html/signals/tests.html
   trunk/doc/html/signals/tutorial.html
   trunk/libs/gil/doc/html/gildesignguide.html
   trunk/libs/gil/doc/html/giltutorial.html
   trunk/libs/gil/doc/html/index.html
   trunk/libs/python/doc/PyConDC_2003/bpl_c.html
   trunk/libs/python/doc/building.html
   trunk/libs/python/doc/index.html
   trunk/libs/python/doc/internals.html
   trunk/libs/python/doc/support.html
   trunk/libs/python/doc/tutorial/doc/html/index.html
   trunk/libs/python/doc/tutorial/doc/html/python/embedding.html
   trunk/libs/python/doc/tutorial/doc/html/python/exception.html
   trunk/libs/python/doc/tutorial/doc/html/python/exposing.html
   trunk/libs/python/doc/tutorial/doc/html/python/functions.html
   trunk/libs/python/doc/tutorial/doc/html/python/hello.html
   trunk/libs/python/doc/tutorial/doc/html/python/iterators.html
   trunk/libs/python/doc/tutorial/doc/html/python/object.html
   trunk/libs/python/doc/tutorial/doc/html/python/techniques.html
   trunk/libs/python/doc/v2/CallPolicies.html
   trunk/libs/python/doc/v2/Dereferenceable.html
   trunk/libs/python/doc/v2/Extractor.html
   trunk/libs/python/doc/v2/HolderGenerator.html
   trunk/libs/python/doc/v2/ObjectWrapper.html
   trunk/libs/python/doc/v2/ResultConverter.html
   trunk/libs/python/doc/v2/args.html
   trunk/libs/python/doc/v2/call.html
   trunk/libs/python/doc/v2/call_method.html
   trunk/libs/python/doc/v2/callbacks.html
   trunk/libs/python/doc/v2/class.html
   trunk/libs/python/doc/v2/configuration.html
   trunk/libs/python/doc/v2/copy_const_reference.html
   trunk/libs/python/doc/v2/copy_non_const_reference.html
   trunk/libs/python/doc/v2/data_members.html
   trunk/libs/python/doc/v2/def.html
   trunk/libs/python/doc/v2/def_visitor.html
   trunk/libs/python/doc/v2/default_call_policies.html
   trunk/libs/python/doc/v2/definitions.html
   trunk/libs/python/doc/v2/dict.html
   trunk/libs/python/doc/v2/docstring_options.html
   trunk/libs/python/doc/v2/enum.html
   trunk/libs/python/doc/v2/errors.html
   trunk/libs/python/doc/v2/exception_translator.html
   trunk/libs/python/doc/v2/exec.html
   trunk/libs/python/doc/v2/extract.html
   trunk/libs/python/doc/v2/faq.html
   trunk/libs/python/doc/v2/function_doc_signature.html
   trunk/libs/python/doc/v2/handle.html
   trunk/libs/python/doc/v2/has_back_reference.html
   trunk/libs/python/doc/v2/implicit.html
   trunk/libs/python/doc/v2/import.html
   trunk/libs/python/doc/v2/indexing.html
   trunk/libs/python/doc/v2/init.html
   trunk/libs/python/doc/v2/instance_holder.html
   trunk/libs/python/doc/v2/iterator.html
   trunk/libs/python/doc/v2/list.html
   trunk/libs/python/doc/v2/long.html
   trunk/libs/python/doc/v2/lvalue_from_pytype.html
   trunk/libs/python/doc/v2/make_function.html
   trunk/libs/python/doc/v2/manage_new_object.html
   trunk/libs/python/doc/v2/module.html
   trunk/libs/python/doc/v2/numeric.html
   trunk/libs/python/doc/v2/object.html
   trunk/libs/python/doc/v2/opaque.html
   trunk/libs/python/doc/v2/operators.html
   trunk/libs/python/doc/v2/overloads.html
   trunk/libs/python/doc/v2/pickle.html
   trunk/libs/python/doc/v2/pointee.html
   trunk/libs/python/doc/v2/ptr.html
   trunk/libs/python/doc/v2/python.html
   trunk/libs/python/doc/v2/pytype_function.html
   trunk/libs/python/doc/v2/raw_function.html
   trunk/libs/python/doc/v2/reference.html
   trunk/libs/python/doc/v2/reference_existing_object.html
   trunk/libs/python/doc/v2/register_ptr_to_python.html
   trunk/libs/python/doc/v2/return_arg.html
   trunk/libs/python/doc/v2/return_by_value.html
   trunk/libs/python/doc/v2/return_internal_reference.html
   trunk/libs/python/doc/v2/return_opaque_pointer.html
   trunk/libs/python/doc/v2/return_value_policy.html
   trunk/libs/python/doc/v2/scope.html
   trunk/libs/python/doc/v2/slice.html
   trunk/libs/python/doc/v2/ssize_t.html
   trunk/libs/python/doc/v2/stl_iterator.html
   trunk/libs/python/doc/v2/str.html
   trunk/libs/python/doc/v2/to_python_converter.html
   trunk/libs/python/doc/v2/to_python_indirect.html
   trunk/libs/python/doc/v2/to_python_value.html
   trunk/libs/python/doc/v2/tuple.html
   trunk/libs/python/doc/v2/type_id.html
   trunk/libs/python/doc/v2/with_custodian_and_ward.html
   trunk/libs/python/doc/v2/wrapper.html

Log:
所有GB2312编码改为UTF-8.

涉及的库为signals, python. 还有gil少量几个文件.

Modified: trunk/doc/html/boost/last_value.html
==============================================================================
--- trunk/doc/html/boost/last_value.html        (original)
+++ trunk/doc/html/boost/last_value.html        Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Class template last_value</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Class template last_value</title>

 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -31,10 +31,10 @@
 <div class="refnamediv">
 <h2><span class="refentrytitle">Class template
 last_value</span></h2>
-<p>boost::last_value �� Evaluate an <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a> +<p>boost::last_value — Evaluate an <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a>
 sequence and return the last value in the sequence.</p>
-<p>boost::last_value �� ��һ�� <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a>
-������ֵ���������е����һ��ֵ�� </p>
+<p>boost::last_value — 对一个 <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a>
+序列求值并返回序列的最后一个值。 </p>
 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv">
@@ -69,8 +69,8 @@
 </td>
 <td>
<p>Dereferences every iterator in the sequence <code class="computeroutput">[first, last)</code>.</p>
-<p>���������� <code class="computeroutput">[first,
-last)</code> �е�ÿ������</p>
+<p>解引用序列 <code class="computeroutput">[first,
+last)</code> 中的每个迭代器。</p>
 </td>
 </tr>
 <tr>
@@ -80,8 +80,8 @@
 <td>
<p>The result of dereferencing the iterator <code class="computeroutput">last-1</code>.</p>
 <p>
-����� <code class="computeroutput">last-1</code>
-�����õĽ��
+迭代器 <code class="computeroutput">last-1</code>
+解引用的结果。
 </p>
 </td>
 </tr>
@@ -113,8 +113,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.8</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.8</p>
 <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>
 </div>

Modified: trunk/doc/html/boost/last_value_void__id550974.html
==============================================================================
--- trunk/doc/html/boost/last_value_void__id550974.html (original)
+++ trunk/doc/html/boost/last_value_void__id550974.html Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Class last_value&lt;void&gt;</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -28,7 +28,7 @@
 <h2><span class="refentrytitle">Class last_value&lt;void&gt;</span></h2>
<p>boost::last_value&lt;void&gt; &#8212; Evaluate an InputIterator sequence.</p>

-<p>boost::last_value&lt;void&gt; &#8212; ��һ����������������ֵ��</p>
+<p>boost::last_value&lt;void&gt; &#8212; 对一个输入迭代器序列求值。</p>

 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2>
@@ -56,7 +56,7 @@
 <td><p><span class="term">Effects:</span></p></td>
<td><p>Dereferences every iterator in the sequence <code class="computeroutput">[first, last)</code>.</p>

-<p>���������� <code class="computeroutput">[first, last)</code> �е�ÿ������</p> +<p>解引用序列 <code class="computeroutput">[first, last)</code> 中的每个迭 代器。</p>

 </td>
 </tr></tbody>
@@ -69,8 +69,8 @@
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &copy; 2001-2004 Douglas Gregor

-    <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-    <p>���ĸ��£�2008.7.8</p>
+    <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+    <p>译文更新:2008.7.8</p>

     <p>Use, modification and distribution is subject to the Boost
     Software License, Version 1.0. (See accompanying file

Modified: trunk/doc/html/boost/signal.html
==============================================================================
--- trunk/doc/html/boost/signal.html    (original)
+++ trunk/doc/html/boost/signal.html    Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Class template signal</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -28,7 +28,7 @@
 <h2><span class="refentrytitle">Class template signal</span></h2>
 <p>boost::signal &#8212; Safe multicast callback.</p>

-<p>boost::signal &#8212; ��ȫ��һ�Զ�ص�</p>
+<p>boost::signal &#8212; 安全的一对多回调。</p>

 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2>
@@ -52,24 +52,24 @@
derives from the appropriate <a class="link" href="signalN.html" title="Class template signalN">signalN</a>
         instantiation.</p>

-<p>��ģ�� <a class="link" href="signal.html" title="Class template signal">signal</a>
-        �Ǵ����ֵ���ģ��
- <a class="link" href="signalN.html" title="Class template signalN">signal0</a>�� - <a class="link" href="signalN.html" title="Class template signalN">signal1</a>��
-        �ȵ�֮�ϵı���װ��
+<p>类模板 <a class="link" href="signal.html" title="Class template signal">signal</a>
+        是带数字的类模板
+ <a class="link" href="signalN.html" title="Class template signalN">signal0</a>、 + <a class="link" href="signalN.html" title="Class template signalN">signal1</a>,
+        等等之上的薄封装。

-        ��IJ�����һ����� N �����ĺ������ͣ�
-        ���� N ���IJ���
-        ����������Ӧ��
+        它的参数是一个具有 N 个参数的函数类型,
+        而不是 N 个单独的参数,
+        它派生自相应的
<a class="link" href="signalN.html" title="Class template signalN">signalN</a>
-        ʵ��</p>
+        实例。</p>

 <p>All functionality of this class template is in its base
class <a class="link" href="signalN.html" title="Class template signalN">signalN</a>.</p>

-<p>����ģ������й��ܶ��������
+<p>该类模板的所有功能都在其基类
<a class="link" href="signalN.html" title="Class template signalN">signalN</a>
-        �С�</p>
+        中。</p>

 <div class="refsect2" lang="en">
 <a name="id1281548"></a><h3>
@@ -86,7 +86,7 @@
 <td>Initializes the base class with the given combiner
         and comparison objects.

-        <p>������ĺϲ���ͱȽ϶����ʼ�����ࡣ
+        <p>用输入的合并器和比较对象初始化基类。
         </p>
         </td>
 </tr></tbody>
@@ -99,8 +99,8 @@
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &copy; 2001-2004 Douglas Gregor

-    <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-    <p>���ĸ��£�2008.7.8</p>
+    <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+    <p>译文更新:2008.7.8</p>

     <p>Use, modification and distribution is subject to the Boost
     Software License, Version 1.0. (See accompanying file

Modified: trunk/doc/html/boost/signalN.html
==============================================================================
--- trunk/doc/html/boost/signalN.html   (original)
+++ trunk/doc/html/boost/signalN.html   Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Class template signalN</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -28,7 +28,7 @@
 <h2><span class="refentrytitle">Class template signalN</span></h2>
 <p>boost::signalN &#8212; Set of safe multicast callback types.</p>

-<p>boost::signalN &#8212; �ɰ�ȫ�ؽ���һ�Զ�ص��һ�����͡�</p>
+<p>boost::signalN &#8212; 可安全地进行一对多回调的一组类型。</p>

 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2>
@@ -97,12 +97,12 @@
<a class="link" href="signalN.html" title="Class template signalN">signalN</a> will be described, where N
          represents the number of function parameters.</p>

-<p>��ģ�� <a class="link" href="signalN.html" title="Class template signalN">signalN</a>
-         ���������ص��ࣺsignal0��signal1��signal2���ȵȣ�
-         ���е����ֺ�׺��ʾ�źż�������ӵIJ�۽��ܵĺ������ĸ���
-         ���ﲻ���о����е��࣬��������һ��һ��ģʽ
- <a class="link" href="signalN.html" title="Class template signalN">signalN</a>��
-         ���� N ����˺������ĸ���</p>
+<p>类模板 <a class="link" href="signalN.html" title="Class template signalN">signalN</a>
+         包括几个相关的类:signal0、signal1、signal2,等等,
+         其中的数字后缀表示信号及其所连接的插槽接受的函数参数的个数。
+         这里不是列举所有的类,而是描述一个单一的模式
+ <a class="link" href="signalN.html" title="Class template signalN">signalN</a>,
+         其中 N 代表了函数参数的个数。</p>

 <div class="refsect2" lang="en">
 <a name="id1280510"></a><h3>
@@ -132,13 +132,13 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>��ʼ���źţ��޲�ۣ�
-���Ʋ��ڲ���������ĺϲ������������ı���ȽϺ�������Ա�Ƚϱ��顣
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>初始化信号,无插槽,
+复制并内部保存输入的合并器,并保存输入的编组比较函数对象,以便比较编组。
 </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���������</span></p></td>
+<td nowrap><p><span class="term">后验条件:</span></p></td>
<td><code class="computeroutput">this-&gt;<a class="link" href="signalN.html#id231169-bb">empty</a>()</code></td>
 </tr>
 </tbody>
@@ -159,8 +159,8 @@
 <div class="variablelist"><table border="0">
 <col align="left" valign="top">
 <tbody><tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>�Ͽ�������ӵ� <code class="computeroutput">*this</code> �IJ�ۡ�</td>
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>断开所有连接到 <code class="computeroutput">*this</code> 的插槽。</td>
 </tr></tbody>
 </table></div>

@@ -231,42 +231,42 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>����ź� this ��������IJ�ۣ�
-          ������Ƿǻ�ģ�����۰󶨵��κοɸ��ٶ����ѱ���٣�
-          ��ô����ӵĵ��ý��Ǹ�ղ���
-          �����õ�2��汾��
-          <code class="computeroutput">connect</code>��
-          ��۽����ı���������
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>连接信号 this 到传进来的插槽.
+          如果插槽是非活动的,即插槽绑定的任何可跟踪对象已被销毁,
+          那么对连接的调用将是个空操作。
+          如果调用第2个版本的
+          <code class="computeroutput">connect</code>,
+          插槽将与给定的编组相关联。
           <code class="computeroutput">at</code>
-          ����ָ���˲������ӵ�λ�ã�
+          参数指定了插槽所连接的位置:
           <code class="computeroutput">at_front</code>
-          ��ʾ��۽���ӵ����������ͷ����
-          �� <code class="computeroutput">at_back</code>
-          ��ʾ��۽���ӵ����������β����</td>
+          表示插槽将连接到链表或插槽组的头部,
+          而 <code class="computeroutput">at_back</code>
+          表示插槽将连接到链表或插槽组的尾部。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���أ�</span></p></td>
-<td><code class="computeroutput"><a class="link" href="signals/connection.html" title="Class connection">signals::connection</a></code> ����
-          ���źźͲ��֮���½�����ӣ�
-          ������Ƿǻ�ģ��򷵻��ѶϿ�����ӡ�
+<td nowrap><p><span class="term">返回:</span></p></td>
+<td><code class="computeroutput"><a class="link" href="signals/connection.html" title="Class connection">signals::connection</a></code> 对象,
+          即信号和插槽之间新建的连接;
+          如果插槽是非活动的,则返回已断开的连接。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>�ú�����ǿ�쳣��֤���κ��쳣�������¸ò�۲�����ӵ��źš�
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>该函数符合强异常保证,任何异常都将导致该插槽不会连接到信号。
 </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���Ӷȣ�</span></p></td>
+<td nowrap><p><span class="term">复杂度:</span></p></td>
 <td>
-          ��û������ʱ���������dz���ʱ��ģ�
-          ����ӵ��ض�����ʱ����������ɶ����ϵ��
+          当没有组名时,插槽连接是常数时间的,
+          当连接到特定编组时,与编组个数成对数关系。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">ע�⣺</span></p></td>
-<td>���ź����ڵ���ʱ��Ӳ�ۣ��Ƿ�ᵼ�¸ò�۱�������ã���һ�㲢δ�涨��
+<td nowrap><p><span class="term">注意:</span></p></td>
+<td>当信号正在调用时连接插槽,是否会导致该插槽被立即调用?这一点并未规定。
           </td>
 </tr>
 </tbody>
@@ -308,24 +308,24 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>������Ϊ�����ת��Ϊ��һ������
-          ��ñ����е��κβ�۶������Ͽ���
-          ��������������ȵ��κβ�۶������Ͽ���
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>如果参数为(或可转换为)一个组名,
+          则该编组中的任何插槽都将被断开。
+          否则,与输入插槽相等的任何插槽都将被断开。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>�����쳣������û�����������������
-          <code class="computeroutput">==</code> ���쳣��
-          �������֮һ���쳣��
-          ����ܲ������в�۶����Ͽ���</td>
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>不抛异常,除非用户的析构函数或相等运算符
+          <code class="computeroutput">==</code> 抛异常。
+          如果其中之一抛异常,
+          则可能不是所有插槽都被断开。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���Ӷȣ�</span></p></td>
-<td>����������һ����飬���� O(lg g) + k������
-          g ���ź��б���ĸ���k �Ǹ����в�۵ĸ���
-          �������ź���ӵIJ�۸�������Թ�ϵ��
+<td nowrap><p><span class="term">复杂度:</span></p></td>
+<td>如果输入的是一个编组,则是 O(lg g) + k,其中
+          g 是信号中编组的个数,k 是该组中插槽的个数。
+          否则与信号连接的插槽个数成线性关系。
           </td>
 </tr>
 </tbody>
@@ -369,27 +369,27 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>�Ͽ�������ӵ��źŵIJ�ۡ�</td>
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>断开所有连接到信号的插槽。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���������</span></p></td>
+<td nowrap><p><span class="term">后验条件:</span></p></td>
 <td>
<code class="computeroutput">this-&gt;<a class="link" href="signalN.html#id231169-bb">empty</a>()</code>.</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>���Ͽ���۵����׳��쳣������ܲ������в�۶����Ͽ���
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>如果断开插槽导致抛出异常,则可能并非所有插槽都被断开。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���Ӷȣ�</span></p></td>
-<td>���ź���֪�IJ�۸�������Թ�ϵ��
+<td nowrap><p><span class="term">复杂度:</span></p></td>
+<td>与信号所知的插槽个数成线性关系。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">ע�⣺</span></p></td>
-<td>�������ź������ڵ�����ʱ�̵��ã�����ڵ����źŵIJ��ʱ��
+<td nowrap><p><span class="term">注意:</span></p></td>
+<td>可以在信号生命期的任意时刻调用,包括在调用信号的插槽时。
           </td>
 </tr>
 </tbody>
@@ -433,24 +433,24 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">���أ�</span></p></td>
-<td>���û�в����ӵ��źţ����� <code class="computeroutput">true</code>��
-          ����Ϊ <code class="computeroutput">false</code>��</td>
+<td nowrap><p><span class="term">返回:</span></p></td>
+<td>如果没有插槽连接到信号,返回 <code class="computeroutput">true</code>,
+          否则为 <code class="computeroutput">false</code>。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>�ޡ�</td>
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>无。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���Ӷȣ�</span></p></td>
-<td>���ź���֪�IJ�۸�������Թ�ϵ��
+<td nowrap><p><span class="term">复杂度:</span></p></td>
+<td>与信号所知的插槽个数成线性关系。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">ԭ��</span></p></td>
-<td>��ۿ�������ʱ�̶Ͽ���
-          �������Щ��ͬ�IJ�����ڱ�����ʱ��
-          ��˿���ʵ�ֱ��������ѶϿ�����������Ƿ��в����������С�
+<td nowrap><p><span class="term">原理:</span></p></td>
+<td>插槽可在任意时刻断开,
+          包括当那些相同的插槽正在被调用时。
+          因此可能实现必须搜索已断开插槽链表来决定是否还有插槽仍在连接中。
           </td>
 </tr>
 </tbody>
@@ -491,23 +491,23 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">���أ�</span></p></td>
-<td>��ӵ��źŵIJ�۸���</td>
+<td nowrap><p><span class="term">返回:</span></p></td>
+<td>连接到信号的插槽个数</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>�ޡ�</td>
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>无。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���Ӷȣ�</span></p></td>
-<td>���ź���֪�IJ�۸�������Թ�ϵ��
+<td nowrap><p><span class="term">复杂度:</span></p></td>
+<td>与信号所知的插槽个数成线性关系。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">ԭ��</span></p></td>
-<td>��ۿ�������ʱ�̶Ͽ���
-          �������Щ��ͬ�IJ�����ڱ�����ʱ��
-          ��˿���ʵ�ֱ��������ѶϿ�����������ж��ٲ����������С�
+<td nowrap><p><span class="term">原理:</span></p></td>
+<td>插槽可在任意时刻断开,
+          包括当那些相同的插槽正在被调用时。
+          因此可能实现必须搜索已断开插槽链表来决定有多少插槽仍在连接中。
           </td>
 </tr>
 </tbody>
@@ -578,47 +578,47 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">��</span></p></td>
-<td>��һ�� <code class="computeroutput">slot_call_iterator</code> ���
-          [first, last) ���úϲ���
-          ������Ӧ��һϵ����ӵ��ź�
+<td nowrap><p><span class="term">效果:</span></p></td>
+<td>用一个 <code class="computeroutput">slot_call_iterator</code> 区间
+          [first, last) 调用合并器,
+          该区间对应于一系列连接到信号
           <code class="computeroutput">*this</code>
-          �IJ�۵��á�
+          的插槽调用。

-          �����ø�����ڵĵ����ᵼ�²�۵��ã�
-          ���ò���Ϊ����IJ���
+          解引用该区间内的迭代器会导致插槽调用,
+          调用参数为输入的参数
           <code class="computeroutput">(a1, a2, ...,
-          aN)</code>��������Ϊ�����Ľ����������ķ���ֵ��
+          aN)</code>,其结果将作为迭代器的解引用运算符的返回值。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���أ�</span></p></td>
-<td>�ϲ���صĽ��</td>
+<td nowrap><p><span class="term">返回:</span></p></td>
+<td>合并器返回的结果。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>����в�۵������쳣�����ߺϲ�����ijЩ���֮��Ͳ��ٽ������κβ�ۣ�
-          ���ڲ�����Ӳ������У��ò��֮������в�۽����ᱻ���á�
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>如果有插槽调用抛异常,或者合并器在某些插槽之后就不再解引用任何插槽,
+          则内部已连接插槽链表中,该插槽之后的所有插槽将不会被调用。
           </td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">ע�⣺</span></p></td>
+<td nowrap><p><span class="term">注意:</span></p></td>
 <td>
-<p>����ʵ�ʽ����õĵ���������IJ�۲Żᱻ���á�
-          ͬһ������Ķ�ν����ò��ᵼ�¶�β�۵��ã�
-          ��Ϊ��۵ķ���ֵ�ᱻ���档
+<p>仅有实际解引用的迭代器所关联的插槽才会被调用。
+          同一个迭代器的多次解引用不会导致多次插槽调用,
+          因为插槽的返回值会被缓存。
           </p>
-<p>������������� <code class="computeroutput">const</code>
-          �潫�� <code class="computeroutput">const</code>
-          ���úϲ���
-          ���<code class="computeroutput">const</code>
-          �潫����<code class="computeroutput">const</code>
-          ���úϲ���</p>
-<p>���û�в����ӵ��źţ�ȡ�������õĺϲ���
-          ���ú����������������δ������Ϊ��
+<p>函数调用运算符的 <code class="computeroutput">const</code>
+          版将按 <code class="computeroutput">const</code>
+          调用合并器,
+          而非<code class="computeroutput">const</code>
+          版将按非<code class="computeroutput">const</code>
+          调用合并器。</p>
+<p>如果没有插槽连接到信号,取决于所用的合并器,
+          调用函数调用运算符可引起未定义行为。

-          Ĭ�ϵĺϲ����䷵��ֵΪvoidʱ�����������Ƕ������Ƶģ�
-          ������ֵ����������ʱ��δ���壨��Ϊû���ϳ�һ���ֵ����
+          默认的合并器当其返回值为void时,对于零插槽是定义完善的,
+          但返回值是其他类型时则未定义(因为没法合成一个返回值)。
           </p>
 </td>
 </tr>
@@ -652,12 +652,12 @@
 <col align="left" valign="top">
 <tbody>
 <tr>
-<td nowrap><p><span class="term">���أ�</span></p></td>
-<td>���ϲ�������á�</td>
+<td nowrap><p><span class="term">返回:</span></p></td>
+<td>所保存合并器的引用。</td>
 </tr>
 <tr>
-<td nowrap><p><span class="term">���쳣��</span></p></td>
-<td>�ޡ�</td>
+<td nowrap><p><span class="term">抛异常:</span></p></td>
+<td>无。</td>
 </tr>
 </tbody>
 </table></div>
@@ -670,8 +670,8 @@
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &copy; 2001-2004 Douglas Gregor

-      <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-      <p>���ĸ��£�2008.7.8</p>
+      <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+      <p>译文更新:2008.7.8</p>

 <p>Use, modification and distribution is subject to the Boost
     Software License, Version 1.0. (See accompanying file

Modified: trunk/doc/html/boost/signals/connection.html
==============================================================================
--- trunk/doc/html/boost/signals/connection.html        (original)
+++ trunk/doc/html/boost/signals/connection.html        Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Class connection</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -28,7 +28,7 @@
 <h2><span class="refentrytitle">Class connection</span></h2>
<p>boost::signals::connection &#8212; Query/disconnect a signal-slot connection.</p>

-<p>boost::signals::connection &#8212; ��ѯ/�Ͽ��ź�-�����ӡ�</p>
+<p>boost::signals::connection &#8212; 查询/断开信号-插槽连接。</p>

 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2>
@@ -69,11 +69,11 @@
           disconnect a connection.</p>

<p><a class="link" href="connection.html" title="Class connection">connection</a>
-          �����ź�����֮�����ӡ�
+          类代表信号与插槽之间的连接。

-          ���Ǹ�������������ܹ���ѯ�ź����۵�ǰ�Ƿ�����У�
-          ���ɶϿ��ź����ۡ�
-          ��ѯ��Ͽ�һ��������ǰ�ȫ�ġ�
+          它是个轻量级对象,它能够查询信号与插槽当前是否连接中,
+          并可断开信号与插槽。
+          查询或断开一个连接总是安全的。
           </p>

 <div class="refsect2" lang="en">
@@ -92,7 +92,7 @@
 <td><p>Sets the currently represented connection to the
           NULL connection.</p>

-<p>����ǰ���������Ϊ����ӡ�
+<p>将当前代表的连接设为空连接。
           </p>

           </td>
@@ -120,9 +120,9 @@
           <code class="computeroutput">other</code>.</p>

 <p><code class="computeroutput">this</code>
-          ��������
+          将引用由
           <code class="computeroutput">other</code>
-          �����õ���ӡ�</p>
+          所引用的连接。</p>

           </td>
 </tr>
@@ -145,9 +145,9 @@
           <code class="computeroutput">other</code>.</p>

 <p><code class="computeroutput">this</code>
-          ������
+          将引用
           <code class="computeroutput">other</code>
-          �����õ���ӡ�</p>
+          所引用的连接。</p>

           </td>
 </tr>
@@ -176,10 +176,10 @@
              disconnects the signal and slot referenced by this;
              otherwise, this operation is a no-op.</p>

-<p>���
- <code class="computeroutput">this-&gt;<a class="link" href="connection.html#id722201-bb">connected</a>()</code>��
-             ��Ͽ� this �����õ��ź����ۣ�
-             ����ò���Ϊ�ղ���</p>
+<p>如果
+ <code class="computeroutput">this-&gt;<a class="link" href="connection.html#id722201-bb">connected</a>()</code>,
+             则断开 this 所引用的信号与插槽;
+             否则该操作为空操作。</p>

              </td>
 </tr>
@@ -203,9 +203,9 @@
             otherwise.</p>

 <p>
-            ��� this ���������ڻ����ӣ��ķǿ���ӣ���Ϊ
-            <code class="computeroutput">true</code>��
-            ����Ϊ <code class="computeroutput">false</code>��
+            如果 this 引用了仍在活动(连接)的非空连接,则为
+            <code class="computeroutput">true</code>,
+            否则为 <code class="computeroutput">false</code>。
             </p>

             </td>
@@ -274,9 +274,9 @@
<code class="computeroutput">true</code> if the associated slot is either disconnected or blocked, <code class="computeroutput">false</code> otherwise.

 <p>
-�����صIJ���ѶϿ���������Ϊ
-<code class="computeroutput">true</code>��
-����Ϊ <code class="computeroutput">false</code>��
+如果相关的插槽已断开或被阻塞,则为
+<code class="computeroutput">true</code>,
+否则为 <code class="computeroutput">false</code>。
 </p>

 </td>
@@ -304,10 +304,10 @@
             <code class="computeroutput">this</code> and
             <code class="computeroutput">other</code>.</p>

-<p>����
-            <code class="computeroutput">this</code> ��
+<p>交换
+            <code class="computeroutput">this</code> 和
             <code class="computeroutput">other</code>
-            �����õ���ӡ�
+            所引用的连接。
             </p>

             </td>
@@ -339,13 +339,13 @@
             otherwise.</p>

 <p>
-            ���
-            <code class="computeroutput">this</code> ��
+            如果
+            <code class="computeroutput">this</code> 和
             <code class="computeroutput">other</code>
-            ��������ͬ����ӻ������˿���ӣ���Ϊ
-            <code class="computeroutput">true</code>��
-            ����Ϊ
-            <code class="computeroutput">false</code>��
+            引用了相同的连接或都引用了空连接,则为
+            <code class="computeroutput">true</code>,
+            否则为
+            <code class="computeroutput">false</code>。
             </p>

             </td>
@@ -374,14 +374,14 @@
             otherwise.</p>

 <p>
-            ������ij��δ�������򷨣�
+            如果基于某种未定的排序法,
             <code class="computeroutput">this</code>
-            ���õ������
+            引用的连接在
             <code class="computeroutput">other</code>
-            ���õ����֮ǰ����Ϊ
-            <code class="computeroutput">true</code>��
-            ����Ϊ
-            <code class="computeroutput">false</code>��
+            引用的连接之前,则为
+            <code class="computeroutput">true</code>,
+            否则为
+            <code class="computeroutput">false</code>。
             </p>

             </td>
@@ -421,8 +421,8 @@
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &copy; 2001-2004 Douglas Gregor

-    <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-    <p>���ĸ��£�2008.7.8</p>
+    <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+    <p>译文更新:2008.7.8</p>

     <p>Use, modification and distribution is subject to the Boost
     Software License, Version 1.0. (See accompanying file

Modified: trunk/doc/html/boost/signals/scoped_connection.html
==============================================================================
--- trunk/doc/html/boost/signals/scoped_connection.html (original)
+++ trunk/doc/html/boost/signals/scoped_connection.html Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Class scoped_connection</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Class scoped_connection</title>

 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -31,9 +31,9 @@
 <div class="refnamediv">
 <h2><span class="refentrytitle">Class
 scoped_connection</span></h2>
-<p>boost::signals::scoped_connection �� Limits a signal-slot
+<p>boost::signals::scoped_connection — Limits a signal-slot
 connection lifetime to a particular scope.</p>
-<p>boost::signals::scoped_connection �� ���ź�-��۵��������������ض��������ڡ�</p>
+<p>boost::signals::scoped_connection — 将信号-插槽的生命期限制在特定作用域 内。</p>
 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv">
@@ -62,8 +62,8 @@
 <p><code class="computeroutput">this</code>
references the connection referenced by <code class="computeroutput">other</code>.</p>
 <p><code class="computeroutput">this</code>
-������ <code class="computeroutput">other</code>
-�����õ���ӡ�</p>
+将引用 <code class="computeroutput">other</code>
+所引用的连接。</p>
 </td>
 </tr>
 <tr>
@@ -91,8 +91,8 @@
 <td>
<p>If <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>,
 disconnects the signal-slot connection.</p>
-<p>��� <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>��
-��Ͽ����ź�-�����ӡ�</p>
+<p>如果 <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>,
+则断开该信号-插槽连接。</p>
 </td>
 </tr>
 </tbody>
@@ -122,8 +122,8 @@
<p>If <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>,
 disconnects the signal and slot referenced by this; otherwise, this
 operation is a no-op.</p>
-<p>��� <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>��
-��Ͽ� this �����õ��źŲ�ۣ� ����ò���Ϊ�ղ���</p>
+<p>如果 <code class="computeroutput">this-&gt;<a class="link" href="scoped_connection.html#id427816-bb">connected</a>()</code>,
+则断开 this 所引用的信号插槽; 否则该操作为空操作。</p>
 </td>
 </tr>
 <tr>
@@ -153,7 +153,7 @@
 if this references a non-NULL connection that is still active
 (connected), and <code class="computeroutput">false</code>
 otherwise.</p>
-<p> ��� this ���õ������ڻ����ӣ��ķǿ���ӣ���Ϊ <code class="computeroutput">true</code>�� ����Ϊ <code class="computeroutput">false</code>�� </p> +<p> 如果 this 引用的是仍在活动(连接)的非空连接,则为 <code class="computeroutput">true</code>, 否则为 <code class="computeroutput">false</code>。 </p>
 </td>
 </tr>
 <tr>
@@ -180,8 +180,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.8</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.8</p>
 <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>
 </div>

Modified: trunk/doc/html/boost/signals/trackable.html
==============================================================================
--- trunk/doc/html/boost/signals/trackable.html (original)
+++ trunk/doc/html/boost/signals/trackable.html Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Class trackable</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Class trackable</title>

 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -30,9 +30,9 @@
 <div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Class trackable</span></h2>
-<p>boost::signals::trackable �� Enables safe use of multicast
+<p>boost::signals::trackable — Enables safe use of multicast
 callbacks.</p>
-<p>boost::signals::trackable �� �����ܹ���ȫ��ʹ��һ�Զ�Ļص�</p>
+<p>boost::signals::trackable — 让你能够安全地使用一对多的回调。</p>
 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv">
@@ -50,16 +50,16 @@
 object tracks the set of signal-slot connections it is a part of is
 unspecified.</p>
 <p><code class="computeroutput">trackable</code>
-���ṩ���ǣ� ����ͨ��ָ������ã����ڲ���еĶ������ʱ�� �Զ��Ͽ��źźͲ�ۡ� <code class="computeroutput">trackable</code> -����Խ�����ijЩ������Ĺ��л��ࣻ ��������ʱ���Ǹ���Ϳ��԰󶨵������۵ĺ������ <code class="computeroutput">trackable</code>
-���������������ź�-�����ӵķ�ʽ��δ�涨�� </p>
+类提供的是, 当(通过指针或引用)绑定在插槽中的对象销毁时, 自动断开信号和 插槽。 <code class="computeroutput">trackable</code> +类可以仅用作某些其他类的公有基类; 当这样用时,那个类就可以绑定到用作插槽的 函数对象。 <code class="computeroutput">trackable</code>
+对象跟踪其所属的信号-插槽连接的方式并未规定。 </p>
 <p>The actual use of <code class="computeroutput">trackable</code>
is contingent on the presence of appropriate <a class="link" href="../visit_each.html" title="Function template visit_each">visit_each</a>
 overloads for any type that may contain pointers or references to
 trackable objects.</p>
 <p><code class="computeroutput">trackable</code>
-��ʵ��ʹ��Ҫ���Ƿ��ṩ���ʵ��� <a class="link" href="../visit_each.html" title="Function template visit_each">visit_each</a>
-���أ��Ƿ�Ϊ������ܰ�ɸ��ٶ����ָ������õ������ṩ�����ء� </p>
+的实际使用要看是否提供了适当的 <a class="link" href="../visit_each.html" title="Function template visit_each">visit_each</a>
+重载,是否为任意可能包含可跟踪对象的指针或引用的类型提供了重载。 </p>
 <div class="refsect2" lang="en">
 <a name="id1282043"></a>
<h3><a name="boost.signals.trackableconstruct-copy-destruct"></a><code class="computeroutput">trackable</code> public
@@ -97,18 +97,18 @@
 <tbody>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">��</span></p>
+<p><span class="term">效果:</span></p>
 </td>
 <td>
-<p>������Ӳ�������Ϊ�ա�</p>
+<p>将已连接插槽链表设为空。</p>
 </td>
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">���쳣��</span></p>
+<p><span class="term">抛异常:</span></p>
 </td>
 <td>
-<p>�ޡ�</p>
+<p>无。</p>
 </td>
 </tr>
 </tbody>
@@ -156,27 +156,27 @@
 <tbody>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">��</span></p>
+<p><span class="term">效果:</span></p>
 </td>
 <td>
-<p>������Ӳ�������Ϊ�ա�</p>
+<p>将已连接插槽链表设为空。</p>
 </td>
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">���쳣��</span></p>
+<p><span class="term">抛异常:</span></p>
 </td>
 <td>
-<p>�ޡ�</p>
+<p>无。</p>
 </td>
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">ԭ��</span></p>
+<p><span class="term">原理:</span></p>
 </td>
 <td>
-<p>�ź�-������ֻ��ͨ�����һ����ʽ����ӷ������ܴ�����
-����˲����ڴ˵��ɸ��ٶ�����ʱ������
+<p>信号-插槽连接只能通过调用一个显式的连接方法才能创建,
+并因此不能在此当可跟踪对象复制时创建。
 </p>
 </td>
 </tr>
@@ -233,15 +233,15 @@
 <tbody>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">��</span></p>
+<p><span class="term">效果:</span></p>
 </td>
 <td>
-<p>������Ӳ�������Ϊ�ա�</p>
+<p>将已连接插槽链表设为空。</p>
 </td>
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">���أ�</span></p>
+<p><span class="term">返回:</span></p>
 </td>
 <td>
 <p><code class="computeroutput">*this</code></p>
@@ -249,19 +249,19 @@
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">���쳣��</span></p>
+<p><span class="term">抛异常:</span></p>
 </td>
 <td>
-<p>�ޡ�</p>
+<p>无。</p>
 </td>
 </tr>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">ԭ��</span></p>
+<p><span class="term">原理:</span></p>
 </td>
 <td>
-<p>�ź�-������ֻ��ͨ��һ����ʽ����ӷ���������
-����˲����ڴ�ʱ��������ٶ�����ʱ������</p>
+<p>信号-插槽连接只能通过一个显式的连接方法创建,
+并因此不能在此时,当或跟踪对象复制时创建。</p>
 </td>
 </tr>
 </tbody>
@@ -292,11 +292,11 @@
 <tbody>
 <tr>
 <td nowrap="nowrap">
-<p><span class="term">��</span></p>
+<p><span class="term">效果:</span></p>
 </td>
 <td>
-<p>�Ͽ����е��ź�/�����ӣ� ֻҪ������ɸ��ٶ����ָ������ã� ��ÿɸ��ٶ���ɱ� <a class="link" href="../visit_each.html" title="Function template visit_each">visit_each</a>
-�ҵ��� </p>
+<p>断开所有的信号/插槽连接, 只要它包含这个可跟踪对象的指针或引用, 而该可 跟踪对象可被 <a class="link" href="../visit_each.html" title="Function template visit_each">visit_each</a>
+找到。 </p>
 </td>
 </tr>
 </tbody>
@@ -315,8 +315,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.10</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.10</p>
 <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>
 </div>

Modified: trunk/doc/html/boost/slot.html
==============================================================================
--- trunk/doc/html/boost/slot.html      (original)
+++ trunk/doc/html/boost/slot.html      Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Class template slot</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Class template slot</title>

 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -30,8 +30,8 @@
 <div class="titlepage"></div>
 <div class="refnamediv">
 <h2><span class="refentrytitle">Class template slot</span></h2>
-<p>boost::slot �� Pass slots as function arguments.</p>
-<p>boost::slot �� ���������ݲ�ۡ�</p>
+<p>boost::slot — Pass slots as function arguments.</p>
+<p>boost::slot — 按函数参数传递插槽。</p>
 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv">
@@ -64,12 +64,12 @@
 to contain the incoming slot <code class="computeroutput">target</code>,
which may be any function object with which a <code class="computeroutput">SlotFunction</code> can be
 constructed.</p>
-<p>���ã�δ�޶��ģ� <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code> -����� <code class="computeroutput">target</code> �� <code class="computeroutput"><a class="link" href="signals/trackable.html" title="Class trackable">signals::trackable</a></code>
-�����ָ������á�</p>
-<p>��ʼ�� <code class="computeroutput">this</code>��
-ʹ֮����IJ�� <code class="computeroutput">target</code>��
-��ۿ��������⺯����� ֻҪ������������ <code class="computeroutput">SlotFunction</code>�� +<p>调用(未限定的) <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code> +来发现 <code class="computeroutput">target</code> 中 <code class="computeroutput"><a class="link" href="signals/trackable.html" title="Class trackable">signals::trackable</a></code>
+对象的指针和引用。</p>
+<p>初始化 <code class="computeroutput">this</code>,
+使之包含传入的插槽 <code class="computeroutput">target</code>,
+插槽可以是任意函数对象, 只要它可以用来构造 <code class="computeroutput">SlotFunction</code>。
 </p>
 </td>
 </tr>
@@ -89,8 +89,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.8</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.8</p>
 <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>
 </div>

Modified: trunk/doc/html/boost/visit_each.html
==============================================================================
--- trunk/doc/html/boost/visit_each.html        (original)
+++ trunk/doc/html/boost/visit_each.html        Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Function template visit_each</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function template visit_each</title>

 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -31,8 +31,8 @@
 <div class="refnamediv">
 <h2><span class="refentrytitle">Function template
 visit_each</span></h2>
-<p>boost::visit_each �� Allow limited exploration of class members.</p>
-<p>boost::visit_each �� ��������Ա�������޵�̽�⡣</p>
+<p>boost::visit_each — Allow limited exploration of class members.</p>
+<p>boost::visit_each — 允许对类成员进行有限的探测。</p>
 </div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; class="refsynopsisdiv">
@@ -49,10 +49,10 @@
framework, a <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code>
 overload must be supplied for each object type. </p>
<p><code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code> -��������Ը����������Ӷ���Ӧ��һ��۲��ߣ�visitor���� �źſ������ֺ�������е� <code class="computeroutput"><a class="link" href="signals/trackable.html" title="Class trackable">signals::trackable</a></code> -���󣬵�������ձ�ʹ�ã����ܻ��������ʹ�÷��������籣������ռ����� Ϊ����� <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code> -��ܣ� ����Ϊÿ����������ṩ <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code>
-���ء�</p>
+机制允许对给定对象的所有子对象应用一个观察者(visitor)。 信号库用它发现函 数对象中的 <code class="computeroutput"><a class="link" href="signals/trackable.html" title="Class trackable">signals::trackable</a></code> +对象,但是如果普遍使用,可能会出现其他使用方法(例如保守垃圾收集)。 为了配 合 <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code> +框架, 必须为每个对象类型提供 <code class="computeroutput"><a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a></code>
+重载。</p>
 <div class="variablelist">
 <table border="0">
 <col align="left" valign="top">
@@ -65,8 +65,8 @@
 <p><code class="computeroutput">visitor(t)</code>,
 and for every subobject <code class="computeroutput">x</code>
 of <code class="computeroutput">t</code>: </p>
-<p><code class="computeroutput">visitor(t)</code>��
-���Ҷ� <code class="computeroutput">t</code> ��ÿ���Ӷ��� <code class="computeroutput">x</code>�� </p>
+<p><code class="computeroutput">visitor(t)</code>,
+并且对 <code class="computeroutput">t</code> 的每个子对象 <code class="computeroutput">x</code>: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -74,8 +74,8 @@
 is a reference, <code class="computeroutput">visit_each(visitor,
<a class="link" href="reference_wrapper.html#boost.ref_id281731">ref</a>(x),
 0)</code></p>
-<p>��� <code class="computeroutput">x</code>
-�Ǹ����ã�
+<p>如果 <code class="computeroutput">x</code>
+是个引用,
 <code class="computeroutput">visit_each(visitor,
<a class="link" href="reference_wrapper.html#boost.ref_id281731">ref</a>(x),
 0)</code></p>
@@ -83,7 +83,7 @@
 <li>
 <p>Otherwise, <code class="computeroutput">visit_each(visitor,
 x, 0)</code></p>
-<p>����<code class="computeroutput">visit_each(visitor,
+<p>否则,<code class="computeroutput">visit_each(visitor,
 x, 0)</code></p>
 </li>
 </ul>
@@ -106,12 +106,12 @@
 subobjects can be visited.</p>
 <p>Calls to visit_each are required to be unqualified, to
 enable argument-dependent lookup.</p>
-<p> ���� <a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a>
-�ĺ󱸰汾������������ <code class="computeroutput">long</code>��
-���Ҹò������Ϊ 0�� ������������Ϊ�ձ�ȱ����ȷ�ĺ���ģ��������Ϊ���õģ� ����δ���ɾ�� </p>
-<p>������߽�����Ӷ�������أ�Ϊ���ǵ����ػ����� T�� ʹ���Ӷ�����Ա����ʡ� </p>
-<p>�� visit_each �ĵ���Ҫ���Ƿ��޶��ģ��Կ��������صIJ��� ��argument-dependent
-lookup����</p>
+<p> 对于 <a class="link" href="visit_each.html" title="Function template visit_each">visit_each</a>
+的后备版本,第三个参数是 <code class="computeroutput">long</code>,
+并且该参数必须为 0。 第三个参数是因为普遍缺乏正确的函数模板次序而人为设置 的, 它将在未来被删除。 </p> +<p>库的作者将会添加额外的重载,为他们的类特化参数 T, 使其子对象可以被访 问。 </p> +<p>对 visit_each 的调用要求是非限定的,以开启参数相关的查找 (argument-dependent
+lookup)。</p>
 </td>
 </tr>
 </tbody>
@@ -126,8 +126,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.8</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.8</p>
 <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>
 </div>

Modified: trunk/doc/html/signals.html
==============================================================================
--- trunk/doc/html/signals.html (original)
+++ trunk/doc/html/signals.html Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Chapter 16. Boost.Signals</title><link rel="stylesheet" href="boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -81,47 +81,47 @@
 </div>

 <div class="toc">
-<p><b>Ŀ¼</b></p>
+<p><b>目录</b></p>
 <dl>
-<dt><span class="section"><a href="signals.html#id1276866">����</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html">�̳�</a></span></dt> +<dt><span class="section"><a href="signals.html#id1276866">介绍 </a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html">教程 </a></span></dt>
 <dd><dl>
-<dt><span class="section"><a href="signals/tutorial.html#id1276917">����Ķ���̳�</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1276980">�Լ����Ե�ע��</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1277113">Hello, World! �����</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1277267">���ö����</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1277683">��ֵ����ۼ��ش�</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1278652">��ӹ���</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1279460">���ӣ��ĵ�-��ͼ</a></span></dt> -<dt><span class="section"><a href="signals/tutorial.html#id1279626">����źſ�</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="signals/reference.html">�ο�</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="signals/reference.html#header.boost.signal.hpp">ͷ�ļ� &lt;boost/signal.hpp&gt;</a></span></dt> -<dt><span class="section"><a href="signals/reference.html#header.boost.signals.slot.hpp">ͷ�ļ� &lt;boost/signals/slot.hpp&gt;</a></span></dt> -<dt><span class="section"><a href="signals/reference.html#header.boost.signals.trackable.hpp">ͷ�ļ� &lt;boost/signals/trackable.hpp&gt;</a></span></dt> -<dt><span class="section"><a href="signals/reference.html#header.boost.signals.connection.hpp">ͷ�ļ� &lt;boost/signals/connection.hpp&gt;</a></span></dt> -<dt><span class="section"><a href="signals/reference.html#header.boost.visit_each.hpp">ͷ�ļ� &lt;boost/visit_each.hpp&gt;</a></span></dt> -<dt><span class="section"><a href="signals/reference.html#header.boost.last_value.hpp">ͷ�ļ� &lt;boost/last_value.hpp&gt;</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="signals/s04.html">��Ƹ���</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="signals/s04.html#id1285230">����ɾ��</a></span></dt> -<dt><span class="section"><a href="signals/s04.html#id1285305"><code class="computeroutput">connection</code> ��</a></span></dt> -<dt><span class="section"><a href="signals/s04.html#id1285438">��۵��õ����</a></span></dt> -<dt><span class="section"><a href="signals/s04.html#id1285660"><code class="computeroutput">visit_each</code> ����ģ��</a></span></dt>
-</dl></dd>
-<dt><span class="section"><a href="signals/s05.html">���ԭ��</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="signals/s05.html#id1285833">��۶����ѡ��</a></span></dt> -<dt><span class="section"><a href="signals/s05.html#id1285940">�û�����ӹ���</a></span></dt> -<dt><span class="section"><a href="signals/s05.html#id1286132">�ϲ���ӿ�</a></span></dt> -<dt><span class="section"><a href="signals/s05.html#id1286317">��ӵĽӿڣ�+= �����</a></span></dt> -<dt><span class="section"><a href="signals/s05.html#id1286512"><code class="computeroutput">trackable</code> ��ԭ��</a></span></dt> -<dt><span class="section"><a href="signals/s05.html#id1286716">�������ź�/���ʵ�ֵıȽ�</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1276917">如何阅 读本教程</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1276980">对兼容 性的注释</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1277113">Hello, World! (初级)</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1277267">调用多 个插槽</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1277683">传值到 插槽及回传</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1278652">连接管 理</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1279460">例 子:文档-视图</a></span></dt> +<dt><span class="section"><a href="signals/tutorial.html#id1279626">链接信 号库</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="signals/reference.html">参考 </a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="signals/reference.html#header.boost.signal.hpp">头文件 &lt;boost/signal.hpp&gt;</a></span></dt> +<dt><span class="section"><a href="signals/reference.html#header.boost.signals.slot.hpp">头文件 &lt;boost/signals/slot.hpp&gt;</a></span></dt> +<dt><span class="section"><a href="signals/reference.html#header.boost.signals.trackable.hpp">头文件 &lt;boost/signals/trackable.hpp&gt;</a></span></dt> +<dt><span class="section"><a href="signals/reference.html#header.boost.signals.connection.hpp">头文件 &lt;boost/signals/connection.hpp&gt;</a></span></dt> +<dt><span class="section"><a href="signals/reference.html#header.boost.visit_each.hpp">头文件 &lt;boost/visit_each.hpp&gt;</a></span></dt> +<dt><span class="section"><a href="signals/reference.html#header.boost.last_value.hpp">头文件 &lt;boost/last_value.hpp&gt;</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="signals/s04.html">设计概览 </a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="signals/s04.html#id1285230">类型删除 </a></span></dt> +<dt><span class="section"><a href="signals/s04.html#id1285305"><code class="computeroutput">connection</code> 类</a></span></dt> +<dt><span class="section"><a href="signals/s04.html#id1285438">插槽调用迭代 器</a></span></dt> +<dt><span class="section"><a href="signals/s04.html#id1285660"><code class="computeroutput">visit_each</code> 函数模板</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="signals/s05.html">设计原理 </a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="signals/s05.html#id1285833">插槽定义的选 择</a></span></dt> +<dt><span class="section"><a href="signals/s05.html#id1285940">用户层连接管 理</a></span></dt> +<dt><span class="section"><a href="signals/s05.html#id1286132">合并器接口 </a></span></dt> +<dt><span class="section"><a href="signals/s05.html#id1286317">连接的接 口:+= 运算符</a></span></dt> +<dt><span class="section"><a href="signals/s05.html#id1286512"><code class="computeroutput">trackable</code> 的原理</a></span></dt> +<dt><span class="section"><a href="signals/s05.html#id1286716">与其他信号 /插槽实现的比较</a></span></dt>
 </dl></dd>
-<dt><span class="section"><a href="signals/tests.html">�����׼�</a></span></dt> -<dd><dl><dt><span class="section"><a href="signals/tests.html#id1286870">���ղ���</a></span></dt></dl></dd> +<dt><span class="section"><a href="signals/tests.html">测试套件 </a></span></dt> +<dd><dl><dt><span class="section"><a href="signals/tests.html#id1286870">验 收测试</a></span></dt></dl></dd>
 </dl>
 </div>

@@ -136,13 +136,13 @@
 callback receivers (also called event targets or subscribers), which
 are called when the signal is "emitted."</p>

-<p>Boost.Signals ����һ��ɿص��źŲ�ۣ�signals and slots��ϵͳ��ʵ�֡�
-�źŴ���˾��ж��Ŀ��Ļص�
-�����Ƶ�ϵͳ��Ҳ��Ϊ�����ߣ�publisher�����¼���event����
-
-�ź���ij��������ӣ���ۼ��ص�Ľ�����
-��Ҳ��Ϊ�¼�Ŀ�꣬event target�������ߣ�subscriber����
-�������źš�����ʱ�����á�
+<p>Boost.Signals 库是一个可控的信号插槽(signals and slots)系统的实现。
+信号代表了具有多个目标的回调,
+在类似的系统中也称为发布者(publisher)或事件(event)。
+
+信号与某组插槽相连接,插槽即回调的接收者
+(也称为事件目标,event target,或订阅者,subscriber),
+它们在信号“发出”时被调用。
 </p>

 <p>Signals and slots are managed, in that signals and slots (or,
@@ -153,11 +153,11 @@
 lifetimes of those connections with regard to the lifetimes of all
 objects involved.</p>

-<p>�źźͲ���ǿɿصģ���Ϊ�źźͲ�ۣ����ϸ��˵����Ϊ��۳��ֵĶ���
-�������е���ӣ����ܹ����źŻ������ʱ�Զ��Ͽ��ź�/��۵���ӡ�
+<p>信号和插槽是可控的,因为信号和插槽(或严格地说是作为插槽出现的对象)
+跟踪所有的连接,并能够在信号或插槽销毁时自动断开信号/插槽的连接。

-����ʹ�����ܹ��ڽ���ź�/�����ӵ�ͬʱ��
-���ط���ظ����ض����������ȥ������Щ��ӵ������ڡ�
+这让使用者能够在建立信号/插槽连接的同时,
+不必费力地根据相关对象的生命期去管理那些连接的生命期。
 </p>

 <p>When signals are connected to multiple slots, there is a
@@ -166,9 +166,9 @@
 user to specify the manner in which multiple return values are
 combined.</p>

-<p>���ź���Ӷ����ʱ��
-���ڲ�۵ķ���ֵ���źŵķ���ֵ֮��Ĺ�ϵ�и����⡣
-Boost.Signals �����û�ָ���ϲ�����ֵ�ķ�ʽ��
+<p>当信号连接多个插槽时,
+关于插槽的返回值和信号的返回值之间的关系有个问题。
+Boost.Signals 允许用户指定合并多个返回值的方式。
 </p>

 </div>
@@ -180,12 +180,12 @@
 </tr>

 <tr>
-<td align="left"><p><small>���룺<a href="http://blog.csdn.net/jq0123";>����</a></small></p></td> +<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>���ĸ��£�2008.7.10</small></p></td>
+<td align="left"><p><small>译文更新:2008.7.10</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr>


Modified: trunk/doc/html/signals/s05.html
==============================================================================
--- trunk/doc/html/signals/s05.html     (original)
+++ trunk/doc/html/signals/s05.html     Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Design Overview</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design Overview</title>

 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -29,7 +29,7 @@
 <div>
<h2 class="title" style="clear: both;"><a name="id1285220"></a>Design Overview</h2>
 <h2 class="title" style="clear: both;">
-<a name="id1285220"></a>��Ƹ���</h2>
+<a name="id1285220"></a>设计概览</h2>
 </div>
 </div>
 </div>
@@ -45,12 +45,12 @@
 </div>
 <div class="toc">
 <dl>
-<dt><span class="section"><a href="s04.html#id1285230">����ɾ��</a></span></dt> +<dt><span class="section"><a href="s04.html#id1285230">类型删除 </a></span></dt> <dt><span class="section"><a href="s04.html#id1285305"><code class="computeroutput">connection</code>
-��</a></span></dt>
-<dt><span class="section"><a href="s04.html#id1285438">��۵��õ����</a></span></dt>
+类</a></span></dt>
+<dt><span class="section"><a href="s04.html#id1285438">插槽调用迭代器 </a></span></dt> <dt><span class="section"><a href="s04.html#id1285660"><code class="computeroutput">visit_each</code>
-����ģ��</a></span></dt>
+函数模板</a></span></dt>
 </dl>
 </div>
 <div class="section" lang="en">
@@ -60,7 +60,7 @@
 <h3 class="title"><a name="id1285230"></a>Type
 Erasure</h3>
 <h3 class="title">
-<a name="id1285230"></a>����ɾ��</h3>
+<a name="id1285230"></a>类型删除</h3>
 </div>
 </div>
 </div>
@@ -73,10 +73,10 @@
 instantiating this map for every token type, and perhaps within each
 translation unit (for some popular template instantiation strategies)
 increase compile time overhead and space overhead.</p>
-<p>������ɾ��type erasure������ͨ��̬���ɵĽӿ����̬������Ϣ�� ���� Boost.Signals -���й㷺ʹ�ã� �Լ���ģ��ʵ�������Ĵ������� ÿ���źű������һ���в�ۼ�����ص���ӣ� ����һ�� <code class="computeroutput">std::map</code>�� -�ӱ����ʶ��ӳ�䵽������ص���ӡ� Ȼ��Ϊÿ��������ʵ���ӳ�䣬 ���ҿ�����ÿ���뵥Ԫ�ж�Ҫʵ�� ����ΪijЩ���е�ģ��ʵ����ԣ���
-����˱����ʱ�俪��Ϳռ俪�� </p>
+<p>“类型删除(type erasure)”是通过动态分派的接口消除静态类型信息, 它在 Boost.Signals +库中广泛使用, 以减少模板实例化所产生的代码总数。 每个信号必须管理一序列插 槽及其相关的连接, 还有一个 <code class="computeroutput">std::map</code>, +从编组标识符映射到它们相关的连接。 然而,为每个标记类型实例化该映射, 并且 可能在每个翻译单元中都要实例化 (因为某些流行的模板实例化策略),
+增加了编译的时间开销和空间开销。 </p>
 <p> To combat this so-called "template bloat", we use
 Boost.Function and Boost.Any to store unknown types and operations.
 Then, all of the code for handling the list of slots and the mapping
@@ -88,10 +88,10 @@
 class templates deal only with code that will change depending on the
 number of arguments or which is inherently template-dependent (such as
 connection).</p>
-<p> Ϊ�˷�ֹ������ν�ġ�ģ�����͡��� ����ʹ���� Boost.Function �� Boost.Any
-�����δ֪�����ͺͲ��� Ȼ�󣬴��������Ͳ�۱�ʶ����ӵ�ӳ������д��붼�Ƶ��� <code class="computeroutput">signal_base</code> ���У� ��ר�Ŵ��� <code class="computeroutput">any</code> �� <code class="computeroutput"><a class="link" href="../boost/function.html" title="Class template function">function</a></code> -����ʹ������� pimpl ���÷�������ʵ�ʵ�ʵ�֡� ʵ�ʵ� <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">signalN</a></code>
-��ģ������ݲ�������仯�Ĵ��룬 �������ģ����صĴ��루����ӣ��� </p>
+<p> 为了防止这种所谓的“模板膨胀”, 我们使用了 Boost.Function 和 Boost.Any
+来保存未知的类型和操作。 然后,处理插槽链表和插槽标识符到连接的映射的所有代 码都移到了 <code class="computeroutput">signal_base</code> 类中, 它专门处 理 <code class="computeroutput">any</code> 和 <code class="computeroutput"><a class="link" href="../boost/function.html" title="Class template function">function</a></code> +对象,使用著名的 pimpl 惯用法隐藏了实际的实现。 实际的 <code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">signalN</a></code> +类模板仅处理根据参数个数而变化的代码, 或本来就是模板相关的代码(如连接 )。 </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -99,7 +99,7 @@
 <div>
<h3 class="title"><a name="id1285305"></a><code class="computeroutput">connection</code> class</h3>
 <h3 class="title">
-<a name="id1285305"></a><code class="computeroutput">connection</code> ��</h3> +<a name="id1285305"></a><code class="computeroutput">connection</code> 类 </h3>
 </div>
 </div>
 </div>
@@ -110,11 +110,11 @@
the <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> class itself is merely a thin wrapper over a <code class="computeroutput">shared_ptr</code> to a <code class="computeroutput">basic_connection</code> object.</p> <p> <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> -���� Boost.Signals ����Ϊ�����ġ� ���� Boost.Signals ϵͳ�е�Ψһ��ʵ�壬 ֪�����ض�������������ж��� -ȷ�е�˵�� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
-�౾��ֻ��ָ�� <code class="computeroutput">basic_connection</code>
-����� <code class="computeroutput">shared_ptr</code>
-֮�ϵı���װ�� </p>
+类是 Boost.Signals 库行为的中心。 它是 Boost.Signals 系统中的唯一的实体, 知道与特定连接相关联的所有对象。 +确切地说, <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
+类本身只是指向 <code class="computeroutput">basic_connection</code>
+对象的 <code class="computeroutput">shared_ptr</code>
+之上的薄封装。 </p>
<p> <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> objects are stored by all participants in the Signals system: each <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> object contains a list of <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
@@ -126,13 +126,13 @@
 stored data in the <code class="computeroutput">std::multimap</code>
 is the slot pair).</p>
<p> <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> -�����ź�ϵͳ�����в����߱��棺 ÿ�� <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> -�����һ�� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> -������� ����������˰����ɸ��ٶ����������ӣ� ͬ�������źŰ�һ�鶨���۵���ԣ�pair���� ������ɲ�ۺ������һ���� -Boost.Function ���󣩺� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> -������ʱ��Ͽ�������ɡ� ��󣬴Ӳ���鵽��۵�ӳ���ǻ��� <code class="computeroutput">std::multimap</code>
-�еļ�ֵ�������� <code class="computeroutput">std::multimap</code>
-�е���ݼ������ԣ��� </p>
+对象被信号系统中所有参与者保存: 每个 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> +对象包含一个 <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> +对象链表, 该链表描术了包含这个可跟踪对象的所有连接; 同样,所有信号包含一 组定义插槽的配对(pair)。 该配对由插槽函数对象(一般是 +Boost.Function 对象)和 <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> +对象(析构时会断开)所组成。 最后,从插槽组到插槽的映射是基于 <code class="computeroutput">std::multimap</code>
+中的键值(保存于 <code class="computeroutput">std::multimap</code>
+中的数据即插槽配对)。 </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -141,7 +141,7 @@
 <h3 class="title"><a name="id1285438"></a>Slot
 Call Iterator</h3>
 <h3 class="title">
-<a name="id1285438"></a>��۵��õ����</h3>
+<a name="id1285438"></a>插槽调用迭代器</h3>
 </div>
 </div>
 </div>
@@ -152,24 +152,24 @@
 model: the implementation collapses all these layers into a single
 iterator adaptor because several popular compilers failed to compile
 the implementation of the conceptual model.</p>
-<p> ��۵��õ�����������һ�ѵ���������� ���ǻ��ĵײ�������������Ϊ�� 
�±�������ÿ��������Ҫ������ͺ���Ϊ��
-ע�������Ǹ����ģ�ͣ� ʵ��ʱ������Щ��κϲ�Ϊ�������������� ��Ϊ��Щ���еı������޷��������ģ�͵�ʵ�֡� </p> +<p> 插槽调用迭代器概念上是一堆迭代器适配器, 它们会更改底层插槽链表迭代器的 行为。 下表描述了每个迭代器所要求的类型和行为。 +注意这仅仅是个概念模型: 实现时所有这些层次合并为单个迭代器适配器, 因为有 些流行的编译器无法编译概念模型的实现。 </p>
 <div class="informaltable">
 <table class="table">
 <colgroup><col><col></colgroup>
 <thead><tr>
 <th align="left">Iterator Adaptor
-<p>�����������</p>
+<p>迭代器适配器</p>
 </th>
 <th align="left">Purpose
-<p>Ŀ��</p>
+<p>目的</p>
 </th>
 </tr>
 </thead><tbody>
 <tr>
 <td align="left">
 <p>Slot List Iterator</p>
-<p>����������</p>
+<p>插槽链表迭代器</p>
 </td>
 <td align="left">
 <p>An iterator through the list of slots connected to a
@@ -177,69 +177,69 @@
 of this iterator will be <code class="computeroutput">std::pair&lt;any,
connection&gt;</code>, where the <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">any</a></code>
 contains an instance of the slot function type.</p>
-<p>��ӵ��źŵIJ�����ĵ���� �õ����� <code class="computeroutput">value_type</code>
-�� <code class="computeroutput">std::pair&lt;any,
-connection&gt;</code>�� ���� <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">any</a></code>
-���ۺ������͵�һ��ʵ�� </p>
+<p>连接到信号的插槽链表的迭代器。 该迭代器的 <code class="computeroutput">value_type</code>
+是 <code class="computeroutput">std::pair&lt;any,
+connection&gt;</code>, 其中 <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">any</a></code>
+包含插槽函数类型的一个实例。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Filter Iterator Adaptor</p>
-<p>���˵����������</p>
+<p>过滤迭代器适配器</p>
 </td>
 <td align="left">
 <p>This filtering iterator adaptor filters out slots that
 have been disconnected, so we never see a disconnected slot in later
 stages.</p>
-<p>�����˵������������˵��ѶϿ��IJ�ۣ� ��������ں���Ľ׶β�����ѶϿ��IJ�ۡ� </p> +<p>这个过滤迭代器适配器过滤掉已断开的插槽, 因此我们在后面的阶段不会见到已 断开的插槽。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Projection Iterator Adaptor</p>
-<p>ͶӰ�����������</p>
+<p>投影迭代器适配器</p>
 </td>
 <td align="left">
 <p>The projection iterator adaptor returns a reference to
 the first member of the pair that constitutes a connected slot (e.g.,
just the <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code>
 object that holds the slot function).</p>
-<p> ͶӰ������������һ�����ã� ָ�򹹳�һ������Ӳ�۵� pair �ĵ�һ���Ա �����籣���ۺ���� <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code>
-���󣩡� </p>
+<p> 投影迭代器适配器返回一个引用, 指向构成一个已连接插槽的 pair 的第一个成 员 (例如保存插槽函数的 <code class="computeroutput"><a class="link" href="../boost/any.html" title="Class any">boost::any</a></code>
+对象)。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Transform Iterator Adaptor</p>
-<p>ת�������������</p>
+<p>转换迭代器适配器</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 extract a reference to the slot function with the appropriate slot
 function type.</p>
-<p>���ת�������������ִ�� <code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">any_cast</a></code>��
-����ȡһ���ۺ�������ã� �������ʵ��IJ�ۺ������͡� </p>
+<p>这个转换迭代器适配器执行 <code class="computeroutput"><a class="link" href="../boost/any_cast.html" title="Function any_cast">any_cast</a></code>,
+以提取一个插槽函数的引用, 并具有适当的插槽函数类型。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Transform Iterator Adaptor</p>
-<p>ת�������������</p>
+<p>转换迭代器适配器</p>
 </td>
 <td align="left">
 <p>This transform iterator adaptor calls the function
 object returned by dereferencing the underlying iterator with the set
 of arguments given to the signal itself, and returns the result of that
 slot call.</p>
-<p>���ת���������������õײ������������صĺ������ ����Ϊ�����źű�����������
-�������Ǹ��۵��õĽ�� </p>
+<p>这个转换迭代器适配器调用底层迭代器解引用所返回的函数对象, 参数为输入信 号本身的那组参数,
+并返回那个插槽调用的结果。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Input Caching Iterator Adaptor</p>
-<p>���뻺������������</p>
+<p>输入缓存迭代器适配器</p>
 </td>
 <td align="left">
 <p>This iterator adaptor caches the result of dereferencing
@@ -247,18 +247,18 @@
 multiple times will only result in the underlying iterator being
 dereferenced once; thus, a slot can only be called once but its result
 can be used multiple times.</p>
-<p>��������������ײ���������õĽ�� ��ˣ��õ�����ν����ý�ֻ������ײ������һ�ν����ã�
-�����ۿ���һ�ε��õ�����ɶ��ʹ�á� </p>
+<p>这个迭代器适配器缓存底层迭代器解引用的结果。 因此,该迭代器多次解引用将 只会引起底层迭代器的一次解引用;
+这样,插槽可以一次调用但其结果可多次使用。 </p>
 </td>
 </tr>
 <tr>
 <td align="left">
 <p>Slot Call Iterator</p>
-<p>��۵��õ����</p>
+<p>插槽调用迭代器</p>
 </td>
 <td align="left">
 <p>Iterates over calls to each slot.</p>
-<p>������ÿ���ۡ�</p>
+<p>迭代调用每个插槽。</p>
 </td>
 </tr>
 </tbody>
@@ -272,7 +272,7 @@
<h3 class="title"><a name="id1285660"></a><code class="computeroutput">visit_each</code> function
 template</h3>
 <h3 class="title">
-<a name="id1285660"></a><code class="computeroutput">visit_each</code> ����ģ��</h3> +<a name="id1285660"></a><code class="computeroutput">visit_each</code> 函数 模板</h3>
 </div>
 </div>
 </div>
@@ -282,9 +282,9 @@
 takes three arguments: an object to explore, a visitor function object
that is invoked with each subobject, and the <code class="computeroutput">int</code> 0. </p> <p> <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code> -����ģ����һ�ֻ��ƣ����ڷ��ֱ�������һ������еĶ��� <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code> -���������̽��Ķ��󡢶�ÿ���Ӷ�����е��õķ����ߺ��� �� <code class="computeroutput">int</code>
-0��</p>
+函数模板是一种机制,用于发现保存于另一个对象中的对象。 <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code> +有三个参数:待探测的对象、对每个子对象进行调用的访问者函数, 和 <code class="computeroutput">int</code>
+0。</p>
 <p> The third parameter is merely a temporary solution to the
 widespread lack of proper function template partial ordering. The
primary <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code>
@@ -298,14 +298,14 @@
 The ordering determined by this conversion thus achieves partial
 ordering of the function templates in a limited, but successful, way.
 The following example illustrates the use of this technique:</p>
-<p> �����������Ǹ���ʱ�Ľ����� ����ձ�ȱ����ȷ�ĺ���ģ���ػ�������һ���⡣ <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code>
-������ģ��ָ����������������Ϊ <code class="computeroutput">long</code>��
-���κ��û��ػ�����ָ�����ǵĵ�����������Ϊ <code class="computeroutput">int</code>�� -����ʹ���ϱ�׼�ı�������������ƥ����� <code class="computeroutput">T</code>
-�Ͳ��� <code class="computeroutput">A&lt;T&gt;</code>
-֮���жϴ��� ��Ҳ���Ծ������ 0 �� <code class="computeroutput">int</code>
-��ת���ȵ� <code class="computeroutput">long</code>
-��ת����á� ���ת�����Ĵ�����������˺���ģ���ػ��Ĵ��򻯣� ��һ�����޵ĵ��dzɹ��ķ�ʽ�� �����������ʾ�˸ü����ʹ�ã� </p> +<p> 第三个参数仅仅是个临时的解决方案, 针对普遍缺乏正确的函数模板特化次序这 一问题。 <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code> +函数主模板指定这个第三个参数类型为 <code class="computeroutput">long</code>, +而任何用户特化必须指定他们的第三个参数类型为 <code class="computeroutput">int</code>。 +这样,即使不合标准的编译器不能例如在匹配参数 <code class="computeroutput">T</code>
+和参数 <code class="computeroutput">A&lt;T&gt;</code>
+之间判断次序, 它也可以决定从整数 0 到 <code class="computeroutput">int</code>
+的转换比到 <code class="computeroutput">long</code>
+的转换更好。 这个转换所决定的次序就这样做到了函数模板特化的次序化, 以一种 有限的但是成功的方式。 下面的例子显示了该技术的使用: </p> <pre class="programlisting">template&lt;typename&gt; class A {};<br>template&lt;typename T&gt; void foo(T, long);<br>template&lt;typename T&gt; void foo(A&lt;T&gt;, int);<br>A&lt;T&gt; at;<br>foo(at, 0);<br></pre>
 <p> In this example, we assume that our compiler can not tell
 that <code class="computeroutput">A&lt;T&gt;</code>
@@ -314,11 +314,11 @@
based on that parameter. Then the conversion from 0 to <code class="computeroutput">int</code> is better than the
 conversion from 0 to <code class="computeroutput">long</code>,
 and the second function template is chosen. </p>
-<p> �ڱ����У����Ǽٶ����ǵı��������ж� <code class="computeroutput">A&lt;T&gt;</code>
-�� <code class="computeroutput">T</code>
-��ƥ�䣬����˼ٶ�����ģ�岻�ܻ����Ǹ�������� ���Ǵ� 0 �� <code class="computeroutput">int</code>
-��ת���ȴ� 0 �� <code class="computeroutput">long</code>
-��ת����ã����ҵڶ�����ģ�屻ѡ�С� </p>
+<p> 在本例中,我们假定我们的编译器不能判断 <code class="computeroutput">A&lt;T&gt;</code>
+比 <code class="computeroutput">T</code>
+更匹配,并因此假定函数模板不能基于那个参数排序。 于是从 0 到 <code class="computeroutput">int</code>
+的转换比从 0 到 <code class="computeroutput">long</code>
+的转换更好,并且第二个函数模板被选中。 </p>
 </div>
 </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%">
@@ -331,8 +331,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.10</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.10</p>
 <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>
 </div>

Modified: trunk/doc/html/signals/s06.html
==============================================================================
--- trunk/doc/html/signals/s06.html     (original)
+++ trunk/doc/html/signals/s06.html     Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Design Rationale</title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design Rationale</title>

 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -30,7 +30,7 @@
 <div>
<h2 class="title" style="clear: both;"><a name="id1285823"></a>Design Rationale</h2>
 <h2 class="title" style="clear: both;">
-<a name="id1285823"></a>���ԭ��</h2>
+<a name="id1285823"></a>设计原理</h2>
 </div>
 </div>
 </div>
@@ -48,13 +48,13 @@
 </div>
 <div class="toc">
 <dl>
-<dt><span class="section"><a href="s05.html#id1285833">��۶����ѡ��</a></span></dt> -<dt><span class="section"><a href="s05.html#id1285940">�û�����ӹ���</a></span></dt> -<dt><span class="section"><a href="s05.html#id1286132">�ϲ���ӿ�</a></span></dt> -<dt><span class="section"><a href="s05.html#id1286317">��ӵĽӿڣ�+= �����</a></span></dt> +<dt><span class="section"><a href="s05.html#id1285833">插槽定义的选择 </a></span></dt> +<dt><span class="section"><a href="s05.html#id1285940">用户层连接管理 </a></span></dt> +<dt><span class="section"><a href="s05.html#id1286132">合并器接口 </a></span></dt> +<dt><span class="section"><a href="s05.html#id1286317">连接的接口:+= 运算 符</a></span></dt> <dt><span class="section"><a href="s05.html#id1286512"><code class="computeroutput">trackable</code>
-��ԭ��</a></span></dt>
-<dt><span class="section"><a href="s05.html#id1286716">�������ź�/���ʵ�ֵıȽ�</a></span></dt>
+的原理</a></span></dt>
+<dt><span class="section"><a href="s05.html#id1286716">与其他信号/插槽实现 的比较</a></span></dt>
 </dl>
 </div>
 <div class="section" lang="en">
@@ -64,7 +64,7 @@
 <h3 class="title"><a name="id1285833"></a>Choice
 of Slot Definitions</h3>
 <h3 class="title">
-<a name="id1285833"></a>��۶����ѡ��</h3>
+<a name="id1285833"></a>插槽定义的选择</h3>
 </div>
 </div>
 </div>
@@ -75,9 +75,9 @@
 convertible to the result type expected by the signal. However,
 alternative definitions have associated pros and cons that were
 considered prior to the construction of Boost.Signals.</p>
-<p> ��ͬ���źźͲ�ۿ��У���۵Ķ����Dz�ͬ�ġ� �� Boost.Signals �У���۵Ķ���ܿ��ɣ� ����������⺯����� -ֻҪ����������ź���ָ�����͵IJ�����е��ã� �����䷵��ֵ��ת��Ϊ�ź���Ҫ��Ľ�����͡� Ȼ��ͬ�Ķ�����кû��� ��Ҫ��
-Boost.Signals �Ĺ���֮ǰ������ϸ���ǡ� </p>
+<p> 不同的信号和插槽库中,插槽的定义是不同的。 在 Boost.Signals 中,插槽的 定义很宽松: 它可以是任意函数对象, +只要它可以输入信号所指定类型的参数进行调用, 并且其返回值可转换为信号所要求 的结果类型。 然而,不同的定义各有好坏, 需要在
+Boost.Signals 的构造之前进行仔细考虑。 </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -91,13 +91,13 @@
 large number of small adaptor classes containing virtual functions has
 been found to cause an unacceptable increase in the size of executables
 (polymorphic class types require more code than non-polymorphic types).</p>
-<p><span class="bold"><strong>�������������Ļ���</strong></span>��
-ͨ������ķ���Ҫ�������û�����IJ�������Կ���ָ����ij�� <code class="computeroutput">Slot</code> -�����࣬�ó����ඨ����һ����ò�۵��麯�� ����ʹ��һ������������һ����ת�������� Boost.Signals ���õĶ��塣 -���Ƿ���ʹ�ô�����麯���С������ �ᵼ��ִ�г���Ĵ�С������ɽ��ܵij̶� ����̬�����ͱȷǶ�̬������Ҫ���Ĵ��룩�� </p>
+<p><span class="bold"><strong>插槽派生自特殊的基类</strong></span>:
+通常这样的方案要求所有用户定义的插槽派生自库所指定的某个 <code class="computeroutput">Slot</code> +抽象类,该抽象类定义了一个调用插槽的虚函数。 可以使用一个适配器将这样一个定 义转换到类似 Boost.Signals 所用的定义。 +但是发现使用大量包含虚函数的小适配类 会导致执行程序的大小增长到不可接受的程 度 (多态类类型比非多态类型需要更多的代码)。 </p>
 <p> This approach does have the benefit of simplicity of
 implementation and user interface, from an object-oriented perspective.</p>
-<p> ���������Ĺ۵㿴�����ַ���������ʵ���Ϻ��û��ӿ��ϼ��Եĺô��� </p>
+<p> 从面向对象的观点看,这种方法不具有实现上和用户接口上简单性的好处。 </p>
 </li>
 <li>
 <p><span class="bold"><strong>Slots
@@ -115,19 +115,19 @@
composition primitives, but instead provides a hook (via the <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code>
 mechanism) that allows existing binder/composition libraries to provide
 the necessary information to Signals.</p>
-<p><span class="bold"><strong>��۹�����һ��ԭ��</strong></span>��
-�������У���ۿ��Ծ���һ�����޵����� �������������Թ�ͬ�ij�����ࣩ�� ���ǹ�����ij���ɿⶨ���ԭ�
-ԭ�������������ɺ���ָ��ͳ�Ա����ָ�뵽��۵�ת���� ��һ�����޵İ������ 
����һ�ַ����Ƚϼ򵥲������ڴ�������ͨ���
-�����������۹����еĸ߶�����ԡ� ���ں��������ϵĿ��Ѿ�����൱��� �źźͲ�ۿⲻӦ�ü���������ǿ���ܡ� 
����
-Boost.Signals û�а����󶨻���������ԭ� ����ת���ṩ��һ���ӣ�ͨ�� <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code>
-���ƣ������������еİ�/��Ͽ��� Signals ���ṩ��Ҫ����Ϣ�� </p>
+<p><span class="bold"><strong>插槽构造自一套原语</strong></span>:
+在这个方案中,插槽可以具有一组有限的类型 (往往是派生自共同的抽象基类), 它们构造自某套由库定义的原语, +原语往往包括从自由函数指针和成员函数指针到插槽的转换, 和一组有限的绑定能 力。 这样一种方法比较简单并适用于大多数的普通情况, +但是它不允许插槽构造中的高度灵活性。 用于函数对象组合的库已经变得相当发 达, 信号和插槽库不应该加入这种增强功能。 所以 +Boost.Signals 没有包含参数绑定或函数对象组合原语, 但是转而提供了一个钩子 (通过 <code class="computeroutput"><a class="link" href="../boost/visit_each.html" title="Function template visit_each">visit_each</a></code>
+机制),以允许现有的绑定/组合库向 Signals 库提供必要的信息。 </p>
 </li>
 </ul>
 </div>
 <p> Users not satisfied with the slot definition choice may opt
 to replace the default slot function type with an alternative that
 meets their specific needs.</p>
-<p> �������ò�۶����ѡ�� �û�����ѡ��������ķ��������Ҫ�������滻 Ĭ�ϵIJ�ۺ������͡� </p> +<p> 如果不满意该插槽定义的选择, 用户可以选择用另外的符合他们需要的类型替换 默认的插槽函数类型。 </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -136,7 +136,7 @@
 <h3 class="title"><a name="id1285940"></a>User-level
 Connection Management</h3>
 <h3 class="title">
-<a name="id1285940"></a>�û�����ӹ���</h3>
+<a name="id1285940"></a>用户层连接管理</h3>
 </div>
 </div>
 </div>
@@ -146,8 +146,8 @@
 object that enables connected/disconnected query, manual disconnection,
 and an automatic disconnection on destruction mode. Some other possible
 interfaces include:</p>
-<p> �û���Ҫ��ȷ�����źŵ���۵���Ӻ��������ĶϿ��� Boost.Signals ����õķ����Ƿ���һ�� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> -���������ܹ����������/�ѶϿ���ѯ���ֹ��Ͽ���������ģʽ���Զ��Ͽ��� ����һЩ���ܵĽӿڰ���� </p> +<p> 用户需要精确控制信号到插槽的连接和它们最后的断开。 Boost.Signals 所采用 的方法是返回一个 <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code> +对象,让人能够进行已连接/已断开查询、手工断开,及在析构模式下自动断开。 其 他一些可能的接口包括: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -164,13 +164,13 @@
given in the call to <code class="computeroutput"><a class="link" href="../boost/signalN.html#id481008-bb">disconnect</a></code>
 with an existing slot we would need to be able to compare arbitrary
 function objects, which is not feasible.</p>
-<p><span class="bold"><strong>�Ͽ�ʱ���ݲ��</strong></span>��
-�����ӿ�ģ���£� ͨ�� <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id417694-bb">connect</a>(slot)</code> -��ӵIJ�ۣ��Ͽ�ʱ��ͨ�� <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id481008-bb">disconnect</a>(slot)</code>
-���еġ� ���ڲ��������ò�۱Ƚϣ�ִ��һ���������� ����ҵ��ò�ۣ��ʹ������ɾ�� 
���ҵ��ǣ���ѯ���һ��Ҳ����Ϊ����ʱ��IJ���
-����۱�ø���ʱ�� �ȼ򵥺���ָ�롢��Ա����ָ���һ�����޵���ϺͲ���󶨸���ʱ�� ��ģ��Ҳ��ʵ���ϵ�ԭ�����ã� Ϊ�����ִ�����ƥ��
+<p><span class="bold"><strong>断开时传递插槽</strong></span>:
+在这个接口模型下, 通过 <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id417694-bb">connect</a>(slot)</code> +连接的插槽,断开时是通过 <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id481008-bb">disconnect</a>(slot)</code> +进行的。 在内部,将利用插槽比较,执行一个线性搜索, 如果找到该插槽,就从链 表中删除。 不幸的是,查询连接一般也将成为线性时间的操作。 +当插槽变得更复杂时, 比简单函数指针、成员函数指针和一组有限的组合和参数绑定 更复杂时, 该模型也因实现上的原因而不可用: 为了在现存插槽中匹配 <code class="computeroutput"><a class="link" href="../boost/signalN.html#id481008-bb">disconnect</a></code>
-����������IJ�ۣ� ������Ҫ�ܹ��Ƚ����⺯����� �����Dz����ܵġ� </p>
+调用中输入的插槽, 我们需要能够比较任意函数对象, 而这是不可能的。 </p>
 </li>
 <li>
 <p><span class="bold"><strong>Pass a token
@@ -179,9 +179,9 @@
 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>
-<p><span class="bold"><strong>�Ͽ�ʱ����һ����</strong></span>��
-������һ�����ױȽϵı�����ʶ��ۣ��������ַ��� ��ۿ���������ĺ������ ��Ȼ���������ϵ�Ч�� Boost.Signals
-����õķ����� ����������׳����Ϊ����ԭ�� </p>
+<p><span class="bold"><strong>断开时传递一个标记</strong></span>:
+这个方法用一个容易比较的标记来标识插槽(例如用字符串), 插槽可以是任意的函 数对象。 虽然这个方法本质上等效于 Boost.Signals
+所采用的方法, 但它可能容易出错,因为以下原因: </p>
 <div class="itemizedlist">
 <ul type="circle">
 <li>
@@ -190,8 +190,8 @@
 memory allocation. While errors of this sort would not be catastrophic
 for a signals and slots implementation, their detection is generally
 nontrivial.</p>
-<p>�����Ͽ�������ԣ� ��������������ڶ�̬�ڴ�����е� <code class="computeroutput">new</code> �� <code class="computeroutput">delete</code> ���ʱ���������⡣
-��Ȼ���ִ�������źŲ�ۿ�ʵ���˵�����������Եģ� ����Ҫ�������ͨ�������򵥡� </p>
+<p>连接与断开必须配对, 因此问题变得类似于动态内存分配中的 <code class="computeroutput">new</code> 和 <code class="computeroutput">delete</code> 配对时所产生的问题。 +虽然这种错误对于信号插槽库实现来说并不是灾难性的, 但是要检测它们通常并不简 单。 </p>
 </li>
 <li>
 <p>Tokens must be unique, otherwise two slots will have
@@ -200,22 +200,22 @@
 additional task for the user. Uniqueness of tokens also results in an
 additional failure mode when attempting to connect a slot using a token
 that has already been used.</p>
-<p>��DZ���Ψһ����������۾ͻ������ͬ�����ֶ����֡�
-�ڶ�̬���������ӵĻ����£�������ɽ���Ϊ�û��Ķ��⸺���� ��ǵ�Ψһ��Ҳ�����˶����ʧ��ģʽ�� ����ͼ��һ���Ѿ���ʹ�õı�����һ���ۡ� </p>
+<p>标记必须唯一,否则两个插槽就会具有相同的名字而不可区分。
+在动态产生许多连接的环境下,名字生成将成为用户的额外负担。 标记的唯一性也导 致了额外的失败模式, 如试图用一个已经被使用的标记连接一个插槽。 </p>
 </li>
 <li>
 <p>More parameterization would be required, because the
 token type must be user-defined. Additional parameterization steepens
 the learning curver and overcomplicates a simple interface.</p>
-<p>��Ҫ���IJ�����Ϊ��ǵ����ͱ������û�����ġ� ����IJ���ʹѧϰ���߱�ö��ͣ�ʹ�򵥵Ľӿڹ�ȸ��ӡ� </p> +<p>需要更多的参数,因为标记的类型必须是用户定义的。 额外的参数使学习曲线变 得陡峭,使简单的接口过度复杂。 </p>
 </li>
 </ul>
 </div>
 <p> This type of interface is supported in Boost.Signals via
the slot grouping mechanism. It augments the <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
 object-based connection management scheme.</p>
-<p> ����ӿ��� Boost.Signals ��ͨ���۱�����ƻ��֧�֡� ����֧�ֻ��� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
-�������ӹ�����Ƶ����ɡ� </p>
+<p> 这类接口在 Boost.Signals 中通过插槽编组机制获得支持。 它是支持基于 <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
+对象的连接管理机制的理由。 </p>
 </li>
 </ul>
 </div>
@@ -227,7 +227,7 @@
 <h3 class="title"><a name="id1286132"></a>Combiner
 Interface</h3>
 <h3 class="title">
-<a name="id1286132"></a>�ϲ���ӿ�</h3>
+<a name="id1286132"></a>合并器接口</h3>
 </div>
 </div>
 </div>
@@ -243,10 +243,10 @@
 not reusable (either in other signals &amp; slots libraries or
 within other generic algorithms), and the learning curve is steepened
 slightly to learn the specific combiner interface.</p>
-<p> �ϲ���Combiner���ӿ�ģ���˶�C++��׼���㷨�ĵ��á� 
�������C++����Ա�˵���ϲ���ӿ��Ǹо�����Ȼ�ģ�
-��Ϊ��Ѳ�۵��õĽ��������һϵ��ͨ������������ʵ�ֵ�� ��֮ƥ�еĽӿ����һ��Ҫ��ϲ�����ɷ��һ���Ľӿڣ�
-ʹ֮����Ϊ�źſⶨ�ƣ����������źſ⣩�� ��Ȼ��Щ�ӿ�ͨ��ʹ�źŲ�ۿ��ʵ�ָ�򵥣�
-����ϧ�ϲ����ǿ����õģ��������źŲ�ۿ��������ͨ���㷨�У��� ����ѧϰ����ĺϲ���ӿڵ�ѧϰ�����е㶸�� </p> +<p> 合并器(Combiner)接口模仿了对C++标准库算法的调用。 对熟练的C++程序员来 说,合并器接口是感觉最自然的, +因为它把插槽调用的结果看作仅仅是一系列通过输入迭代器访问的值, 与之匹敌的接 口设计一般要求合并器构造成符合一定的接口, +使之可以为信号库定制(及受制于信号库)。 虽然这些接口通常使信号插槽库的实现 更简单, +但可惜合并器不是可重用的(在其他信号插槽库或在其他通用算法中), 并且学习特 殊的合并器接口的学习曲线有点陡。 </p>
 <p> The Signals formulation of combiners is based on the combiner
 using the "pull" mode of communication, instead of the more complex
 "push" mechanism. With a "pull" mechanism, the combiner's state can be
@@ -259,10 +259,10 @@
 called. Compare, for example, a combiner that returns the maximum
 element from calling the slots. If the maximum element ever exceeds
 100, no more slots are to be called.</p>
-<p> Signals ��Ժϲ�����䷽��ƻ���ʹ�á����pull����ģʽͨѶ�ĺϲ��� ���Ǹ��ӵġ��ƣ�push�������ơ�
-�á�������ƣ��ϲ����״̬���Ա�����ջ�ϣ������ֳ��������Ĵ��� 
��Ϊ���ۺ�ʱ��Ҫ�����ʱ����������һ������ȡ�䷵��ֵ����
-��һ��򵥵Ľӿ�������ȡ�Ǹ���ݣ� ��شӺϲ���Ĵ����з��ء� 
���ơ���������෴����ĺϲ�����������Ա�б������е�״̬��
-��Ϊÿ�ε����źŶ�������ϲ�����ĵ��á� ���磬�Ƚ�һ��Ӳ�۵��÷������Ԫ�صĺϲ��� ������Ԫ�س��� 100���Ͳ��ٵ����Ժ�IJ�ۡ� </p> +<p> Signals 库对合并器的配方设计基于使用“拉(pull)”模式通讯的合并器, 而不 是更复杂的“推(push)”机制。 +用“拉”机制,合并器的状态可以保存在栈上,并保持程序计数器寄存器, 因为无论何 时需要新数据时(即调用下一插槽来提取其返回值), +有一个简单的接口来立即提取那个数据, 而不必从合并器的代码中返回。 “推”机制 与此相反,它的合并器必须在类成员中保存所有的状态, +因为每次调用信号都会引起合并器函数的调用。 例如,比较一个从插槽调用返回最大 元素的合并器。 如果最大元素超过 100,就不再调用以后的插槽。 </p>
 <div class="informaltable">
 <table class="table">
 <colgroup><col><col></colgroup>
@@ -297,9 +297,9 @@
 shorter and more reusable and will often be construed as easier to
 write and understand, even outside the context of a signals &amp;
 slots library.</p>
-<p>��Щ������Ҫע�⼸�㡣 ������İ汾�Ǹ�����õĺ������ ���� <code class="computeroutput">value_type</code> Ϊ����������������У�
-��������Ϸdz��򵥡� ��һ���棬���ơ��İ汾����ڵ�����ר�еĽӿڣ�һ�㲻�ǿ����õġ� 
��ͬʱҪ������״ֵ̬�����磬�Ƿ��Ѿ����չ�Ԫ�ء�
-���ܴ��������������������Եģ� �����ģʽ���Ը�̲��������Ը�ã�������������ױ�д����⣬ ��ʹ�������źŲ�ۿ�������ġ� </p> +<p>这些例子中要注意几点。 “拉”的版本是个可重用的函数对象, 基于 <code class="computeroutput">value_type</code> 为整数的输入迭代器序列, +并且设计上非常简单。 另一方面,“推”的版本依赖于调用者专有的接口,一般不是可 重用的。 它同时要求额外的状态值,例如,是否已经接收过元素。 +尽管代码质量和易用性是主观性的, “拉”模式明显更短并且重用性更好,并且往往更 容易编写和理解, 即使是脱离信号插槽库的上下文。 </p>
 <p> The cost of the "pull" combiner interface is paid in the
 implementation of the Signals library itself. To correctly handle slot
 disconnections during calls (e.g., when the dereference operator is
@@ -313,11 +313,11 @@
 overhead is nearly equivalent to that in the "push" model, but we have
 inverted the control structures to make iteration and dereference
 complex (instead of making combiner state-finding complex).</p>
-<p> ������ϲ���ӿڵĴ��֧���� Signals �Ȿ���ʵ���С�
-Ϊ����ȷ�����ڵ����еIJ�۶Ͽ������統���ý����������ʱ���� ������õ��������ѶϿ��IJ�ۡ� 
���⣬��������Я��һ������Դ��͵�ÿ����
-������һ�����Щ����Ľṹ�����þ��㹻�ˣ��� ���ұ��뻺���۵��õĽ�� �����ν����òŲ��ᵼ�¶�ε��á� 
����Ȼ��Ҫ�ܴ�Ŀ���
-��������ǵ��ò������̣��ÿ�����ͬ�ڡ��ơ�ģ�͵Ŀ��� �������ǵߵ��˿��ƽṹ�� �õ��ͽ����ñ临����
-������˺ϲ���״̬���ҵĸ����ԣ��� </p>
+<p> “拉”合并器接口的代价支付于 Signals 库本身的实现中。
+为了正确处理在调用中的插槽断开(例如当调用解引用运算符时), 你必须让迭代器 跳过已断开的插槽。 另外,迭代器必须携带一组参数以传送到每个插槽 +(尽管一个包含那些参数的结构的引用就足够了), 并且必须缓存插槽调用的结 果, 这样多次解引用才不会导致多次调用。 这显然需要很大的开销, +尽管如果考虑调用插槽整个过程,该开销几乎等同于“推”模型的开销, 但是我们颠倒 了控制结构, 让迭代和解引用变复杂了
+(替代了合并器状态查找的复杂性)。 </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -326,7 +326,7 @@
 <h3 class="title"><a name="id1286317"></a>Connection
 Interfaces: += operator</h3>
 <h3 class="title">
-<a name="id1286317"></a>��ӵĽӿڣ�+= �����</h3>
+<a name="id1286317"></a>连接的接口:+= 运算符</h3>
 </div>
 </div>
 </div>
@@ -335,9 +335,9 @@
 += slot</code> has been suggested (and has been used by other
 signals &amp; slots implementations). There are several reasons as
 to why this syntax has been rejected:</p>
-<p> Boost.Signals ֧������ <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id417694-bb">connect</a>(slot)</code>
-��������� �������˽����ø������ <code class="computeroutput">sig +=
-slot</code> �����ѱ������źŲ��ʵ�����ã��� Ϊʲô�ܾ�����������¼���ԭ�� </p>
+<p> Boost.Signals 支持形如 <code class="computeroutput">sig.<a class="link" href="../boost/signalN.html#id417694-bb">connect</a>(slot)</code>
+的连接语法, 但是有人建议用更简洁的语法 <code class="computeroutput">sig +=
+slot</code> (并已被其他信号插槽实现所用)。 为什么拒绝这个语法有以下几个原 因: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -348,12 +348,12 @@
 vs. <code class="computeroutput">+=</code>) is
essentially negligible. Furthermore, one could argue that calling <code class="computeroutput">connect()</code> is more
 readable than an overload of <code class="computeroutput">+=</code>.</p>
-<p><span class="bold"><strong>û��Ҫ</strong></span>��
-Boost.Signals �ṩ������������� <code class="computeroutput">+=</code>
-����� �ٴ򼸸��ַ�<code class="computeroutput">connect()</code>
-vs. <code class="computeroutput">+=</code>�����ǿ��Ժ��Եġ�
-���⣬�������ŵ��� <code class="computeroutput">connect()</code>
-�� <code class="computeroutput">+=</code> ���ؿɶ��Ը�á�</p>
+<p><span class="bold"><strong>没必要</strong></span>:
+Boost.Signals 提供的连接语法并不比 <code class="computeroutput">+=</code>
+运算符差。 少打几个字符(<code class="computeroutput">connect()</code>
+vs. <code class="computeroutput">+=</code>)根本是可以忽略的。
+另外,有人主张调用 <code class="computeroutput">connect()</code>
+比 <code class="computeroutput">+=</code> 重载可读性更好。</p>
 </li>
 <li>
 <p><span class="bold"><strong>Ambiguous
@@ -362,11 +362,11 @@
operation: should it be a reference to the signal itself, to enable <code class="computeroutput">sig += slot1 += slot2</code>, or should it return a <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
 for the newly-created signal/slot connection?</p>
-<p><span class="bold"><strong>�������Ͷ�����</strong></span>��
+<p><span class="bold"><strong>返回类型二义性</strong></span>:
 <code class="computeroutput">+=</code>
-�����ķ���ֵ���ڶ����ԡ� ��Ӧ���Ƿ����źű�������ã����� <code class="computeroutput">sig -+= slot1 += slot2</code>�� ���Ƿ����½����ź�/�����ӵ�һ�� <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
-��</p>
+运算符的返回值存在二义性。 它应该是返回信号本身的引用,可以 <code class="computeroutput">sig ++= slot1 += slot2</code>, 还是返回新建的信号/插槽连接的一个 <code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
+?</p>
 </li>
 <li>
 <p><span class="bold"><strong>Gateway to
@@ -375,19 +375,19 @@
it seems natural to have a disconnection operator <code class="computeroutput">-=</code>. However, this
 presents problems when the library allows arbitrary function objects to
 implicitly become slots, because slots are no longer comparable. </p>
-<p><span class="bold"><strong>ͨ������� -=��+</strong></span>��
-�����һ���������� <code class="computeroutput">+=</code>��
-������Ȼ��Ҫ��һ��Ͽ������ <code class="computeroutput">-=</code>��
-Ȼ�� ������������ĺ��������ʽ�ر�ɲ��ʱ�� ������������⣬ ��Ϊ��۲��پ��бȽ��ԡ� </p>
+<p><span class="bold"><strong>通往运算符 -=、+</strong></span>:
+当添加一个连接运算符 <code class="computeroutput">+=</code>,
+好像自然地要有一个断开运算符 <code class="computeroutput">-=</code>。
+然而, 当库允许任意的函数对象隐式地变成插槽时, 这里出现了问题, 因为插槽不 再具有比较性。 </p> <p> The second obvious addition when one has <code class="computeroutput">operator+=</code> would be to
 add a <code class="computeroutput">+</code>
 operator that supports addition of multiple slots, followed by
assignment to a signal. However, this would require implementing <code class="computeroutput">+</code> such that it can
 accept any two function objects, which is technically infeasible.</p>
-<p> ������ <code class="computeroutput">operator+=</code>
-ʱ���ڶ������Ի���ӵ��� <code class="computeroutput">+</code>
-�������֧�ֶ������ӣ�Ȼ���ٸ�ֵ���źš� Ȼ����Ҫ��ʵ�� <code class="computeroutput">+</code>
-���Խ��������������� ���ڼ������Dz����еġ� </p>
+<p> 当具有 <code class="computeroutput">operator+=</code>
+时,第二个明显会添加的是 <code class="computeroutput">+</code>
+运算符,以支持多个插槽相加,然后再赋值到信号。 然而,这要求实现 <code class="computeroutput">+</code>
+可以接收任意两个函数对象, 这在技术上是不可行的。 </p>
 </li>
 </ul>
 </div>
@@ -398,7 +398,7 @@
 <div>
<h3 class="title"><a name="id1286512"></a><code class="computeroutput">trackable</code> rationale</h3>
 <h3 class="title">
-<a name="id1286512"></a><code class="computeroutput">trackable</code> ��ԭ��</h3> +<a name="id1286512"></a><code class="computeroutput">trackable</code> 的原 理</h3>
 </div>
 </div>
 </div>
@@ -412,8 +412,8 @@
 <div class="toc">
 <dl>
<dt><span class="section"><a href="s05.html#id1286559"><code class="computeroutput">trackable</code>
-�ĸ�����Ϊ</a></span></dt>
-<dt><span class="section"><a href="s05.html#id1286623">ΪʲôҪ������ <code class="computeroutput">trackable</code>��</a></span></dt>
+的复制行为</a></span></dt>
+<dt><span class="section"><a href="s05.html#id1286623">为什么要派生自 <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>
@@ -423,9 +423,9 @@
and the limitation requiring users to derive from <code class="computeroutput">trackable</code> to create
 types that can participate in automatic connection management.</p>
<p> <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> -�����Զ���������ڹ�����Ҫ���û��ӿڣ� ������ֱ��Ӱ���û��� �����������Ϊͻ�� <code class="computeroutput">trackable</code> �Źֵĸ�����Ϊ�� -���û��������Բ����Զ���ӹ��������ʱ�� Ҫ�������� <code class="computeroutput">trackable</code>
-�����ơ� </p>
+类是自动连接生命期管理主要的用户接口, 它的设计直接影响用户。 有两个问题最 为突出: <code class="computeroutput">trackable</code> 古怪的复制行为, +和用户创建可以参与自动连接管理的类型时, 要求派生自 <code class="computeroutput">trackable</code>
+的限制。 </p>
 <div class="section" lang="en">
 <div class="titlepage">
 <div>
@@ -433,7 +433,7 @@
<h4 class="title"><a name="id1286559"></a><code class="computeroutput">trackable</code> copying
 behavior</h4>
 <h4 class="title">
-<a name="id1286559"></a><code class="computeroutput">trackable</code> �ĸ�����Ϊ</h4> +<a name="id1286559"></a><code class="computeroutput">trackable</code> 的复 制行为</h4>
 </div>
 </div>
 </div>
@@ -450,11 +450,11 @@
 slots connected to them are connected to that particular signal, not
 the data contained in the signal.</p>
<p><code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> -�ĸ�����Ϊ������ <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> -�Ӷ��󲻿ɸ��ơ� �෴�����������ֻ�Ǹ�ղ��� Ϊ�����һ�㣬����������ź�-�����ӵ����ʣ� �����������ǻ������ڱ���ӵ�ʵ��ģ� -��ʵ��֮һ�����ʱ����Ӿͱ���١� ��ˣ���һ�� <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
-�Ӷ��󱻸���ʱ�� ���Dz��ܸ�����ӣ���Ϊ��Ӳ�������Ŀ��ʵ�塪������ֻ������ԭʵ�塣 
���ԭ������Ϊ�ź��Dz��ɸ��Ƶģ�
-��ӵ��źŵIJ������ӵ����ض����źţ������ź���������ݡ� </p>
+的复制行为基本上是 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> +子对象不可复制。 相反,复制运算符只是个空操作。 为理解这一点,我们来看看信 号-插槽连接的性质, 并留意该连接是基于正在被连接的实体的; +当实体之一被销毁时,连接就被销毁。 因此,当一个 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code> +子对象被复制时, 我们不能复制连接,因为连接不能引用目标实体——它们只能引用原 实体。 这个原因是因为信号是不可复制的:
+连接到信号的插槽是连接到该特定的信号,而不是信号中所包含的数据。 </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -463,14 +463,14 @@
 <h4 class="title"><a name="id1286623"></a>Why
 derivation from <code class="computeroutput">trackable</code>?</h4>
 <h4 class="title">
-<a name="id1286623"></a>ΪʲôҪ������ <code class="computeroutput">trackable</code>��</h4> +<a name="id1286623"></a>为什么要派生自 <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>
-<p> ���� <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
-���������Լ�� </p>
+<p> 为了让 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
+正常工作,有两个约束: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -478,21 +478,21 @@
 must have storage space to keep track of all connections made to this
 object.</p>
<p><code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
-������ٱ���������������������ӡ�</p>
+必须跟踪保存这个对象的所作的所有连接。</p>
 </li>
 <li>
<p><code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
 must be notified when the object is being destructed so that it can
 disconnect its connections.</p>
-<p>�� <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
-���ڱ���ʱ�� ����֪ͨ�ö��� ��ʹ���ܹ��Ͽ����������ӡ� </p>
+<p>当 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
+正在被析构时, 必须通知该对象, 以使它能够断开它的所有连接。 </p>
 </li>
 </ul>
 </div>
<p>Clearly, deriving from <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
 meets these two guidelines. We have not yet found a superior solution.</p>
-<p>��Ȼ�������� <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
-���������롣 ���ǻ�û���ҵ���õĽ�����</p>
+<p>显然,派生自 <code class="computeroutput"><a class="link" href="../boost/signals/trackable.html" title="Class trackable">trackable</a></code>
+符合这两个方针。 我们还没有找到更好的解决安案。</p>
 </div>
 </div>
 <div class="section" lang="en">
@@ -502,7 +502,7 @@
 <h3 class="title"><a name="id1286716"></a>Comparison
 with other Signal/Slot implementations</h3>
 <h3 class="title">
-<a name="id1286716"></a>�������ź�/���ʵ�ֵıȽ�</h3>
+<a name="id1286716"></a>与其他信号/插槽实现的比较</h3>
 </div>
 </div>
 </div>
@@ -530,11 +530,11 @@
 construction of signals and in the use of connections and automatic
 connection lifetime management. There are some major differences in
 design that separate these libraries:</p>
-<p> <a href="http://libsigc.sourceforge.net"; target="_top">libsigc++</a> �Ǹ�C++�źŲ�ۿ⣬ ���ʼ��һ����Ŀ��һ���֣�
-��C++��װ <a href="http://www.gtk.org"; target="_top">GTK</a>
-���C�ӿڣ� ���ҷ�չ��Ϊһ�����Ŀ⣬�� Karl Nelson ά���� libsigc++ �� Boost.Signals
-֮���кܶ���֮ͬ���� ��ʵ Boost.Signals �� Karl Nelson �� libsigc++ Ӱ��ܴ�
-���Եؼ��������ͻᷢ�����Ƶ����� �����źŵĹ��죬����Ӽ��Զ���������ڹ����ʹ�á� ������������ϵ���Ҫ����ǣ� </p> +<p> <a href="http://libsigc.sourceforge.net"; target="_top">libsigc++</a> 是 个C++信号插槽库, 最初开始于一个项目的一部分,
+用C++封装 <a href="http://www.gtk.org"; target="_top">GTK</a>
+库的C接口, 并且发展成为一个独立的库,由 Karl Nelson 维护。 libsigc++ 和 Boost.Signals +之间有很多相同之处, 其实 Boost.Signals 受 Karl Nelson 和 libsigc++ 影响很 大。 +粗略地检查这两个库就会发现相似的语法, 如在信号的构造,和连接及自动连接生命 期管理的使用。 这两个库在设计上的主要区别是: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
@@ -547,10 +547,10 @@
 types than Boost.Signals). A discussion of this approach with a
 comparison against the approach taken by Boost.Signals is given in
 Choice of Slot Definitions.</p>
-<p><span class="bold"><strong>��۶���</strong></span>��
-libsigc++ �еIJ����һ�׿ⶨ���ԭ�ﴴ���� ��Щԭ���������󶨣���Ϊ���һ���֣���
-��ʽ�ذ��źŵIJ���ͷ�����������Ϊ��۵IJ���ͷ������� ����� Boost.Signals��libsigc++ ��Ĭ������¶����͸��ϸ񣩡� -�����������ۣ� ͬʱ������ Boost.Signals ����÷����ıȽϣ� ���۶����ѡ��һ�ڡ� </p>
+<p><span class="bold"><strong>插槽定义</strong></span>:
+libsigc++ 中的插槽用一套库定义的原语创建。 这些原语允许对象绑定(作为库的一 部分), +显式地把信号的参数和返回类型适配为插槽的参数和返回类型 (相比 Boost.Signals,libsigc++ 在默认情况下对类型更严格)。 +对这个方法的讨论, 同时还有与 Boost.Signals 所采用方法的比较, 见“插槽定义 的选择”一节。 </p>
 </li>
 <li>
 <p><span class="bold"><strong>Combiner/Marshaller
@@ -558,9 +558,9 @@
 combiners in libsigc++ are the marshallers. Marshallers are similar to
 the "push" interface described in Combiner Interface, and a proper
 treatment of the topic is given there.</p>
-<p><span class="bold"><strong>�ϲ���/������ӿ�</strong></span>��
-libsigc++ ���� Boost.Signals �ĺϲ����Ч���Ǽ�����marshaller����
-�����������ڡ��ϲ���ӿڡ�һ��������ġ��ơ��ӿڣ� ����Ը�����������ʵ��ķ��� </p>
+<p><span class="bold"><strong>合并器/集结器接口</strong></span>:
+libsigc++ 中与 Boost.Signals 的合并器等效的是集结器(marshaller)。
+集结器类似于“合并器接口”一节中描述的“推”接口, 那里对该主题进行了适当的分 析。 </p>
 </li>
 </ul>
 </div>
@@ -579,26 +579,26 @@
 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>
-<p> <a href="http://www.microsoft.com"; target="_top">΢
-��</a> ������ .NET ��ܣ��������һ�����Ժ������չ�� ����֮һ����ί�У�delegate���� ί���������źŲ�ۣ�
-������ȴ����C++�źŲ�۵�ʵ�־��и������ƣ� �����ڣ� </p>
+<p> <a href="http://www.microsoft.com"; target="_top">微
+软</a> 引入了 .NET 框架,并关联了一组语言和语言扩展, 其中之一就是委托 (delegate)。 委托类似于信号插槽,
+但是它比大多数C++信号插槽的实现具有更多的限制, 表现在: </p>
 <div class="itemizedlist">
 <ul type="disc">
 <li>
 <p>Require exact type matches between a delegate and what it
 is calling.</p>
-<p>��ί�к���ĵ���֮�䣬Ҫ��ȷ������ƥ�䡣</p>
+<p>在委托和它的调用之间,要求精确的类型匹配。</p>
 </li>
 <li>
 <p>Only return the result of the last target called, with no
 option for customization.</p>
-<p>���������Ŀ��Ľ���޷����ơ�</p>
+<p>仅返回最后调用目标的结果,无法定制。</p>
 </li>
 <li>
 <p>Must call a method with <code class="computeroutput">this</code>
 already bound.</p>
-<p>�������һ�� <code class="computeroutput">this</code>
-�Ѱ󶨵ķ����� </p>
+<p>必须调用一个 <code class="computeroutput">this</code>
+已绑定的方法。 </p>
 </li>
 </ul>
 </div>
@@ -615,8 +615,8 @@
 <td align="right">
 <div class="copyright-footer">Copyright &#169; 2001-2004
 Douglas Gregor
-<p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-<p>���ĸ��£�2008.7.10</p>
+<p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+<p>译文更新:2008.7.10</p>
 <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>
 </div>

Modified: trunk/doc/html/signals/tests.html
==============================================================================
--- trunk/doc/html/signals/tests.html   (original)
+++ trunk/doc/html/signals/tests.html   Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Testsuite</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -27,20 +27,20 @@
 <a name="signals.tests"></a>Testsuite</h2>

 <h2 class="title" style="clear: both">
-<a name="signals.tests"></a>�����׼�</h2>
+<a name="signals.tests"></a>测试套件</h2>

 </div></div></div>

<div class="toc"><dl><dt><span class="section"><a href="tests.html#id1286870">Acceptance tests</a></span></dt></dl></div>

-<div class="toc"><dl><dt><span class="section"><a href="tests.html#id1286870">���ղ���</a></span></dt></dl></div> +<div class="toc"><dl><dt><span class="section"><a href="tests.html#id1286870">验收测试</a></span></dt></dl></div>

 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="id1286870"></a>Acceptance tests</h3>

 <h3 class="title">
-<a name="id1286870"></a>���ղ���</h3>
+<a name="id1286870"></a>验收测试</h3>

 </div></div></div>

@@ -64,33 +64,33 @@
 that has already been disconnected via deletion does not actually
 connect to the slot.</p>

-<p>ȷ����һ���Ѿ�ͨ��ɾ��Ͽ��IJ�۵���
+<p>确保对一个已经通过删除被断开的插槽调用
 <code class="computeroutput">connect</code>
-�����������Ӹò�ۡ�
+不会真正地连接该插槽。
 </p>

 </td>
-<td>�</td>
+<td>?/td>
 </tr>
 <tr>
<td><p><a href="../../../libs/signals/test/deletion_test.cpp" target="_top">deletion_test.cpp</a></p></td>
 <td><p>run</p></td>
 <td><p>Test deletion of slots.</p>

-<p>���Բ�۵�ɾ��</p>
+<p>测试插槽的删除。</p>

 </td>
-<td>�</td>
+<td>?/td>
 </tr>
 <tr>
<td><p><a href="../../../libs/signals/test/ordering_test.cpp" target="_top">ordering_test.cpp</a></p></td>
 <td><p>run</p></td>
 <td><p>Test slot group ordering.</p>

-<p>���Բ��������</p>
+<p>测试插槽组排序。</p>

 </td>
-<td>�</td>
+<td>?/td>
 </tr>
 <tr>
<td><p><a href="../../../libs/signals/test/signal_n_test.cpp" target="_top">signal_n_test.cpp</a></p></td>
@@ -98,12 +98,12 @@
 <td><p>Basic test of signal/slot connections and invocation using the
<code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signalN</a></code> class templates.</p>

-<p>��
+<p>用
<code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signalN</a></code>
-��ģ����ź�/�����Ӻ͵��õĻ��ȡ�</p>
+类模板的信号/插槽连接和调用的基本测度。</p>

 </td>
-<td>�</td>
+<td>?/td>
 </tr>
 <tr>
<td><p><a href="../../../libs/signals/test/signal_test.cpp" target="_top">signal_test.cpp</a></p></td>
@@ -111,9 +111,9 @@
 <td><p>Basic test of signal/slot connections and invocation using the
<code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code> class template.</p>

-<p>��
+<p>用
<code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code>
-��ģ����ź�/�����Ӻ͵��õĻ���ԡ�</p>
+类模板的信号/插槽连接和调用的基本测试。</p>

 </td>
<td><p>The <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code> class template may not
@@ -121,12 +121,12 @@
<code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signalN</a></code> class templates may still be
 usable.</p>

-<p>����ı������ϣ�
+<p>在你的编译器上,
<code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code>
-��ģ����ܲ����á�
-Ȼ��
+类模板可能不可用。
+然而
<code class="computeroutput"><a class="link" href="../boost/signalN.html" title="Class template signalN">boost::signalN</a></code>
-��ģ�����ǿ��õġ�</p>
+类模板仍是可用的。</p>

 </td>
 </tr>
@@ -136,13 +136,13 @@
 <td><p>Test automatic lifetime management using
       <code class="computeroutput">boost::trackable</code> objects.</p>

-<p>����ʹ��
+<p>测试使用
       <code class="computeroutput">boost::trackable</code>
-      ������Զ������ڹ���
+      对象的自动生命期管理。
       </p>

       </td>
-<td>�</td>
+<td>?/td>
 </tr>
 </tbody>
 </table></div>
@@ -152,8 +152,8 @@
 <td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &copy; 2001-2004 Douglas Gregor

-    <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-    <p>���ĸ��£�2008.7.10</p>
+    <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+    <p>译文更新:2008.7.10</p>

     <p>Use, modification and distribution is subject to the Boost
     Software License, Version 1.0. (See accompanying file

Modified: trunk/doc/html/signals/tutorial.html
==============================================================================
--- trunk/doc/html/signals/tutorial.html        (original)
+++ trunk/doc/html/signals/tutorial.html        Mon Apr 13 21:23:05 2009
@@ -1,6 +1,6 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Tutorial</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
@@ -27,7 +27,7 @@
 <a name="signals.tutorial"></a>Tutorial</h2></div></div></div>

 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="signals.tutorial"></a>�̳�</h2></div></div></div>
+<a name="signals.tutorial"></a>教程</h2></div></div></div>

 <div class="toc"><dl>
<dt><span class="section"><a href="tutorial.html#id1276917">How to Read this Tutorial</a></span></dt>
@@ -41,38 +41,38 @@
 </dl></div>

 <div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#terms20080627">�����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1276917">����Ķ���̳�</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1276980">�Լ����Ե�ע��</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1277113">Hello, World! �����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1277267">���ö����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1277683">��ֵ����ۼ��ش�</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1278652">��ӹ���</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1279460">���ӣ��ĵ�-��ͼ</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1279626">����źſ�</a></span></dt> +<dt><span class="section"><a href="tutorial.html#terms20080627">术语表 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1276917">如何阅读本教程 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1276980">对兼容性的注释 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277113">Hello, World! (初级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277267">调用多个插槽 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277683">传值到插槽及回 传</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278652">连接管理 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1279460">例子:文档-视图 </a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1279626">链接信号库 </a></span></dt>
 </dl></div>


 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="terms20080627"></a>�����</h3>
+<a name="terms20080627"></a>术语表</h3>
 </div></div></div>

 <table cellpadding="2" border="1">
-<tr><th>Ӣ��</th> <th>����</th> <th>ע��</th></tr>
+<tr><th>英文</th> <th>中文</th> <th>注释</th></tr>

-<tr><td>block</td><td>����</td><td>&nbsp;</td></tr>
-<tr><td>combiner</td><td>�ϲ���</td><td>&nbsp;</td></tr>
-<tr><td>compatibility form</td><td>������ʽ</td><td>&nbsp;</td></tr>
-<tr><td>connect</td><td>���</td><td>&nbsp;</td></tr>
-<tr><td>connection</td><td>���</td><td>&nbsp;</td></tr>
-<tr><td>disconnect</td><td>�Ͽ�</td><td>&nbsp;</td></tr>
-<tr><td>first-in first-out (FIFO)</td><td>�Ƚ��ȳ�FIFO��</td><td>&nbsp;</td></tr>
-<tr><td>preferred form</td><td>��ѡ��ʽ</td><td>&nbsp;</td></tr>
-<tr><td>scoped</td><td>���ڵ�</td><td>�������ڵ�</td></tr>
-<tr><td>signal</td><td>�ź�</td><td>&nbsp;</td></tr>
-<tr><td>Signals library</td><td>�źſ�</td><td>&nbsp;</td></tr>
-<tr><td>slot</td><td>���</td><td>&nbsp;</td></tr>
+<tr><td>block</td><td>阻塞</td><td>&nbsp;</td></tr>
+<tr><td>combiner</td><td>合并器</td><td>&nbsp;</td></tr>
+<tr><td>compatibility form</td><td>兼容形式</td><td>&nbsp;</td></tr>
+<tr><td>connect</td><td>连接</td><td>&nbsp;</td></tr>
+<tr><td>connection</td><td>连接</td><td>&nbsp;</td></tr>
+<tr><td>disconnect</td><td>断开</td><td>&nbsp;</td></tr>
+<tr><td>first-in first-out (FIFO)</td><td>先进先出 (FIFO)</td><td>&nbsp;</td></tr>
+<tr><td>preferred form</td><td>首选形式</td><td>&nbsp;</td></tr>
+<tr><td>scoped</td><td>域内的</td><td>作用域内的</td></tr>
+<tr><td>signal</td><td>信号</td><td>&nbsp;</td></tr>
+<tr><td>Signals library</td><td>信号库</td><td>&nbsp;</td></tr>
+<tr><td>slot</td><td>插槽</td><td>&nbsp;</td></tr>

 </table>
 </div>
@@ -82,7 +82,7 @@
 <a name="id1276917"></a>How to Read this Tutorial</h3>

 <h3 class="title">
-<a name="id1276917"></a>����Ķ���̳�</h3>
+<a name="id1276917"></a>如何阅读本教程</h3>

 </div></div></div>

@@ -104,20 +104,20 @@
will not need to read the <span class="emphasis"><em>Advanced</em></span> sections.</p>

 <p>
-���̳̲�����������Ķ�ġ�
+本教程不是用来线性阅读的。

-�䶥��ṹ���°����в�ͬ�ĸ���֣����紦����ö���ۡ���ֵ����ۼ��ش�����������ÿһ����Щ�����У����Ƚ������˼�룬Ȼ��˵���ϸ��ӵ�ʹ�á�
+其顶层结构大致按库中不同的概念划分,(如处理调用多个插槽、传值到插槽及回传 ),并且在每一个这些概念中,首先介绍其基本思想,然后说明库较复杂的使用。

-ÿ��ֶ���ע��<span class="emphasis"><em>��</em></span>��
-<span class="emphasis"><em>�м�</em></span>����<span class="emphasis"><em>�߼�</em></span>���԰���ָ�����ߡ�
+每个部分都标注了<span class="emphasis"><em>初级</em></span>、
+<span class="emphasis"><em>中级</em></span>,或<span class="emphasis"><em>高级</em></span>,以帮助指导读者。

-<span class="emphasis"><em>��</em></span>���ְ���������ʹ���߶����˽����Ϣ��ֻҪ�Ķ���<span class="emphasis"><em>��</em></span>���֣��Ϳ��Ժܺõ�ʹ���źſ⡣ +<span class="emphasis"><em>初级</em></span>部分包括库的所有使用者都该了解的 信息;只要阅读了<span class="emphasis"><em>初级</em></span>部分,就可以很好 地使用信号库。

-<span class="emphasis"><em>�м�</em></span>���ֽ����<span class="emphasis"><em>��</em></span>
-����֮�ϣ��ǿ���Ը��ӵ�ʹ�á�
+<span class="emphasis"><em>中级</em></span>部分建立在<span class="emphasis"><em>初级</em></span>
+部分之上,是库的稍复杂的使用。

-���<span class="emphasis"><em>�߼�</em></span>�����������źſ�ܸ߼���Ӧ�ã���������Ҫ��<span class="emphasis"><em>��</em></span>��<span class="emphasis"><em>�м�</em></span>������ʵ��ʵ���飻
-������û������Ķ�<span class="emphasis"><em>�߼�</em></span>���֡�
+最后,<span class="emphasis"><em>高级</em></span>部分详述了信号库很高级的应 用,这往往需要对<span class="emphasis"><em>初级</em></span>和<span class="emphasis"><em>中级</em></span>内容扎实的实践经验;
+大多数用户无需阅读<span class="emphasis"><em>高级</em></span>部分。
 </p>

 </div>
@@ -127,7 +127,7 @@
 <a name="id1276980"></a>Compatibility Note</h3>

 <h3 class="title">
-<a name="id1276980"></a>�Լ����Ե�ע��</h3>
+<a name="id1276980"></a>对兼容性的注释</h3>

 </div></div></div>

@@ -142,25 +142,25 @@
 that the preferred syntactic form in Signals is equivalent to that of
 Function's preferred syntactic form.</p>

-<p>Boost.Signals ����־䷨��ʽ����ѡ��ʽ��preferred form���ͼ�����ʽ��compatibility form���� +<p>Boost.Signals 有两种句法形式:首选形式(preferred form)和兼容形式 (compatibility form)。

-��ѡ��ʽ�ܸ���ܵ��ʺ�C++���ԣ�
-��������Ҫ���ǵĶ��ģ�����ĸ���
-��������߿ɶ��ԣ�
-Ȼ�����ڱ�����Ĵ�����ѡ��ʽ��������ƽ̨��֧�֡�
+首选形式能更紧密地适合C++语言,
+并减少需要考虑的独立模板参数的个数,
+往往能提高可读性;
+然而,由于编译器的错误,首选形式并非所有平台都支持。

-������ʽ�ɹ����� Boost.Signals ֧�ֵ����б�����
+兼容形式可工作于 Boost.Signals 支持的所有编译器。

-�ο��±���ȷ��Ϊ��ı�����ʹ�����־䷨��ʽ��
+参考下表,以确定为你的编译器使用哪种句法形式。

-Boost.Function ���û���ע�⣬Signals �е���ѡ�䷨��ʽ��Ч�� Function ����ѡ�䷨��ʽ��
+Boost.Function 的用户请注意,Signals 中的首选句法形式等效于 Function 的首选 句法形式。
 </p>

 <p>If your compiler does not appear in this list, please try the
 preferred syntax and report your results to the Boost list so that
 we can keep this table up-to-date.</p>

-<p>�����ı�����������嵥�ϣ���������ѡ�䷨����Boost�б�����Ľ����ʹ�����ܱ��ָ��¸ñ�
+<p>如果你的编译器不在这个清单上,请试用首选句法并向Boost列表报告你的结 果,以使我们能保持更新该表。
 </p>

 <div class="informaltable"><table class="table">
@@ -171,10 +171,10 @@
 <thead><tr>
 <th align="left">Preferred syntax
 <br>
-��ѡ�䷨
+首选句法
 </th>
 <th align="left">Portable syntax
-<br>���ݾ䷨
+<br>兼容句法
 </th>
 </tr></thead>
 <tbody><tr>
@@ -192,7 +192,7 @@
             <div class="itemizedlist"><ul type="disc">
<li><p><span class="emphasis"><em>Any compiler supporting the preferred syntax
 <br>
-֧����ѡ�䷨�����������
+支持首选句法的任意编译器
 </em></span></p></li>
 <li><p>Microsoft Visual C++ 6.0, 7.0</p></li>
 <li><p>Borland C++ 5.5.1</p></li>
@@ -208,7 +208,7 @@
 <a name="id1277113"></a>Hello, World! (Beginner)</h3>

 <h3 class="title">
-<a name="id1277113"></a>Hello, World! �����</h3>
+<a name="id1277113"></a>Hello, World! (初级)</h3>

 </div></div></div>

@@ -221,19 +221,19 @@
invokes <code class="computeroutput">HelloWorld::operator()</code> to print "Hello,
 World!".</p>

-<p>����ʹ���źźͲ��д��Hello, World!����
+<p>下例将使用信号和插槽写出“Hello, World!”。

-���ȣ����Ǵ����ź� <code class="computeroutput">sig</code>�����ź��޲����ҷ���ֵΪ�ա� +首先,我们创建信号 <code class="computeroutput">sig</code>,该信号无参数并 且返回值为空。

-���ţ�����ʹ�� <code class="computeroutput">connect</code>
-������ <code class="computeroutput">hello</code>
-���������ӵ��źš�
+接着,我们使用 <code class="computeroutput">connect</code>
+方法将 <code class="computeroutput">hello</code>
+函数对象连接到信号。

-�������һ��ʹ���ź�
+最后,像函数一样使用信号
 <code class="computeroutput">sig</code>
-����ò�ۣ�
-��ת����� <code class="computeroutput">HelloWorld::operator()</code>
-��ӡ��Hello, World!����
+来调用插槽,
+它将转而调用 <code class="computeroutput">HelloWorld::operator()</code>
+打印“Hello, World!”。
 </p>


@@ -301,7 +301,7 @@
 <a name="id1277267"></a>Calling multiple slots</h3>

 <h3 class="title">
-<a name="id1277267"></a>���ö����</h3>
+<a name="id1277267"></a>调用多个插槽</h3>

 </div></div></div>

@@ -311,8 +311,8 @@
 </dl></div>

 <div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#id1277272">��Ӷ���ۣ����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1277459">��۵����������м���</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277272">连接多个插槽 (初级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277459">插槽调用组排序 (中级)</a></span></dt>
 </dl></div>

 <div class="section" lang="en">
@@ -320,7 +320,7 @@
 <a name="id1277272"></a>Connecting multiple slots (Beginner)</h4>

 <h4 class="title">
-<a name="id1277272"></a>��Ӷ���ۣ����</h4>
+<a name="id1277272"></a>连接多个插槽(初级)</h4>

 </div></div></div>

@@ -330,11 +330,11 @@
 slots. The first slot will print "Hello" and may look like
 this:</p>

-<p>���źŵ��õ����۲��Ǻ�����˼��
-������ǽ���ӡ��Hello, World!���Ĺ����ֵ������ȫ����IJ�ۣ�
-�� Hello, World �������Ȥ�㡣
+<p>从信号调用单个插槽不是很有意思,
+因此我们将打印“Hello, World!”的工作拆分到两个完全独立的插槽,
+让 Hello, World 程序更有趣点。

-��һ���۽���ӡ��Hello�������ܿ����������</p>
+第一个插槽将打印“Hello”,可能看起来像这样:</p>

 <pre class="programlisting">
 struct Hello
@@ -348,8 +348,8 @@
 <p>The second slot will print ", World!" and a newline, to complete
 the program. The second slot may look like this:</p>

-<p>�ڶ����۽���ӡ��, World!�����س�����ɸó���
-�ڶ����ۿ��ܿ����������</p>
+<p>第二个插槽将打印“, World!”并回车以完成该程序。
+第二个插槽可能看起来像这样:</p>

 <pre class="programlisting">
 struct World
@@ -366,16 +366,16 @@
<code class="computeroutput">hello</code> and a <code class="computeroutput">world</code> slot to the same
 signal, and when we call the signal both slots will be called.</p>

-<p>�������ǵ��ϸ����ӣ����Ǵ����ź�
-<code class="computeroutput">sig</code>��
-��û�в����ҷ���ֵΪ
-<code class="computeroutput">void</code>��
+<p>就像我们的上个例子,我们创建信号
+<code class="computeroutput">sig</code>,
+它没有参数并且返回值为
+<code class="computeroutput">void</code>。

-��Σ����ǽ�
+这次,我们将
 <code class="computeroutput">hello</code>
-�� <code class="computeroutput">world</code>
-��۶���ӵ�ͬһ���źţ�
-�����ǵ��ø��źţ�����۶����ᱻ���á�
+和 <code class="computeroutput">world</code>
+插槽都连接到同一个信号,
+当我们调用该信号,两个插槽都将会被调用。
 </p>

 <div class="informaltable"><table class="table">
@@ -413,8 +413,8 @@
 <p>By default, slots are called in first-in first-out (FIFO) order,
 so the output of this program will be as expected:</p>

-<p>Ĭ������£�������Ƚ��ȳ�FIFO���Ĵ��򱻵��ã�
-��˸ó�������Ӧ���ǣ�
+<p>默认情况下,插槽以先进先出(FIFO)的次序被调用,
+因此该程序的输出应该是:
 </p>

 <pre class="programlisting">
@@ -426,7 +426,7 @@
 <a name="id1277459"></a>Ordering slot call groups (Intermediate)</h4>

 <h4 class="title">
-<a name="id1277459"></a>��۵����������м���</h4>
+<a name="id1277459"></a>插槽调用组排序(中级)</h4>

 </div></div></div>

@@ -441,22 +441,22 @@
are, by default, <code class="computeroutput">int</code>s, and are ordered by the integer
 &lt; relation. Here's how we construct Hello, World:</p>

-<p>��ۿ���������и����ã���ijЩ��۱�������һЩ֮ǰ���ã���ʹ���Dz��ǰ��Ǹ������ӵġ�
+<p>插槽可以随意具有副作用,即某些插槽必须在另一些之前调用,即使它们不是按那 个次序连接的。

-Boost.Signals �������۱����ڰ�ij�ַ�ʽ����ı����С�
+Boost.Signals 库允许插槽被置于按某种方式排序的编组中。

-�������ǵ� Hello, World ��������Ҫ��Hello���ڡ�, World!��֮ǰ��ӡ��
-�������ǽ���Hello������һ���飬���齫�ڡ�, World!��������֮ǰִ�С�
+对于我们的 Hello, World 程序,我们要“Hello”在“, World!”之前打印,
+所以我们将“Hello”放入一个组,该组将在“, World!”所在组之前执行。

-Ϊ������һ�㣬���ǿ�����
+为了做到这一点,我们可以在
 <code class="computeroutput">connect</code>
-���õ�ͷ���ṩһ�����IJ�����ָ�����顣
+调用的头部提供一个额外的参数,以指定该组。

-�����ֵĬ��Ϊ
-<code class="computeroutput">int</code>��
-�������͵� &lt; ��ϵ����
+编组的值默认为
+<code class="computeroutput">int</code>,
+并按整型的 &lt; 关系排序。

-���������� Hello, World��
+我们这样构造 Hello, World:
 </p>


@@ -503,26 +503,26 @@
 will be placed within the group ordering. If we add a new slot
 to our example like this:</p>

-<p>�ó�����ȷ��ӡ��Hello, World!������Ϊ
-<code class="computeroutput">Hello</code> �������� 0������
-<code class="computeroutput">World</code> �������ڵ��� 1 ֮ǰ��
-
-�������ʵ�����ǿ�ѡ�ġ�
-�ڵ�һ�� Hello World ����������ʡ������
-��Ϊ�����еIJ�۶����ʱ�������Dz���Ҫ�ġ�
-
-��ô��������ǻ�ϵ���ʹ�úͲ�ʹ�ñ���������ӻ�����
-��δ�����ۣ�����Щ���ʱδָ������IJ�ۣ������ڲ������ͷ����β��
-��ͨ����
+<p>该程序将正确打印出“Hello, World!”,因为
+<code class="computeroutput">Hello</code> 对象在组 0,它在
+<code class="computeroutput">World</code> 对象所在的组 1 之前。
+
+编组参数实际上是可选的。
+在第一个 Hello World 例子中我们省略了它,
+因为当所有的插槽都独立时,编组是不必要的。
+
+那么,如果我们混合调用使用和不使用编组参数的连接会怎样?
+“未命名”插槽(即那些连接时未指定组名的插槽)可置于插槽链表的头部或尾部
+(通过向
<code class="computeroutput"><a class="link" href="../boost/signalN.html#id417694-bb">connect</a></code>
-�ֱ���
-<code class="computeroutput">boost::signals::at_front</code> ��
+分别传入
+<code class="computeroutput">boost::signals::at_front</code> 或
 <code class="computeroutput">boost::signals::at_back</code>
-�����IJ���
-��Ĭ��Ϊ���Ľ�β��
+作为最后的参数),
+而默认为链表的结尾。

-��ָ���˱���ʱ�����IJ���������Dz�������ڵĴ���
-����������������ǵ���������µIJ�ۣ�
+当指定了编组时,最后的参数描述的是插槽在组内的次序。
+如果我们如下向我们的例子添加新的插槽:
 </p>

 <pre class="programlisting">
@@ -538,7 +538,7 @@
 </pre>
 <p>... we will get the result we wanted:</p>

-<p>�������ǽ��õ�������Ҫ�Ľ��</p>
+<p>……我们将得到我们想要的结果:</p>

 <pre class="programlisting">
 Hello, World!
@@ -551,7 +551,7 @@
 <a name="id1277683"></a>Passing values to and from slots</h3>

 <h3 class="title">
-<a name="id1277683"></a>��ֵ����ۼ��ش�</h3>
+<a name="id1277683"></a>传值到插槽及回传</h3>

 </div></div></div>

@@ -561,8 +561,8 @@
 </dl></div>

 <div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#id1277689">��۵IJ�����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1277949">�źŵķ���ֵ���߼���</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277689">插槽的参数(初 级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1277949">信号的返回值 (高级)</a></span></dt>
 </dl></div>

 <div class="section" lang="en">
@@ -570,7 +570,7 @@
 <a name="id1277689"></a>Slot Arguments (Beginner)</h4>

 <h4 class="title">
-<a name="id1277689"></a>��۵IJ�����</h4>
+<a name="id1277689"></a>插槽的参数(初级)</h4>

 </div></div></div>

@@ -579,9 +579,9 @@
 want to pass along the new mouse coordinates and whether the mouse
 buttons are pressed.</p>

-<p>�źſ��������ǵ��õ�ÿ���۴��ݲ���
+<p>信号可以向它们调用的每个插槽传递参数。

-���磬һ�������ƶ��¼����źſ���Ҫ�����µ��������Լ��Ƿ�������
+例如,一个传递鼠标移动事件的信号可能要传入新的鼠标坐标以及是否按了鼠标键。
 </p>

 <p>As an example, we'll create a signal that passes two
@@ -589,10 +589,10 @@
 slots that print the results of various arithmetic operations on
 these values.</p>

-<p>��Ϊһ�����ӣ����ǽ�����һ���źţ��������
-<code class="computeroutput">float</code> ������IJ�ۡ�
+<p>作为一个例子,我们将创建一个信号,它将传入两个
+<code class="computeroutput">float</code> 参数到它的插槽。

-Ȼ�����ǽ����������ۣ����ǽ���ӡ���������������������ĸ��ֽ��
+然后我们将创建几个插槽,它们将打印对这两个参数进行算术运算的各种结果。
 </p>

 <pre class="programlisting">
@@ -654,7 +654,7 @@
 </table></div>
 <p>This program will print out the following:</p>

-<p>�ó��򽫴�ӡ������£�</p>
+<p>该程序将打印输出如下:</p>

 <pre class="programlisting">
 The sum is 8
@@ -672,19 +672,19 @@
 <code class="computeroutput">float</code> values.</p>

 <p>
-������һ����� <code class="computeroutput">sig</code> ʱ��
-��������κ�ֵ��������ÿһ���ۡ�
+当像函数一样调用 <code class="computeroutput">sig</code> 时,
+输入它的任何值都传给了每一个插槽。

-�����ź�ʱ�����DZ���Ԥ��������Щֵ�����͡�
+创建信号时,我们必须预先声明这些值的类型。

-���� <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a>&lt;void (float,
-float)&gt;</code> �����źž��� <code class="computeroutput">void</code>
-����ֵ��������� <code class="computeroutput">float</code> ֵ��
+类型 <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a>&lt;void (float,
+float)&gt;</code> 表明信号具有 <code class="computeroutput">void</code>
+返回值并接受两个 <code class="computeroutput">float</code> 值。

-����κ���ӵ�
+因此任何连接到
 <code class="computeroutput">sig</code>
-�IJ�۶������ܹ��������
-<code class="computeroutput">float</code> ֵ��
+的插槽都必须能够接受两个
+<code class="computeroutput">float</code> 值。
 </p>

 </div>
@@ -694,7 +694,7 @@
 <a name="id1277949"></a>Signal Return Values (Advanced)</h4>

 <h4 class="title">
-<a name="id1277949"></a>�źŷ���ֵ���߼���</h4>
+<a name="id1277949"></a>信号返回值(高级)</h4>

 </div></div></div>

@@ -709,15 +709,15 @@
 returned by any slot, or a container of all of the results are some
 possibilities.</p>

-<p>�����ۿ��Խ��ղ�������Ҳ���Է���ֵ��
+<p>正如插槽可以接收参数,它们也可以返回值。

-Ȼ����Щֵ����ͨ��
-<em class="firstterm">�ϲ���combiner��</em>
-���ظ��źŵĵ����ߡ�
+然后这些值可以通过
+<em class="firstterm">合并器(combiner)</em>
+返回给信号的调用者。

-�ϲ���������һ�ֹ��ߣ�����ղ�۵��õĽ�����û�н��Ҳ������100�����������ʱ��֪��������Ұ����Ǻϲ��ɵ�һ�Ľ��ظ�����ߡ�
+合并器是这样一种工具,它接收插槽调用的结果(可能没有结果,也可能有100个结 果;程序运行时才知道),并且把它们合并成单一的结果返回给调用者。

-�õ�һ�Ľ�������Dz�۵��ý���һ��򵥺�������ǣ����IJ�۵��õĽ�����в�۷���ֵ�����ֵ��������н�������
+该单一的结果往往是插槽调用结果的一个简单函数,可能是:最后的插槽调用的结 果、所有插槽返回值的最大值,或包含所有结果的容器。
 </p>

 <p>We can modify our previous arithmetic operations example
@@ -726,10 +726,10 @@
 return a value based on these results to be printed:</p>

 <p>
-���ǿ�����΢�޸�ǰ���������������ӣ�
-ʹ��۷ֱ𷵻ؼӼ�˳�ļ�����
+我们可以稍微修改前面的算术运算的例子,
+使插槽分别返回加减乘除的计算结果。

-Ȼ���źű���Ϳ��Ը����Щ����һ��ֵ������ӡ�����
+然后信号本身就可以根据这些结果返回一个值,并打印出来。
 </p>

 <div class="informaltable"><table class="table">
@@ -786,21 +786,21 @@
 behavior is admittedly silly for this example, because slots have
 no side effects and the result is the last slot connect.</p>

-<p>����̽���� <code class="computeroutput">2</code>��
-������Ϊ���з������ͣ�<code class="computeroutput">float</code>��
-������ <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code>
-��ģ��ĵ�һ��ģ�������źŵ�Ĭ����Ϊ�ǣ�
-�������еIJ�ۣ�Ȼ�󷵻����һ����ò�۵Ľ��
+<p>该例程将输出 <code class="computeroutput">2</code>。
+这是因为具有返回类型(<code class="computeroutput">float</code>,
+即输入 <code class="computeroutput"><a class="link" href="../boost/signal.html" title="Class template signal">boost::signal</a></code>
+类模板的第一个模板参数)的信号的默认行为是,
+调用所有的插槽,然后返回最后一个被调用插槽的结果。

-�Ա����˵������Ϊȷʵ�е�ɵ����Ϊ��Щ���û�и����ò��ҽ��������IJ����ӡ�
+对本例来说,该行为确实有点傻,因为这些插槽没有副作用并且结果就是最后的插槽 连接。
 </p>

 <p>A more interesting signal result would be the maximum of the
 values returned by any slot. To do this, we create a custom
 combiner that looks like this:</p>

-<p>һ�������˼���źŽ���ǣ������в�۷���ֵ�����ֵ��
-Ϊ������һ�㣬���Ǵ�����һ���Զ���ϲ�������������
+<p>一个更有意思的信号结果是,求所有插槽返回值的最大值。
+为了做到这一点,我们创建了一个自定义合并器,看起来像这样:
 </p>

 <pre class="programlisting">
@@ -841,23 +841,23 @@
 returns that maximum value.</p>

 <p>
-<code class="computeroutput">maximum</code> ��ģ�����һ�������
+<code class="computeroutput">maximum</code> 类模板就像一个函数对象。

-��Ľ����������ģ�������
-���������ǻ��ڸ����ͼ������ֵ
-�����磬<code class="computeroutput">maximum&lt;float&gt;</code>
-����һϵ�� <code class="computeroutput">float</code>
-������� <code class="computeroutput">float</code>����
-
-������
-<code class="computeroutput">maximum</code> ����ʱ��
-�����һ��������������
-<code class="computeroutput">[first, last)</code>��
-���а������в�۵��õĽ��
+它的结果类型由其模板参数给出,
+并且它正是基于该类型计算最大值
+(例如,<code class="computeroutput">maximum&lt;float&gt;</code>
+将在一系列 <code class="computeroutput">float</code>
+中查找最大的 <code class="computeroutput">float</code>)。
+
+当调用
+<code class="computeroutput">maximum</code> 对象时,
+将给出一个输入迭代器序列
+<code class="computeroutput">[first, last)</code>,
+其中包含了所有插槽调用的结果。

 <code class="computeroutput">maximum</code>
-���ø���������������������Ԫ�أ�
-�������Ǹ����ֵ��
+利用该输入迭代器序列来计算最大元素,
+并返回那个最大值。
 </p>

 <p>We actually use this new function object type by installing it
@@ -865,8 +865,8 @@
 follows the signal's calling signature:</p>

 <p>
-����Ҫ������µĺ��������Ϊ�ϲ���װ�����ǵ��źţ�����ʵ��ʹ����
-�ϲ���ģ���������źŵĵ���ǩ��ʽ֮��
+我们要把这个新的函数对象作为合并器安装到我们的信号,才能实际使用它。
+合并器模板参数跟在信号的调用签名式之后。
 </p>

 <div class="informaltable"><table class="table">
@@ -896,7 +896,7 @@
 <p>Now we can connect slots that perform arithmetic functions and
 use the signal:</p>

-<p>�������ǿ������ִ�������ܵIJ�۲�ʹ���ź��ˣ�
+<p>现在我们可以连接执行算术功能的插槽并使用信号了:
 </p>

 <pre class="programlisting">
@@ -912,18 +912,18 @@
 of 5 and 3 will be larger than the quotient, sum, or
 difference.</p>

-<p>�ó�������Ϊ <code class="computeroutput">15</code>��
-��Ϊ���ܲ�۵���Ӵ�����Σ�
-5 �� 3 �ij˻�����̡��ͣ���
+<p>该程序的输出为 <code class="computeroutput">15</code>,
+因为不管插槽的连接次序如何,
+5 和 3 的乘积将大于商、和,或差。
 </p>

 <p>In other cases we might want to return all of the values
 computed by the slots together, in one large data structure. This
 is easily done with a different combiner:</p>

-<p>����������£����ǿ���Ҫͬʱ���ز�ۼ��������ֵ��
-�籣����һ����͵���ݽṹ�С�
-�������һ��ͬ�ĺϲ����������ɣ�
+<p>在其他情况下,我们可能要同时返回插槽计算的所有值,
+如保存在一个大型的数据结构中。
+这可以用一个不同的合并器来轻松完成:
 </p>

 <pre class="programlisting">
@@ -944,7 +944,7 @@
 </p>

 <p>
-�����ٴ�������µĺϲ�����źţ�
+我们再次用这个新的合并器创建信号:
 </p>

 <div class="informaltable"><table class="table">
@@ -999,20 +999,20 @@
<code class="computeroutput">result_type</code> member type becomes the return type of the
 signal.</p>

-<p>������� 15��8��1.6667���� 2��
-������Ȥ���ǣ�
+<p>该程序的输出将包含 15、8、1.6667,和 2。
+这里有趣的是,
 <code class="computeroutput">signal</code>
-��ĵ�һ��ģ�����
-<code class="computeroutput">float</code>��
-��Ȼ�����źŵķ������͡�
-
-�෴���ò���������Ӳ�۵ķ������ͣ�
-������Ҳ�Ǵ���ϲ�������������
-<code class="computeroutput">value_type</code>��
+类的第一个模板参数,
+<code class="computeroutput">float</code>,
+竟然不是信号的返回类型。
+
+相反,该参数是所连接插槽的返回类型,
+并且它也是传入合并器的输入迭代器的
+<code class="computeroutput">value_type</code>。

-�ϲ������Ǹ�����󣬲������
+合并器本身是个函数对象,并且它的
 <code class="computeroutput">result_type</code>
-��Ա���ͽ���Ϊ�źŵķ������͡�
+成员类型将成为信号的返回类型。
 </p>

 <p>The input iterators passed to the combiner transform dereference
@@ -1030,23 +1030,23 @@
 request:</p>

 <p>
-����ϲ������������Ὣ�����ò���ת��Ϊ��۵��á�
+传给合并器的输入迭代器会将解引用操作转换为插槽调用。

-��˺ϲ����ѡ������ijЩ����ض�����IJ�ۡ�
+因此合并器可选择仅调用某些符合特定条件的插槽。

-���磬�ڷֲ�����ϵͳ�У��ϲ�����ܻ�ѯ��ÿ��Զ��ϵͳ�ܷ�������
+例如,在分布计算系统中,合并器可能会询问每个远程系统能否处理请求。

-����һ���ض����󣬽���һ��Զ��ϵͳ���д���
-��˵�һ��Զ��ϵͳ���ܸù����
-���ǽ�����Ҫ���κ�����Զ��ϵͳ���ͬһ������
+对于一个特定请求,仅需一个远程系统进行处理,
+因此当一个远程系统接受该工作后,
+我们将不再要求任何其他远程系统来做同一个任务。

-����һ��ϲ���ֻ������������õķ���ֵ��
-������ֵ���Խ���ʱ�ͷ��ء�
+这样一个合并器只需检查迭代器解引用的返回值,
+并当该值可以接受时就返回。

-���µĺϲ���ص�һ��ָ��
+以下的合并器返回第一个指向
 <code class="computeroutput">FulfilledRequest</code>
-��ݽṹ�ķǿ�ָ�룬
-���Ҫ���κ��Ժ�IJ����������
+数据结构的非空指针,
+而不必要求任何以后的插槽来完成请求:
 </p>

 <pre class="programlisting">
@@ -1072,7 +1072,7 @@
 <a name="id1278652"></a>Connection Management</h3>

 <h3 class="title">
-<a name="id1278652"></a>��ӹ���</h3>
+<a name="id1278652"></a>连接管理</h3>

 </div></div></div>

@@ -1087,13 +1087,13 @@
 </dl></div>

 <div class="toc"><dl>
-<dt><span class="section"><a href="tutorial.html#id1278657">�Ͽ���ۣ����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1278779">�����ۣ����</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1278859">������ӣ��м���</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1278910">�Ͽ��ȼ۵IJ�ۣ��м���</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1278998">�Զ���ӹ����м���</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1279224">��ʱ�Ͽ������м���</a></span></dt> -<dt><span class="section"><a href="tutorial.html#id1279298">���ݲ�ۣ��м���</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278657">断开插槽(初级 )</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278779">阻塞插槽(初级 )</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278859">域内连接(中级 )</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278910">断开等价的插槽 (中级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1278998">自动连接管理 (中级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1279224">何时断开?(中 级)</a></span></dt> +<dt><span class="section"><a href="tutorial.html#id1279298">传递插槽(中级 )</a></span></dt>
 </dl></div>


@@ -1102,7 +1102,7 @@
 <a name="id1278657"></a>Disconnecting Slots (Beginner)</h4>

 <h4 class="title">
-<a name="id1278657"></a>�Ͽ���ۣ����</h4>
+<a name="id1278657"></a>断开插槽(初级)</h4>

 </div></div></div>

@@ -1111,9 +1111,9 @@
 are then disconnected, and the programmer needs control to decide
 when a slot should no longer be connected.</p>

-<p>��۲�Ҫ�������DZ���Ӻ������ڵش��ڡ�
-������ֻ���������һЩ�¼�Ȼ��Ͽ���
-�����Ա��Ҫ���ƾ��ʱ��۲�Ӧ���ټ�����ӡ�
+<p>插槽不要求在它们被连接后无限期地存在。
+往往插槽只是用来接收一些事件然后断开,
+而程序员需要控制决定何时插槽不应该再继续连接。
 </p>

 <p>The entry point for managing connections explicitly is the
@@ -1128,23 +1128,23 @@
 connection still exists or to disconnect the signal and slot.</p>

 <p>
-��ʽ������ӵ���ڵ���
-<code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">boost::signals::connection</a></code> �ࡣ
+显式管理连接的入口点是
+<code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">boost::signals::connection</a></code> 类。

<code class="computeroutput"><a class="link" href="../boost/signals/connection.html" title="Class connection">connection</a></code>
-��Ψһ������ض��ź����ض����֮�����ӡ�
+类唯一代表了特定信号与特定插槽之间的连接。

<code class="computeroutput"><a class="link" href="../boost/signals/connection.html#id722201-bb">connected</a>()</code>
-��������ź������Ƿ��Ա�����ӣ�
+方法检查信号与插槽是否仍保持连接,

-����ź�����������ŵģ�
+如果信号与插槽是连接着的,
<code class="computeroutput"><a class="link" href="../boost/signals/connection.html#id457846-bb">disconnect()</a></code>
-�����Ͽ����ǵ���ӡ�
+方法断开它们的连接。

-ÿ�ε����źŵ� <code class="computeroutput">connect()</code>
-�������ͷ���һ����Ӷ���
-�ö�������ȷ������Ƿ���Ȼ���ڣ�
-�������ڶϿ��źźͲ�ۡ�
+每次调用信号的 <code class="computeroutput">connect()</code>
+方法,就返回一个连接对象,
+该对象用于确定连接是否仍然存在,
+或者用于断开信号和插槽。
 </p>

 <pre class="programlisting">
@@ -1165,7 +1165,7 @@
 <a name="id1278779"></a>Blocking Slots (Beginner)</h4>

 <h4 class="title">
-<a name="id1278779"></a>�����ۣ����</h4>
+<a name="id1278779"></a>阻塞插槽(初级)</h4>

 </div></div></div>

@@ -1177,14 +1177,14 @@
 blocking/unblocking slots:</p>

 <p>
-��ۿ��Ա���ʱ�����������źű�����ʱ����Щ��۽������ԣ�����û�б��Ͽ���
+插槽可以被临时“阻塞”,即当信号被调用时,这些插槽将被忽略,但并没有被断开。

 <code class="computeroutput">block</code>
-��Ա������ʱ������һ���ۣ�
-��ͨ�� <code class="computeroutput">unblock</code>
-�������
+成员函数临时地阻塞一个插槽,
+可通过 <code class="computeroutput">unblock</code>
+解除阻塞。

-����һ������/�����۵����ӣ�
+这是一个阻塞/开启插槽的例子:
 </p>

 <pre class="programlisting">
@@ -1205,7 +1205,7 @@
 <a name="id1278859"></a>Scoped connections (Intermediate)</h4>

 <h4 class="title">
-<a name="id1278859"></a>������ӣ��м���</h4>
+<a name="id1278859"></a>域内连接(中级)</h4>

 </div></div></div>

@@ -1216,11 +1216,11 @@
 e.g.,</p>

 <p>
-<code class="computeroutput">boost::signals::scoped_connection</code> ��������һ���ź�/��۵���ӣ��� +<code class="computeroutput">boost::signals::scoped_connection</code> 类引 用了一个信号/插槽的连接,当
 <code class="computeroutput">scoped_connection</code>
-���������ʱ������ӽ��ᱻ�Ͽ���
+类出作用域时,该连接将会被断开。

-��������ʱ���ʱ���ù��ܺ����ã��磺
+当仅需临时连接时,该功能很有用,如:
 </p>

 <pre class="programlisting">
@@ -1236,7 +1236,7 @@
 <a name="id1278910"></a>Disconnecting equivalent slots (Intermediate)</h4>

 <h4 class="title">
-<a name="id1278910"></a>�Ͽ��ȼ۵IJ�ۣ��м���</h4>
+<a name="id1278910"></a>断开等价的插槽(中级)</h4>

 </div></div></div>

@@ -1248,12 +1248,12 @@

 </p>

-<p>�����ʹ��
+<p>你可以使用
<code class="computeroutput"><a class="link" href="../boost/signalN.html#id481008-bb">disconnect</a></code>
-�����Ͽ���������ȼ۵Ķ���ۣ�
-ֻҪ�ú����������;��пɷ��ʵ�
+方法断开与给定函数对象等价的多个插槽,
+只要该函数对象的类型具有可访问的
 <code class="computeroutput">==</code>
-��������磺
+运算符。例如:
 </p>

 <div class="informaltable"><table class="table">
@@ -1302,7 +1302,7 @@
 <a name="id1278998"></a>Automatic connection management (Intermediate)</h4>

 <h4 class="title">
-<a name="id1278998"></a>�Զ���ӹ����м���</h4>
+<a name="id1278998"></a>自动连接管理(中级)</h4>

 </div></div></div>

@@ -1315,13 +1315,13 @@
 service may be constructed like this: </p>

 <p>
-Boost.Signals ���Զ������ź�/�����������漰����������ڣ�
-�������۵������漰�Ķ������ʱ�Զ��Ͽ���ۡ�
+Boost.Signals 能自动跟踪信号/插槽连接中所涉及对象的生命期,
+包括当插槽调用中涉及的对象销毁时自动断开插槽。

-���磬����һ��򵥵����ŷ��ͷ���
-���пͻ�����ӵ������ṩ�ߣ�
-�������ṩ��һ����Ϣ����ͷ������ŵ�������ӵĿͻ���
-�����ŷ��ͷ�������������죺
+例如,考虑一个简单的新闻发送服务,
+其中客户会连接到新闻提供者,
+而新闻提供者一有信息到达,就发送新闻到所有连接的客户。
+该新闻发送服务可能像这样构造:
 </p>

 <div class="informaltable"><table class="table">
@@ -1357,10 +1357,10 @@
 e.g.,:</p>

 <p>
-ϣ��������Ÿ��µĿͻ�ֻ�����һ�������
-�ö�����Խ��մ���
+希望接收新闻更新的客户只需连接一个函数对象,
+该对象可以接收传给
 <code class="computeroutput">deliverNews</code>
-�źŵ�������Ŀ�����磺
+信号的新闻条目,例如:
 </p>

 <pre class="programlisting">
@@ -1393,23 +1393,23 @@
publicly from the <code class="computeroutput">boost::signals::trackable</code> class,
 e.g.:</p>

-<p>��������û��ر�����ѶϢ��
-����� <code class="computeroutput">deliverNews</code>
-��֪�� <code class="computeroutput">newsMessageArea</code> ����
-�ǻ���ô��
-
-���п��ܵ��Dz���δ���
-
-Ȼ����ֻ����ʹ�� Boost.Signals ʱ����
-<code class="computeroutput">NewsMessageArea</code> <span class="emphasis"><em>�ɸ��٣�trackable��</em></span>��
-��ô�� <code class="computeroutput">newsMessageArea</code> �����ʱ��
-���� <code class="computeroutput">newsMessageArea</code>
-�IJ�۾ͻᱻ�Ͽ���
+<p>不过,如果用户关闭新闻讯息区,
+销毁了 <code class="computeroutput">deliverNews</code>
+所知的 <code class="computeroutput">newsMessageArea</code> 对象,
+那会怎么样?
+
+最有可能的是产生段错误。
+
+然而,你只需在使用 Boost.Signals 时,让
+<code class="computeroutput">NewsMessageArea</code> <span class="emphasis"><em>可跟踪(trackable)</em></span>,
+那么当 <code class="computeroutput">newsMessageArea</code> 被销毁时,
+调用 <code class="computeroutput">newsMessageArea</code>
+的插槽就会被断开。

-ͨ���м̳���
-<code class="computeroutput">boost::signals::trackable</code> �࣬
+通过公有继承自
+<code class="computeroutput">boost::signals::trackable</code> 类,
 <code class="computeroutput">NewsMessageArea</code>
-��ͻ��ɿɸ��ٵģ����磺
+类就会变成可跟踪的,例如:
 </p>

 <pre class="programlisting">
@@ -1425,13 +1425,13 @@
<code class="computeroutput">boost::bind</code> will be found and tracked.</p>

 <p>
-Ŀǰ���� <code class="computeroutput">trackable</code>
-��������������и���Ҫ�����ƣ�
+目前,用 <code class="computeroutput">trackable</code>
+对象制作插槽连接有个重要的限制:

-�����ʹ�� Boost.Bind �����ĺ�������紫��
+它理解使用 Boost.Bind 构建的函数对象,如传入
 <code class="computeroutput">boost::bind</code>
-�� <code class="computeroutput">trackable</code>
-����ָ������ý��ᱻ���ֺ͸��١�
+的 <code class="computeroutput">trackable</code>
+对象指针或引用将会被发现和跟踪。
 </p>

<p><span class="bold"><strong>Warning</strong></span>: User-defined function objects and function
@@ -1441,15 +1441,15 @@
 objects</em></span>. Future versions of the Boost libraries will address
 this limitation.</p>

-<p><span class="bold"><strong>����</strong></span>��
-�û��Զ��庯��������������ĺ������
-��������� Boost.Function �� Boost.Lambda����
+<p><span class="bold"><strong>警告</strong></span>:
+用户自定义函数对象和来自其他库的函数对象
+(例如来自 Boost.Function 或 Boost.Lambda),

-û��ʵ����Ҫ���
+没有实现所要求的
 <code class="computeroutput">trackable</code>
-������ӿڣ�
-<span class="emphasis"><em>����ĬĬ�غ����κΰ󶨵Ŀɸ��ٶ���</em></span>��
-Boost���δ��汾����������ơ�
+对象检测接口,
+<span class="emphasis"><em>将会默默地忽略任何绑定的可跟踪对象</em></span>。
+Boost库的未来版本将会解除该限制。
 </p>

 </div>
@@ -1458,7 +1458,7 @@
 <a name="id1279224"></a>When can disconnections occur? (Intermediate)</h4>

 <h4 class="title">
-<a name="id1279224"></a>��ʱ�Ͽ������м���</h4>
+<a name="id1279224"></a>何时断开?(中级)</h4>

 </div></div></div>

@@ -1466,7 +1466,7 @@
 occur:</p>

 <p>
-������һ�������ʱ���ź�/��۽��Ͽ���
+以下任一条件发生时,信号/插槽将断开:
 </p>

 <div class="itemizedlist"><ul type="disc">
@@ -1475,13 +1475,13 @@
 signal's <code class="computeroutput">disconnect</code> method or
 <code class="computeroutput">scoped_connection</code>'s destructor.</p>

-<p>�����ʽ�Ͽ���
-ֱ��ͨ����ӵ�
-<code class="computeroutput">disconnect</code> ������
-���ӵ�ͨ���źŵ�
-<code class="computeroutput">disconnect</code> ������
+<p>连接显式断开:
+直接通过连接的
+<code class="computeroutput">disconnect</code> 方法,
+或间接地通过信号的
+<code class="computeroutput">disconnect</code> 方法或
 <code class="computeroutput">scoped_connection</code>
-�������
+的析构函数。
 </p>

 </li>
@@ -1490,14 +1490,14 @@
 destroyed.</p>

 <p>
-��ٰ��ڲ�۵� <code class="computeroutput">trackable</code> ����
+销毁绑定于插槽的 <code class="computeroutput">trackable</code> 对象。
 </p>

 </li>

 <li><p>The signal is destroyed.</p>

-<p>����źš�</p>
+<p>销毁信号。</p>

 </li>
 </ul></div>
@@ -1510,13 +1510,13 @@
 sequence, and which case it will complete its slot call sequence
 but may not be accessed directly.</p>

-<p>��Щ�¼����Է������κ�ʱ�䣬����ƻ��źŵĵ������С�
+<p>这些事件可以发生于任何时间,而不会破坏信号的调用序列。

-����ź�/��۵�������źŵ������е�����ʱ�̱��Ͽ���
-���������Խ�����ֻ�Dz�����ñ��Ͽ��IJ�ۡ�
+如果信号/插槽的连接在信号调用序列的任意时刻被断开,
+调用序列仍将继续,只是不会调用被断开的插槽。

-���⣬�źſ����ڵ��������м䱻��٣���ʱ����������۵������У�
-ֻ�Dz����Ա�ֱ�ӷ��ʡ�
+此外,信号可以在调用序列中间被销毁,这时,它将完成其插槽调用序列,
+只是不可以被直接访问。
 </p>

 <p>Signals may be invoked recursively (e.g., a signal A calls a
@@ -1525,10 +1525,10 @@
 sequence includes slot calls for all nested invocations of the
 signal.</p>

-<p>�źſ��Ա��ݹ���ã����磬�ź�A���ò��B������B�ֵ����ź�A��������
+<p>信号可以被递归调用(例如,信号A调用插槽B,而插槽B又调用信号A……)。

-�ݹ�����£��Ͽ�����Ϊ����ı䣬
-ֻ�Dz�۵������а������Ƕ�׵��źŵ��á�
+递归情况下,断开的行为不会改变,
+只是插槽调用序列包括所有嵌套的信号调用。
 </p>

 </div>
@@ -1537,7 +1537,7 @@
 <a name="id1279298"></a>Passing slots (Intermediate)</h4>

 <h4 class="title">
-<a name="id1279298"></a>���ݲ�ۣ��м���</h4>
+<a name="id1279298"></a>传递插槽(中级)</h4>

 </div></div></div>

@@ -1549,19 +1549,19 @@
 function object compatible with the signature of the signal can be
passed to a <code class="computeroutput">slot_type</code> parameter. For instance:</p>

-<p>Boost.Signals ���еIJ�ۿ��Դ�����ĺ�����󴴽������û�й̶������͡�
+<p>Boost.Signals 库中的插槽可以从任意的函数对象创建,因此没有固定的类型。

-����ͨ��Ҫ��ͨ���ģ�廯�Ľӿڴ��ݲ�ۡ�
+不过通常要求通过不可模板化的接口传递插槽。

-����ÿ���ض����ź����ͣ�
-������ͨ��
+对于每个特定的信号类型,
+都可以通过
 <code class="computeroutput">slot_type</code>
-���ݲ�ۣ�
+传递插槽,

-�����źŵ�ǩ��ʽ���ݵ����⺯�����
-�����Դ��� <code class="computeroutput">slot_type</code> ����
+而与信号的签名式兼容的任意函数对象,
+都可以传给 <code class="computeroutput">slot_type</code> 参数。

-���磺
+例如:
 </p>

 <div class="informaltable"><table class="table">
@@ -1643,11 +1643,11 @@
signal, but the details of the <code class="computeroutput">doOnClick</code> method can be
 hidden in an implementation detail file.</p>

-<p><code class="computeroutput">doOnClick</code> �������ڹ����ϵ�Ч��
-<code class="computeroutput">onClick</code> �źŵ�
-<code class="computeroutput">connect</code> ������
-���� <code class="computeroutput">doOnClick</code>
-������ϸ�ڿ���������ϸ��ʵ���ļ��С�
+<p><code class="computeroutput">doOnClick</code> 方法现在功能上等效于
+<code class="computeroutput">onClick</code> 信号的
+<code class="computeroutput">connect</code> 方法,
+但是 <code class="computeroutput">doOnClick</code>
+方法的细节可以隐藏于细节实现文件中。
 </p>

 </div>
@@ -1657,7 +1657,7 @@
 <a name="id1279460"></a>Example: Document-View</h3>

 <h3 class="title">
-<a name="id1279460"></a>���ӣ��ĵ�-��ͼ</h3>
+<a name="id1279460"></a>例子:文档-视图</h3>

 </div></div></div>

@@ -1668,14 +1668,14 @@
   that it stores a single signal to which all of the views will be
   connected.</p>

-<p>�źſ�����ʵ�������ĵ�-��ͼ��Document-View���ܹ���
+<p>信号可用于实现灵活的文档-视图(Document-View)架构。

-  �ĵ���һ���źţ���ÿ����ͼ��Ӹ��źš�
+  文档包含一个信号,而每个视图连接该信号。

-  ����� <code class="computeroutput">Document</code>
-  �ඨ����һ��򵥵�֧�ֶ���ͼ���ı��ĵ���
+  下面的 <code class="computeroutput">Document</code>
+  类定义了一个简单的支持多视图的文本文档。

-  ע�������һ��һ���źţ�������ͼ����ӵ����źš�
+  注意它保存了一个单一的信号,所有视图都连接到该信号。
   </p>

 <pre class="programlisting">class Document
@@ -1719,12 +1719,12 @@
   constructor just connects the view to the document and the
   destructor disconnects the view.</p>

-<p>����������ǿ��Զ�����ͼ�Ļ���
-  <code class="computeroutput">View</code>��
+<p>接下来,我们可以定义视图的基类
+  <code class="computeroutput">View</code>。

-  �Ⲣ���ϸ���Ҫ�����������ĵ�-��ͼ���߼����߼�������롣
+  这并非严格需要,但它能让文档-视图的逻辑与逻辑本身分离。

-  ע�⹹�캯���������ͼ���ĵ����������Ͽ���ͼ��
+  注意构造函数仅仅连接视图到文档,而析构函数断开视图。
   </p>

 <pre class="programlisting">
@@ -1755,10 +1755,10 @@
following <code class="computeroutput">TextView</code> class provides a simple view of the
     document text.</p>

-<p>������ǿ��Կ�ʼ������ͼ��
+<p>最后,我们可以开始定义视图。

-  ����� <code class="computeroutput">TextView</code>
-  ���ṩ���ĵ��ı���һ�����ͼ��
+  下面的 <code class="computeroutput">TextView</code>
+  类提供了文档文本的一个简单视图。
   </p>

 <pre class="programlisting">class TextView : public View
@@ -1777,8 +1777,8 @@
translated into hex values using the <code class="computeroutput">HexView</code>
     view:</p>

-<p>���⣬���ǿ����ṩ�ĵ������16���ƺ����ͼ��
-    �� <code class="computeroutput">HexView</code> ��ͼ��
+<p>此外,我们可以提供文档翻译成16进制后的视图,
+    如 <code class="computeroutput">HexView</code> 视图:
     </p>

 <pre class="programlisting">class HexView : public View
@@ -1804,9 +1804,9 @@
simple <code class="computeroutput">main</code> function that sets up two views and then
     modifies the document:</p>

-<p>�����Ӻ����������һ��򵥵�
+<p>将例子合起来,下面一个简单的
   <code class="computeroutput">main</code>
-  ������������ͼ��Ȼ�����ĵ���
+  函数建立了两个视图,然后更改文档:
     </p>

 <pre class="programlisting">int main(int argc, char* argv[])
@@ -1821,9 +1821,9 @@
 <p>The complete example source, contributed by Keith MacDonald,
is available in <a href="../../../libs/signals/example/doc_view.cpp" target="_top"><code class="computeroutput">libs/signals/example/doc_view.cpp</code></a>.</p>

-<p>���������Դ������
- <a href="../../../libs/signals/example/doc_view.cpp" target="_top"><code class="computeroutput">libs/signals/example/doc_view.cpp</code></a>��
-    �� Keith MacDonald �ṩ��</p>
+<p>例子完整的源代码在
+ <a href="../../../libs/signals/example/doc_view.cpp" target="_top"><code class="computeroutput">libs/signals/example/doc_view.cpp</code></a>,
+    由 Keith MacDonald 提供。</p>

 </div>
 <div class="section" lang="en">
@@ -1831,7 +1831,7 @@
 <a name="id1279626"></a>Linking against the Signals library</h3>

 <h3 class="title">
-<a name="id1279626"></a>����źſ�</h3>
+<a name="id1279626"></a>链接信号库</h3>

 </div></div></div>

@@ -1842,12 +1842,12 @@
guide. You will need to link against the <code class="computeroutput">boost_signals</code>
   library.</p>

-<p>Boost.Signals ��Ҫ����ɶ����ƿ⣬
-  Ϊʹ���źſ⣬Ӧ�ó��������Ӹö����ƿ⡣
-  ��ο�
+<p>Boost.Signals 库要编译成二进制库,
+  为使用信号库,应用程序必须链接该二进制库。
+  请参考
<a href="../../../more/getting_started.html" target="_top">Getting Started</a>
-  ָ����
-  �㽫��Ҫ��� <code class="computeroutput">boost_signals</code> �⡣
+  指导。
+  你将需要链接 <code class="computeroutput">boost_signals</code> 库。
   </p>

 </div>
@@ -1858,8 +1858,8 @@
     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>

-      <p>���룺<a href="http://blog.csdn.net/jq0123";>����</a></p>
-      <p>���ĸ��£�2008.6.30</p>
+      <p>翻译:<a href="http://blog.csdn.net/jq0123";>金庆</a></p>
+      <p>译文更新:2008.6.30</p>

 </div></td>
 </tr></table>

Modified: trunk/libs/gil/doc/html/gildesignguide.html
==============================================================================
--- trunk/libs/gil/doc/html/gildesignguide.html (original)
+++ trunk/libs/gil/doc/html/gildesignguide.html Mon Apr 13 21:23:05 2009
@@ -20,8 +20,8 @@
 <html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">

 <head>
-    <TITLE>GIL  : ���ָ��</TITLE>
-    <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=GB2312"/>
+    <TITLE>GIL  : 设计指南</TITLE>
+    <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=UTF-8"/>
     <LINK TYPE="text/css" REL="stylesheet" HREF="adobe_source.css"/>
<LINK REL="alternate" TITLE="opensource.adobe.com RSS" HREF="http://sourceforge.net/export/rss2_projnews.php?group_id=132417&amp;rss_fulltext=1"; TYPE="application/rss+xml"/> <script src="http://www.google-analytics.com/urchin.js"; type="text/javascript">
@@ -32,49 +32,49 @@
<td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'>
 <!-- End Header -->
 <!-- Generated by Doxygen 1.4.4 -->
-<h1><a class="anchor" name="GILDesignGuide">GIL���ָ��</a></h1><dl compact><dt><b>����:</b></dt><dd>Lubomir Bourdev (<a href="mailto:lbourdev@xxxxxxxxx";>lbourdev@xxxxxxxxx</a>) �� Hailin Jin (<a href="mailto:hljin@xxxxxxxxx";>hljin@xxxxxxxxx</a>) <br>
- Adobe ϵͳ��˾ </dd></dl>
-<dl compact><dt><b>�汾:</b></dt><dd>2.1 </dd></dl>
-<dl compact><dt><b>����:</b></dt><dd>September 15, 2007</dd></dl>
+<h1><a class="anchor" name="GILDesignGuide">GIL设计指南</a></h1><dl compact><dt><b>作者:</b></dt><dd>Lubomir Bourdev (<a href="mailto:lbourdev@xxxxxxxxx";>lbourdev@xxxxxxxxx</a>) 和 Hailin Jin (<a href="mailto:hljin@xxxxxxxxx";>hljin@xxxxxxxxx</a>) <br>
+ Adobe 系统公司 </dd></dl>
+<dl compact><dt><b>版本:</b></dt><dd>2.1 </dd></dl>
+<dl compact><dt><b>日期:</b></dt><dd>September 15, 2007</dd></dl>
 <p>
-GIL��һ����㷨�Ƕȳ���ͼ��ӿڵ�C++�����,���ĵ�������GIL���������. ���ĵ�������ԶԶ��������μ򵥵�ʹ��GIL����Ҫ��֪ʶ. ��GIL����ҳ��,������ҵ�һ��ʹ��GIL�Ŀ������ <a href="http://opensource.adobe.com/gil";>http://opensource.adobe.com/gil</a><p> -(����ע:������image view��view��������,��ʵ���Ƕ���image view�ĺ���.Ϊ�˷���,����ͳһʹ��ͼ����ͼ)<p> +GIL是一个从算法角度抽象图像接口的C++函数库,本文档描述了GIL的设计理念. 本文 档的内容远远超过了如何简单的使用GIL所需要的知识. 在GIL的主页上,你可以找到一 个使用GIL的快速起点 <a href="http://opensource.adobe.com/gil";>http://opensource.adobe.com/gil</a><p> +(译者注:本文中image view和view经常混用,其实它们都是image view的含义.为了方 便,我们统一使用图像视图)<p>
 <ul>
-<li><a class="el" href="gildesignguide.html#OverviewSectionDG">1. ����</a></li><li><a class="el" href="gildesignguide.html#ConceptsSectionDG">2. ����Concept</a></li><li><a class="el" href="gildesignguide.html#PointSectionDG">3. ��</a></li><li><a class="el" href="gildesignguide.html#ChannelSectionDG">4. ͨ��</a></li><li><a class="el" href="gildesignguide.html#ColorSpaceSectionDG">5. ��ɫ�ռ�Ͳ���</a></li><li><a class="el" href="gildesignguide.html#ColorBaseSectionDG">6. ��ɫ��</a></li><li><a class="el" href="gildesignguide.html#PixelSectionDG">7. ����</a></li><li><a class="el" href="gildesignguide.html#PixelIteratorSectionDG">8. ���ص����</a><ul> -<li><a class="el" href="gildesignguide.html#FundamentalIteratorDG">������</a></li><li><a class="el" href="gildesignguide.html#IteratorAdaptorDG">���������</a></li><li><a class="el" href="gildesignguide.html#PixelDereferenceAdaptorAG">���ؽ�����������</a></li><li><a class="el" href="gildesignguide.html#StepIteratorDG">Step �����</a></li><li><a class="el" href="gildesignguide.html#LocatorDG">���ض�λ��</a></li><li><a class="el" href="gildesignguide.html#IteratorFrom2DDG">2άͼ������</a></li></ul> -</li><li><a class="el" href="gildesignguide.html#ImageViewSectionDG">9. ͼ����ͼ</a><ul> -<li><a class="el" href="gildesignguide.html#ImageViewFrowRawDG">�������ش���ͼ����ͼ</a></li><li><a class="el" href="gildesignguide.html#ImageViewFrowImageViewDG">������ͼ����ͼ����ͼ����ͼ</a></li></ul> -</li><li><a class="el" href="gildesignguide.html#ImageSectionDG">10. ͼ��</a></li><li><a class="el" href="gildesignguide.html#VariantSecDG">11. ����ʱָ�ɵ�ͼ���ͼ����ͼ</a></li><li><a class="el" href="gildesignguide.html#MetafunctionsDG">12. �ḻ��Ԫ�����Typedefs</a></li><li><a class="el" href="gildesignguide.html#IO_DG">13. I/O �չ</a></li><li><a class="el" href="gildesignguide.html#SampleImgCodeDG">14. ʾ�����</a><ul> -<li><a class="el" href="gildesignguide.html#PixelLevelExampleDG">���ؼ���ʾ�����</a></li><li><a class="el" href="gildesignguide.html#SafeAreaExampleDG">�Ӱ�ȫ����������ͼ����</a></li><li><a class="el" href="gildesignguide.html#HistogramExampleDG">��״ͼ</a></li><li><a class="el" href="gildesignguide.html#ImageViewsExampleDG">ʹ����ͼ</a></li></ul> -</li><li><a class="el" href="gildesignguide.html#ExtendingGIL_DG">15. �չGIL</a><ul> -<li><a class="el" href="gildesignguide.html#NewColorSpacesDG">�����µ���ɫ�ռ�</a></li><li><a class="el" href="gildesignguide.html#NewColorConversionDG">������ɫ�任 </a></li><li><a class="el" href="gildesignguide.html#NewChannelsDG">�����µ���ɫͨ������</a></li><li><a class="el" href="gildesignguide.html#NewImagesDG">�����µ�ͼ����ͼ</a></li></ul> -</li><li><a class="el" href="gildesignguide.html#TechnicalitiesDG">16. ר�ż���</a></li><li><a class="el" href="gildesignguide.html#ConclusionDG">17. ����</a></li></ul> +<li><a class="el" href="gildesignguide.html#OverviewSectionDG">1. 概述 </a></li><li><a class="el" href="gildesignguide.html#ConceptsSectionDG">2. 关于Concept</a></li><li><a class="el" href="gildesignguide.html#PointSectionDG">3. 点</a></li><li><a class="el" href="gildesignguide.html#ChannelSectionDG">4. 通道</a></li><li><a class="el" href="gildesignguide.html#ColorSpaceSectionDG">5. 颜色空间和布局 </a></li><li><a class="el" href="gildesignguide.html#ColorBaseSectionDG">6. 颜色基</a></li><li><a class="el" href="gildesignguide.html#PixelSectionDG">7. 像素</a></li><li><a class="el" href="gildesignguide.html#PixelIteratorSectionDG">8. 像素迭代器</a><ul> +<li><a class="el" href="gildesignguide.html#FundamentalIteratorDG">基本迭代 器</a></li><li><a class="el" href="gildesignguide.html#IteratorAdaptorDG">迭 代适配器</a></li><li><a class="el" href="gildesignguide.html#PixelDereferenceAdaptorAG">像素解引用适配器 </a></li><li><a class="el" href="gildesignguide.html#StepIteratorDG">Step 迭 代器</a></li><li><a class="el" href="gildesignguide.html#LocatorDG">像素定位 器</a></li><li><a class="el" href="gildesignguide.html#IteratorFrom2DDG">2维 图像迭代器</a></li></ul> +</li><li><a class="el" href="gildesignguide.html#ImageViewSectionDG">9. 图 像视图</a><ul> +<li><a class="el" href="gildesignguide.html#ImageViewFrowRawDG">从裸像素创 建图像视图</a></li><li><a class="el" href="gildesignguide.html#ImageViewFrowImageViewDG">从其他图像视图创建图像视 图</a></li></ul> +</li><li><a class="el" href="gildesignguide.html#ImageSectionDG">10. 图像 </a></li><li><a class="el" href="gildesignguide.html#VariantSecDG">11. 运行 时指派的图像和图像视图</a></li><li><a class="el" href="gildesignguide.html#MetafunctionsDG">12. 丰富的元函数和 Typedefs</a></li><li><a class="el" href="gildesignguide.html#IO_DG">13. I/O 扩展</a></li><li><a class="el" href="gildesignguide.html#SampleImgCodeDG">14. 示例代码</a><ul> +<li><a class="el" href="gildesignguide.html#PixelLevelExampleDG">像素级别示 例代码</a></li><li><a class="el" href="gildesignguide.html#SafeAreaExampleDG">从安全缓冲区创建的视图拷贝 </a></li><li><a class="el" href="gildesignguide.html#HistogramExampleDG">柱 状图</a></li><li><a class="el" href="gildesignguide.html#ImageViewsExampleDG">使用视图</a></li></ul> +</li><li><a class="el" href="gildesignguide.html#ExtendingGIL_DG">15. 扩展 GIL</a><ul> +<li><a class="el" href="gildesignguide.html#NewColorSpacesDG">定义新的颜色 空间</a></li><li><a class="el" href="gildesignguide.html#NewColorConversionDG">重载颜色变换</a></li><li><a class="el" href="gildesignguide.html#NewChannelsDG">定义新的颜色通道类型 </a></li><li><a class="el" href="gildesignguide.html#NewImagesDG">定义新的图 像视图</a></li></ul> +</li><li><a class="el" href="gildesignguide.html#TechnicalitiesDG">16. 专门 技术</a></li><li><a class="el" href="gildesignguide.html#ConclusionDG">17. 结论</a></li></ul>
 <p>
 <br>
  <hr>
  <h2><a class="anchor" name="OverviewSectionDG">
-1. ����</a></h2>
-���κ�ͼ����,�Ӿ����Ƶ����Ĺ�����,ͼ���Ǻܻ�ĸ���. ����ͼ���ڱ����ϵ�ǧ�����ʹ���㷨����������ͨ���ָ�Ч. �ڱ�����,���ǽ�����һЩ������Ե���ս.<p>�������������,ͼ�񽫱���Ϊ���ص�һ��2ά����. ������һ����ɫͨ��ļ���, ���ͼ����ָ�������ɫ. ÿ��ͨ������ɫ�����һ��ֵ. �������ͨ�õ�ͼ���ڴ�ṹ. Interleavedͼ��, �����Ƿ������, ͨ���Ǽ��洢��, ��planarͼ��, ��ͬ��ͨ����ڲ�ͬ����ɫ����. ������һ��4x3 RGB ���͵�ͼ��,��һ�еĵڶ������ر����Ϊ��ɫ, �� interleaved �͵�:<p>
+1. 概述</a></h2>
+在任何图像处理,视觉和视频处理的工程中,图像都是很基本的概念. 但是图像在表现 上的千差万别使其算法代码很难做到既通用又高效. 在本节中,我们将描述一些我们面 对的挑战.<p>在下面的讨论中,图像将被视为像素的一个2维数组. 像素是一个颜色通道 的集合, 代表图像中指定点的颜色. 每个通道代表颜色组件的一个值. 存在两种通用的 图像内存结构. Interleaved图像, 像素是分组连续, 通道是间隔存储的, 而planar图 像, 不同的通道存在不同的颜色面上. 下面是一个4x3 RGB 类型的图像,第一行的第二 个像素被标记为红色, 是 interleaved 型的:<p>
 <div align="center">
 <img src="interleaved.jpg" alt="interleaved.jpg">
 </div>
- �������planar�͵�:<p>
+ 而这个是planar型的:<p>
 <div align="center">
 <img src="planar.jpg" alt="planar.jpg">
 </div>
 <p>
-Ҫע����ܵ��ж��뵼����ĩ�Ŀհ����. <p>
-GIL�ṩ��ͼ��ģ�Ϳ���Ӧ�����µı仯:<ul>
-<li>�ṹ��(planar �� interleaved)</li><li>��ɫ�ռ��alpha��ʾ (RGB, RGBA, CMYK, �ȵ�.)</li><li>��ɫͨ����� (8λ, 16λ, �ȵ�.)</li><li>ͨ��Ĵ���(RGB �� BGR, �ȵ�.)</li><li>�ж������ (û�ж���,�ֶ���, �ȵ�.)</li></ul>
+要注意可能的行对齐导致行末的空白填充. <p>
+GIL提供的图像模型可以应对如下的变化:<ul>
+<li>结构性(planar 和 interleaved)</li><li>颜色空间和alpha表示 (RGB, RGBA, CMYK, 等等.)</li><li>颜色通道深度 (8位, 16位, 等等.)</li><li>通道的次序(RGB 和 BGR, 等等.)</li><li>行对齐策略 (没有对齐,字对齐, 等等.)</li></ul>
 <p>
-GIL��֧���û������ͼ��ģ��,�Լ�����������ʱָ����ͼ������. GIL���㷨�ĽǶȳ�����ͼ��ı���, �������ֻ����дһ��, �Ϳ���ʹ֮�����ڸ���ͼ��������, �������Ŀ�ִ�д����ٶ�,���Ժ�����ض�ͼ�����͵���д����������.<p> -���ĵ���ѭ�Զ����ϵ����ԭ��. ÿ�ڶ���ĸ�������һ�ڶ���ĸ���֮��. �Ƽ��㰴�սڵĴ����Ķ���ĵ�.<p> +GIL还支持用户定义的图像模型,以及参数在运行时指定的图像类型. GIL从算法的角度 抽象了图像的表现, 这样代码只需书写一次, 就可以使之工作在各种图像类型上, 而其 产生的可执行代码速度,可以和针对特定图像类型的手写代码相媲美.<p> +本文档遵循自顶向上的设计原则. 每节定义的概念建立在上一节定义的概念之上. 推 荐你按照节的次序阅读本文档.<p>
 <hr>
  <h2><a class="anchor" name="ConceptsSectionDG">
-2. ����Concept</a></h2>
-���е�GIL���춼��GIL�����ģ��. ������Ϊ�˷����㷨��ȷ��Ӧ��,һ������(����һ���������)���������һ�����. ��Щ����������ʽ���㷨����. ����,GIL���� <code>pixel</code> �� GIL ���� PixelConcept��ģ��. �û�����ʹ���Լ��������滻 <code>pixel</code>. ֻҪ���ܹ�����<code>PixelConcept</code>��Ҫ��, ���������GIL ���ͺ��㷨������ʹ��. �����и��������Ϣ <a href="http://www.generic-programming.org/languages/conceptcpp/";>http://www.generic-programming.org/languages/conceptcpp/</a><p> -���ǽ�ʹ��������ʽ�������,����C++0x ��׼�����һ����ڸ�����չ: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf";>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf</a><p> -�����и���GILʹ�õĸ����,��󲿷ֶ�������: <a href="http://www.generic-programming.org/languages/conceptcpp/concept_web.php";>http://www.generic-programming.org/languages/conceptcpp/concept_web.php</a><p>
+2. 关于Concept</a></h2>
+所有的GIL构造都是GIL概念的模型. 概念是为了泛型算法正确的应用,一个类型(或者 一组相关类型)必须满足的一组条件. 这些条件包括语法形式和算法运算. 例如,GIL类 型 <code>pixel</code> 是 GIL 概念 PixelConcept的模型. 用户可以使用自己的类型 替换<code>pixel</code>. 只要它能够满足<code>PixelConcept</code>的要求, 所有 其他的GIL 类型和算法都可以使用. 这里有更多概念的信息 <a href="http://www.generic-programming.org/languages/conceptcpp/";>http://www.generic-programming.org/languages/conceptcpp/</a><p> +我们将使用语法的形式定义概念,这是C++0x 标准定义的一个关于概念的扩展: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf";>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf</a><p> +这里有更多的GIL使用的概念定义,绝大部分都在这里: <a href="http://www.generic-programming.org/languages/conceptcpp/concept_web.php";>http://www.generic-programming.org/languages/conceptcpp/concept_web.php</a><p> <div class="fragment"><pre class="fragment"><span class="keyword">auto</span> concept DefaultConstructible&lt;typename T&gt; {
     T::T();
 };
@@ -101,27 +101,27 @@
     <span class="keywordtype">void</span> swap(T&amp; t, T&amp; u);
 };
 </pre></div><p>
-�����Ǹ��ӵ�GIL��Ҫ�Ļ����:<p>
+这里是附加的GIL需要的基本概念:<p>
<div class="fragment"><pre class="fragment"><span class="keyword">auto</span> concept Regular&lt;typename T&gt; : DefaultConstructible&lt;T&gt;, CopyConstructible&lt;T&gt;, EqualityComparable&lt;T&gt;, Assignable&lt;T&gt;, Swappable&lt;T&gt; {};

 <span class="keyword">auto</span> concept Metafunction&lt;typename T&gt; {
     <span class="keyword">typename</span> type;
 };
 </pre></div><h2><a class="anchor" name="PointSectionDG">
-3. ��</a></h2>
-һ��㶨����ͼ�������ص�λ��, ��Ҳ�����������ͼ���ά��. ����ͨ�õĽǶȿ�, 
����N-ά��,�������и����Ҫ��:<p>
+3. 点</a></h2>
+一个点定义了图像中像素的位置, 它也可以用来描述图像的维度. 从最通用的角度 看, 点是N-维的,满足下列概念的要求:<p> <div class="fragment"><pre class="fragment">concept PointNDConcept&lt;typename T&gt; : Regular&lt;T&gt; {
-    <span class="comment">// ÿ�������궨��</span>
+    <span class="comment">// 每个轴的坐标定义</span>
<span class="keyword">template</span> &lt;size_t K&gt; <span class="keyword">struct </span>axis; where Metafunction&lt;axis&gt;;

     <span class="keyword">const</span> size_t num_dimensions;

-    <span class="comment">// ����/�޸� ÿ�������ֵ.</span>
+    <span class="comment">// 访问/修改 每个轴的数值.</span>
<span class="keyword">template</span> &lt;size_t K&gt; <span class="keyword">const</span> <span class="keyword">typename</span> axis&lt;K&gt;::type&amp; T::axis_value() <span class="keyword">const</span>; <span class="keyword">template</span> &lt;size_t K&gt; <span class="keyword">typename</span> axis&lt;K&gt;::type&amp; T::axis_value();
 };
 </pre></div><p>
-GIL ʹ��2ά��, ���Ǹ��� <code>PointNDConcept</code> ��һ��ǿ��,Ҫ��ÿά��������ͱ�������ͬ��:<p> +GIL 使用2维点, 它是概念 <code>PointNDConcept</code> 的一个强化,要求每维的数 据类型必须是相同的:<p> <div class="fragment"><pre class="fragment">concept Point2DConcept&lt;typename T&gt; : PointNDConcept&lt;T&gt; {
     where num_dimensions == 2;
     where SameType&lt;axis&lt;0&gt;::type, axis&lt;1&gt;::type&gt;;
@@ -134,34 +134,34 @@
     value_type x,y;
 };
 </pre></div><p>
-<b>��ظ���:</b><p>
+<b>相关概念:</b><p>
 <ul>
 <li>PointNDConcept&lt;T&gt;</li><li>Point2DConcept&lt;T&gt;</li></ul>
 <p>
-<b>ģ��:</b><p>
-GIL �ṩ�� <code>Point2DConcept</code>��һ��ģ��<code>point2&lt;T&gt;</code>,����<code>T</code> ����������. .<p>
+<b>模型:</b><p>
+GIL 提供了 <code>Point2DConcept</code>的一个模型 <code>point2&lt;T&gt;</code>,其中<code>T</code> 是坐标的类型. .<p>
 <hr>
  <h2><a class="anchor" name="ChannelSectionDG">
-4. ͨ��</a></h2>
-ͨ��ָʾ��ɫ�����ǿ��(����, RGB�����еĺ�ɫͨ��). ���͵�ͨ���������ȡ,�ȽϺ�����ͨ���ֵ. ͨ����������Сֵ.GIL��ͨ�������¸����ģ��:<p>
+4. 通道</a></h2>
+通道指示颜色组件的强度(例如, RGB像素中的红色通道). 典型的通道操作包括获 取,比较和设置通道的值. 通道有最大和最小值.GIL的通道是以下概念的模型:<p> <div class="fragment"><pre class="fragment">concept ChannelConcept&lt;typename T&gt; : EqualityComparable&lt;T&gt; { - <span class="keyword">typename</span> value_type = T; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::value_type ����</span> + <span class="keyword">typename</span> value_type = T; <span class="comment">// 使用 channel_traits&lt;T&gt;::value_type 访问 </span>
        where ChannelValueConcept&lt;value_type&gt;;
- <span class="keyword">typename</span> reference = T&amp;; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::reference ����</span> - <span class="keyword">typename</span> pointer = T*; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::pointer ����</span> - <span class="keyword">typename</span> const_reference = <span class="keyword">const</span> T&amp;; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::const_reference ����</span> - <span class="keyword">typename</span> const_pointer = <span class="keyword">const</span> T*; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::const_pointer ����</span> - <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_mutable; <span class="comment">// ʹ�� channel_traits&lt;T&gt;::is_mutable ����</span> + <span class="keyword">typename</span> reference = T&amp;; <span class="comment">// 使用 channel_traits&lt;T&gt;::reference 访问</span> + <span class="keyword">typename</span> pointer = T*; <span class="comment">// 使用 channel_traits&lt;T&gt;::pointer 访问</span> + <span class="keyword">typename</span> const_reference = <span class="keyword">const</span> T&amp;; <span class="comment">// 使用 channel_traits&lt;T&gt;::const_reference 访问</span> + <span class="keyword">typename</span> const_pointer = <span class="keyword">const</span> T*; <span class="comment">// 使用 channel_traits&lt;T&gt;::const_pointer 访问</span> + <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_mutable; <span class="comment">// 使用 channel_traits&lt;T&gt;::is_mutable 访问</span>

- <span class="keyword">static</span> T min_value(); <span class="comment">// ʹ�� channel_traits&lt;T&gt;::min_value ����</span> - <span class="keyword">static</span> T max_value(); <span class="comment">// ʹ�� channel_traits&lt;T&gt;::min_value ����</span> + <span class="keyword">static</span> T min_value(); <span class="comment">// 使用 channel_traits&lt;T&gt;::min_value 访问</span> + <span class="keyword">static</span> T max_value(); <span class="comment">// 使用 channel_traits&lt;T&gt;::min_value 访问</span>
 };

concept MutableChannelConcept&lt;ChannelConcept T&gt; : Swappable&lt;T&gt;, Assignable&lt;T&gt; {};

 concept ChannelValueConcept&lt;ChannelConcept T&gt; : Regular&lt;T&gt; {};
 </pre></div><p>
-GIL����ʹ���ڽ������ͺ͸�������Ϊͨ������. ���������ͱ�ͷ�Χ��Ϣ����ʹ��<code>channel_traits</code> ����, 
���Ĭ�ϵ�ʵ��:<p>
+GIL允许使用内建的整型和浮点型作为通道类型. 因此其相关型别和范围信息可以使用 <code>channel_traits</code> 定义, 获得默认的实现:<p>
 <div class="fragment"><pre class="fragment"><span class="keyword">tem

==============================================================================
Diff truncated at 200k characters

Other related posts:

  • » [boost-doc-zh commit] r242 - 所有GB2312编码改为UTF-8. - codesite-noreply