[boost-doc-zh] r411 committed - [No log message]

  • From: boost-doc-zh@xxxxxxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Thu, 10 Jun 2010 15:23:51 +0000

Revision: 411
Author: alai04
Date: Thu Jun 10 08:23:31 2010
Log: [No log message]
http://code.google.com/p/boost-doc-zh/source/detail?r=411

Modified:
 /trunk/libs/functional/factory/doc/factory.qbk
 /trunk/libs/functional/factory/doc/html/index.html

=======================================
--- /trunk/libs/functional/factory/doc/factory.qbk      Thu Jun 10 07:01:12 2010
+++ /trunk/libs/functional/factory/doc/factory.qbk      Thu Jun 10 08:23:31 2010
@@ -40,46 +40,42 @@
 [def __value_factory__ `value_factory`]


-[section Brief Description(简介)]
+[section:brief_description Brief Description(简介)]

 The template __boost__factory__ lets you encapsulate a `new` expression
 as a function object, __boost__value_factory__ encapsulates a constructor
-invocation without `new`.
-
+invocation without `new`.\n
 模板 __boost__factory__可令你以函数对象(仿函数)形式来封装 `new` 表达式,
 而 __boost__value_factory__ 则可以非 `new` 的形式调用构造函数


     __boost__factory__<T*>()(arg1,arg2,arg3)
     // same as new T(arg1,arg2,arg3)
-       // 如同调用 new T(arg1,arg2,arg3)
+    // 如同调用 new T(arg1,arg2,arg3)

     __boost__value_factory__<T>()(arg1,arg2,arg3)
     // same as T(arg1,arg2,arg3)
-       //如同调用 T(arg1,arg2,arg3)
+    //如同调用 T(arg1,arg2,arg3)

 For technical reasons the arguments to the function objects have to be
 LValues. A factory that also accepts RValues can be composed using the
-__boost__forward_adapter__ or __boost__bind__.
-
+__boost__forward_adapter__ or __boost__bind__.\n
出于技术原因的考虑,调用函数对象的参数必须是左值。使用 __boost__forward_adapter__
 或 __boost__bind__ 也可组装成接受右值的工厂类。

 [endsect]

-[section Background(背景介绍)]
+[section:background Background(背景介绍)]

In traditional Object Oriented Programming a Factory is an object implementing an interface of one or more methods that construct objects conforming to known
-interfaces.
-
+interfaces.\n
在传统的面向对象编程中,工厂是一个可通过一(或多)个方法构造符合要求对象的 对象。

     // assuming a_concrete_class and another_concrete_class are derived
-    // from an_abstract_class
-
-       //假定具体实现类 a_concrete_class 和 another_concrete_class 都从抽象基类
-       //an_abstract_class 派生
+    // from an_abstract_class
+    // 假定具体实现类 a_concrete_class 和 another_concrete_class 都
+    // 从抽象基类 an_abstract_class 派生

     class a_factory
     {
@@ -129,8 +125,7 @@
 This approach has several drawbacks. The most obvious one is that there is
 lots of boilerplate code. In other words there is too much code to express
 a rather simple intention. We could use templates to get rid of some of it
-but the approach remains inflexible:
-
+but the approach remains inflexible: \n
 以上实现方法有几个缺点,最明显者就是有太多重复死板的代码。换言之,如此多的
 代码与要实现的简单目的相比有些小题大做。使用模板可避免以上某些缺点,
 但仍不够灵活:
@@ -146,22 +141,20 @@
    an object on the stack, and
  o finally we might want to use customized memory management.

- o 可能需要工厂接受参数后能转发(非拷贝语义)至构造函数,
- o 需要工厂能够产生 smart pointer (智能指针),
- o 需要(工厂具备 )多个成员函数以产生不同类型的对象,
- o 对于产生的对象而言,甚至多态基类也可能不是必须的,
- o 我们将会看到,工厂完全不需要一个公共的基类,
- o 所需的仅仅是调用构造函数,能够在栈上构造而非调用 'new' 并且
- o 除此之外还能够进行定制化的内存管理。
+* 可能需要工厂接受参数后能转发(非拷贝语义)至构造函数,
+* 需要工厂能够产生 smart pointer (智能指针),
+* 需要(工厂具备 )多个成员函数以产生不同类型的对象,
+* 对于产生的对象而言,甚至多态基类也可能不是必须的,
+* 我们将会看到,工厂完全不需要一个公共的基类,
+* 所需的仅仅是调用构造函数,能够在栈上构造而非调用 `new` 并且
+* 除此之外还能够进行定制化的内存管理。


Experience has shown that using function objects and generic Boost components
 for their composition, Design Patterns that describe callback mechasisms
 (typically requiring a high percentage of boilerplate code with pure Object
Oriented methodology) become implementable with just few code lines and without
-extra classes.
-
-
+extra classes. \n
经验告诉我们,使用函数对象(仿函数)和 Boost 泛型组件组合来实现回调机制的设 计模式, 无需额外的类,寥寥数行即可完。相比之下同样的功能在纯面向对象方法实现中通常 需要大量
 的呆板代码。
@@ -170,20 +163,17 @@
 Factories are callback mechanisms for constructors, so we provide two class
 templates, __boost__value_factory__ and __boost__factory__, that encasulate
 object construction via direct application of the constructor and the `new`
-operator, respectively.
-
+operator, respectively. \n
工厂即是对构造函数的一种回调机制,对应于此本库提供了两个类模板, __boost__value_factory__ 和 __boost__factory__,对应封装了直接使用构造函数和 `new` 操作符对对象的构 造。

 We let the function objects forward their arguments to the construction
 expressions they encapsulate. Overthis __boost__factory__ optionally allows
-the use of smart pointers and __std_allocators__.
-
+the use of smart pointers and __std_allocators__.\n
 我们令函数对象将接受到的参数转发(非拷贝语意)至其封装的构造函数,因此
__boost__factory__ 是可以使用 smart pointer (智能指针)和 __std_allocators__的。

-Compile-time polymorphism can be used where appropriate,
-
+Compile-time polymorphism can be used where appropriate,\n
 如果条件允许,亦可使用编译期多态,

     template< class T >
@@ -194,17 +184,15 @@

         // for conceptually similar objects x we neither need virtual
         // functions nor a common base class in this context.
-
-               // 在此语境中,对于构造函数调用与对象 x 类似者,既不需要虚函数
-               // 也不需要公共的基类。
+        // 在此语境中,对于构造函数调用与对象 x 类似者,既不需要虚函数
+        // 也不需要公共的基类。

                // [...]
     }

Now, to allow inhomogenous signaturs for the constructors of the types passed in for `T` we can use __value_factory__ and __boost__bind__ to normalize between
-them.
-
+them. \n
现在,为将不同类型签名式的类型传入类型 `T` 的构造函数,可使用 __value_factory__
 和 __boost__bind__ 来作出一致的处理。

@@ -216,9 +204,8 @@

         // for conceptually similar objects x we neither need virtual
         // functions nor a common base class in this context.
-
-               // 在此语境中,对于构造函数调用与对象 x 类似者,既不需要虚函数
-               // 也不需要公共的基类。
+        // 在此语境中,对于构造函数调用与对象 x 类似者,既不需要虚函数
+        // 也不需要公共的基类。

                // [...]
     }
@@ -230,14 +217,13 @@
         do_something(__boost__value_factory__<X>());
         do_something(boost::bind(__boost__value_factory__<Y>(),_1,5,_2));
         // construct X(a,b) and Y(a,5,b), respectively.
-               // 相应的构造 X(a,b) 和 Y(a,5,b)。
+        // 相应的构造 X(a,b) 和 Y(a,5,b)。

         // [...]
     }

 Maybe we want our objects to outlive the function's scope, in this case we
-have to use dynamic allocation;
-
+have to use dynamic allocation;\n
 也许我们需要构建的对象的生命周期长于函数作用域,此时需要动态分配;

     template< class Factory >
@@ -253,30 +239,27 @@
         // above.
         // Note that we are also free to have the type erasure happen
         // somewhere else (e.g. in the constructor of this function's
-        // result type).
-
-               // 同上,无需公共基类或虚函数,可通过使用
-               // 形如 boost::shared_ptr<base>
-               // 而不是 typename Factory::result_type
-               // 的代码来确保产生的对象有共同的多态基类。
-               // 请注意到我们也可任意决定究竟何处才进行向上转型(而丢失实际类型)
-               // (比如在此函数返回值类型的构造函数中进行)
+        // result type).
+        // 同上,无需公共基类或虚函数,可通过使用
+        // 形如 boost::shared_ptr<base>
+        // 而不是 typename Factory::result_type
+        // 的代码来确保产生的对象有共同的多态基类。
+        // 请注意到我们也可任意决定究竟何处才进行向上转型(而丢失实际类型)
+        // (比如在此函数返回值类型的构造函数中进行)

         // [...]
     }

     // [... call do_something like above but with __factory__ instead
     // of __value_factory__]
-
-       // [... 如同前例一般调用 do_something ,仅将 __value_factory__
-       // 替换成 __factory__]
+    // [... 如同前例一般调用 do_something ,仅将 __value_factory__
+    // 替换成 __factory__]

 Although we might have created polymorphic objects in the previous example,
 we have used compile time polymorphism for the factory. If we want to erase
 the type of the factory and thus allow polymorphism at run time, we can
 use __boost_function__ to do so. The first example can be rewritten as
-follows.
-
+follows.\n
尽管前例中我们建立了多态的对象,但仍在工厂中使用了编译期多态。如果希望在工 厂中 隐藏具体类型而达到运行期多态,则可使用 __boost_function__ 来完成。前例可重 写如下。

@@ -298,8 +281,7 @@
     }

 Of course we can just as easy create factories that take arguments and/or
-return __smart_pointers__.
-
+return __smart_pointers__.\n
 当然也可简单地建立能够接受/返回 __smart_pointers__ (智能指针)的工厂。

 [endsect]
@@ -312,14 +294,13 @@

 [heading Description(概述)]

-Function object template that invokes the constructor of the type `T`.
-
+Function object template that invokes the constructor of the type `T`.\n
 调用类型 `T` 构造函数的函数对象模板。

 [heading Header(头文件)]
     #include <boost/functional/value_factory.hpp>

-[heading Synopsis(摘要)]
+[heading:synopsis Synopsis(摘要)]

     namespace boost
     {
@@ -328,31 +309,34 @@
     }

 [variablelist Notation(表示法)
-    [[`T`]         [an arbitrary type with at least one public constructor
-                                       有至少一个 public 构造函数的任意类]]
-    [[`a0`...`aN`] [argument LValues to a constructor of `T`
-                                       调用 `T` 构造函数的诸左值参数]]
-    [[`F`]         [the type `value_factory<F>`
-                                       `value_factory<F>`的类型]]
-    [[`f`]         [an instance object of `F`
-                                        `F` 类的一个对象实例]]
+ [[`T`] [an arbitrary type with at least one public constructor\n
+    有至少一个 public 构造函数的任意类]]
+    [[`a0`...`aN`] [argument LValues to a constructor of `T`\n
+    调用 `T` 构造函数的诸左值参数]]
+    [[`F`]         [the type `value_factory<F>`\n
+    `value_factory<F>`的类型]]
+    [[`f`]         [an instance object of `F`\n
+    `F` 类的一个对象实例]]
 ]

 [heading Expression Semantics(表达式语义)]

 [table
     [[Expression(表达式)]       [Semantics(语义)]]
- [[`F()`] [creates an object of type `F`. 建立类型 `F` 的一个 对象。]] - [[`F(f)`] [creates an object of type `F`. 建立类型 `F` 的一个 对象。]]
-    [[`f(a0`...`aN)`]   [returns `T(a0`...`aN)`. 返回`T(a0`...`aN)`。]]
-    [[`F::result_type`] [is the type `T`.  `T`的类型]]
+    [[`F()`]            [creates an object of type `F`. \n
+    建立类型 `F` 的一个对象。]]
+    [[`F(f)`]           [creates an object of type `F`. \n
+    建立类型 `F` 的一个对象。]]
+    [[`f(a0`...`aN)`]   [returns `T(a0`...`aN)`. \n
+    返回`T(a0`...`aN)`。]]
+    [[`F::result_type`] [is the type `T`.  \n
+    `T`的类型]]
 ]

 [heading Limits(限制)]

The macro BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY can be defined to set the
-maximum arity. It defaults to 10.
-
+maximum arity. It defaults to 10.\n
可定义 BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 宏来决定工厂可接受的最多参 数值,
 默认值是10。

@@ -366,8 +350,7 @@
 Function object template that dynamically constructs a pointee object for
 the type of pointer given as template argument. Smart pointers may be used
for the template argument, given that `boost::pointee<Pointer>::type` yields
-the pointee type.
-
+the pointee type.\n
根据给定的模板参数来动态构建类指针类对象的函数对象模板。可使用 Smart pointer (智能指针)作为模板参数,对于 boost 中提供的类指针 类,`boost::pointee<Pointer>::type`
 类型优先于类指针类本身的类型。
@@ -377,8 +360,7 @@
 A function object that calls the destructor and deallocates the memory
 with a copy of the Allocator is used for the second constructor argument
 of `Pointer` (thus it must be a __smart_pointer__ that provides a suitable
-constructor, such as __boost__shared_ptr__).
-
+constructor, such as __boost__shared_ptr__).\n
若给定了 __allocator__ (分配器)参数,则其作为 `new` 操作符构建对象时分 配、及其就地分配形式 的内存管理之用。一个带有 Allocator (分配器)拷贝并用于调用析构函数、回收内 存的函数对象将 作为第二个参数传递给 `Pointer` 类的构造函数(要求一个 __smart_pointer__ (智能指针)必须有
@@ -387,8 +369,7 @@
 If a third template argument is `factory_passes_alloc_to_smart_pointer`,
the allocator itself is used for the third constructor argument of `Pointer`
 (__boost__shared_ptr__ then uses the allocator to manage the memory of its
-seperately allocated reference counter).
-
+seperately allocated reference counter).\n
 若给定了 `factory_passes_alloc_to_smart_pointer` 作为第三个模板参数,则
allocator(分配器)本身将作为第三个参数传递给 `Pointer` 类 (__boost__shared_ptr__
 将使用此 allocator(分配器)用于其进行引用计数器的独立分配的内存的管理)。
@@ -414,35 +395,37 @@
     }

 [variablelist Notation(表示法)
-    [[`T`]         [an arbitrary type with at least one public constructor]
-                                       有至少一个 public 构造函数的任意类]]
-    [[`P`]         [pointer or smart pointer to `T`
-                                       指向 `T` 的指针或 smart pointer (智能指针)]]
-    [[`a0`...`aN`] [argument LValues to a constructor of `T`
-                                       调用 `T` 构造函数的诸左值参数]]
-    [[`F`]         [the type `factory<P>`
-                                       `factory<P>` 的类型]]
-       [[`f`]         [an instance object of `F`
-                                        `F` 类的一个对象实例]]
+ [[`T`] [an arbitrary type with at least one public constructor\n
+    有至少一个 public 构造函数的任意类]]
+    [[`P`]         [pointer or smart pointer to `T`\n
+    指向 `T` 的指针或 smart pointer (智能指针)]]
+    [[`a0`...`aN`] [argument LValues to a constructor of `T`\n
+    调用 `T` 构造函数的诸左值参数]]
+    [[`F`]         [the type `factory<P>`\n
+    `factory<P>` 的类型]]
+       [[`f`]         [an instance object of `F`\n
+    `F` 类的一个对象实例]]
 ]

 [heading Expression Semantics(表达式语义)]

 [table
     [[Expression(表达式)]       [Semantics(语义)]]
- [[`F()`] [creates an object of type `F`. 建立类型 `F` 的一个 对象。]] - [[`F(f)`] [creates an object of type `F`. 建立类型 `F` 的一个 对象。]]
+    [[`F()`]            [creates an object of type `F`. \n
+    建立类型 `F` 的一个对象。]]
+    [[`F(f)`]           [creates an object of type `F`. \n
+    建立类型 `F` 的一个对象。]]
     [[`f(a0`...`aN)`]   [dynamically creates an object of type `T` using
-        `a0`...`aN` as arguments for the constructor invocation.
-               使用  `a0`...`aN` 作为参数调用构造函数动态建立一个 `T` 类型的对象。]]
- [[`F::result_type`] [is the type `P` with top-level cv-qualifiers removed. `P` 的类型,但顶级的 cv 限定词被移除。]]
+        `a0`...`aN` as arguments for the constructor invocation.\n
+ 使用 `a0`...`aN` 作为参数调用构造函数动态建立一个 `T` 类型的对象。 ]] + [[`F::result_type`] [is the type `P` with top-level cv-qualifiers removed. \n
+    `P` 的类型,但顶级的 cv 限定词被移除。]]
 ]

 [heading Limits(限制)]

 The macro BOOST_FUNCTIONAL_FACTORY_MAX_ARITY can be defined to set the
-maximum arity. It defaults to 10.
-
+maximum arity. It defaults to 10.\n
可定义 BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 宏来决定工厂可接受的最多参 数值,
 默认值是10。

@@ -450,7 +433,7 @@

 [endsect]

-[section Acknowledgements(鸣谢)]
+[section:acknowledgements Acknowledgements(鸣谢)]

 Eric Niebler requested a function to invoke a type's constructor (with the
arguments supplied as a Tuple) as a Fusion feature. These Factory utilities are
@@ -466,7 +449,7 @@

 [endsect]

-[section References(参考)]
+[section:references References(参考)]

 # [@http://en.wikipedia.org/wiki/Design_Patterns Design Patterns],
   Gamma et al. - Addison Wesley Publishing, 1995
=======================================
--- /trunk/libs/functional/factory/doc/html/index.html Mon May 31 02:08:39 2010 +++ /trunk/libs/functional/factory/doc/html/index.html Thu Jun 10 08:23:31 2010
@@ -1,10 +1,10 @@
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Chapter 1. Boost.Functional/Factory 1.0</title>
-<link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="index.html" title="Chapter 1. Boost.Functional/Factory 1.0">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;Boost.Functional/Factory 1.0</title>
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="Chapter&#160;1.&#160;Boost.Functional/Factory 1.0">
 </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,13 +20,13 @@
 <div class="chapter" lang="en">
 <div class="titlepage"><div>
 <div><h2 class="title">
-<a name="boost_functional_factory"></a>Chapter 1. Boost.Functional/Factory 1.0</h2></div> +<a name="boost_functional_factory"></a>Chapter&#160;1.&#160;Boost.Functional/Factory 1.0</h2></div>
 <div><div class="author"><h3 class="author">
<span class="firstname">Tobias</span> <span class="surname">Schwinger</span>
 </h3></div></div>
-<div><p class="copyright">Copyright (c) 2007, 2008 Tobias Schwinger</p></div>
+<div><p class="copyright">Copyright &#169; 2007, 2008 Tobias Schwinger</p></div>
 <div><div class="legalnotice">
-<a name="id934161"></a><p>
+<a name="id4850298"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt 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>
@@ -35,42 +35,55 @@
 <div class="toc">
 <p><b>Table of Contents</b></p>
 <dl>
-<dt><span class="section"><a href="index.html#boost_functional_factory.brief_description">Brief Description</a></span></dt> -<dt><span class="section"><a href="index.html#boost_functional_factory.background">Background</a></span></dt> -<dt><span class="section"><a href="index.html#boost_functional_factory.reference"> Reference</a></span></dt> -<dt><span class="section"><a href="index.html#boost_functional_factory.acknowledgements">Acknowledgements</a></span></dt> -<dt><span class="section"><a href="index.html#boost_functional_factory.references">References</a></span></dt> +<dt><span class="section"><a href="index.html#boost_functional_factory.brief_description"> Brief Description&#65288;&#31616;&#20171;&#65289;</a></span></dt> +<dt><span class="section"><a href="index.html#boost_functional_factory.background"> Background&#65288;&#32972;&#26223;&#20171;&#32461;&#65289;</a></span></dt> +<dt><span class="section"><a href="index.html#boost_functional_factory.reference"> Reference&#65288;&#21442;&#32771;&#65289;</a></span></dt> +<dt><span class="section"><a href="index.html#boost_functional_factory.acknowledgements"> Acknowledgements&#65288;&#40483;&#35874;&#65289;</a></span></dt> +<dt><span class="section"><a href="index.html#boost_functional_factory.references"> References&#65288;&#21442;&#32771;&#65289;</a></span></dt>
 </dl>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_functional_factory.brief_description"></a><a href="index.html#boost_functional_factory.brief_description" title="Brief Description">Brief Description</a></h2></div></div></div> +<a name="boost_functional_factory.brief_description"></a><a class="link" href="index.html#boost_functional_factory.brief_description" title="Brief Description&#65288;&#31616;&#20171;&#65289;"> Brief Description&#65288;&#31616;&#20171;&#65289;</a>
+</h2></div></div></div>
 <p>
The template <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code> lets you encapsulate a <code class="computeroutput"><span class="keyword">new</span></code> expression as a function object, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code> - encapsulates a constructor invocation without <code class="computeroutput"><span class="keyword">new</span></code>. + encapsulates a constructor invocation without <code class="computeroutput"><span class="keyword">new</span></code>.<br> + &#27169;&#26495; <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code>&#21487;&#20196;&#20320;&#20197;&#20989;&#25968;&#23545;&#35937;&#65288;&#20223;&#20989;&#25968;&#65289;&#24418;&#24335;&#26469;&#23553;&#35013; + <code class="computeroutput"><span class="keyword">new</span></code> &#34920;&#36798;&#24335;, &#32780; <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code> + &#21017;&#21487;&#20197;&#38750; <code class="computeroutput"><span class="keyword">new</span></code> &#30340;&#24418;&#24335;&#35843;&#29992;&#26500;&#36896;&#20989;&#25968;
     </p>
<pre class="programlisting"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code><span class="special">&lt;</span><span class="identifier">T</span><span class="special">*&gt;()(</span><span class="identifier">arg1</span><span class="special">,</span><span class="identifier">arg2</span><span class="special">,</span><span class="identifier">arg3</span><span class="special">)</span>
 <span class="comment">// same as new T(arg1,arg2,arg3)
+</span><span class="comment">// &#22914;&#21516;&#35843;&#29992; new T(arg1,arg2,arg3)
 </span>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;()(</span><span class="identifier">arg1</span><span class="special">,</span><span class="identifier">arg2</span><span class="special">,</span><span class="identifier">arg3</span><span class="special">)</span>
 <span class="comment">// same as T(arg1,arg2,arg3)
+</span><span class="comment">//&#22914;&#21516;&#35843;&#29992; T(arg1,arg2,arg3)
 </span></pre>
 <p>
For technical reasons the arguments to the function objects have to be LValues. A factory that also accepts RValues can be composed using the <a href="http://www.boost.org/libs/functional/forward/doc/index.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">forward_adapter</span></code></a> - or <a href="http://www.boost.org/libs/bind/bind.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span></code></a>. + or <a href="http://www.boost.org/libs/bind/bind.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span></code></a>.<br> + &#20986;&#20110;&#25216;&#26415;&#21407;&#22240;&#30340;&#32771;&#34385;&#65292;&#35843;&#29992;&#20989;&#25968;&#23545;&#35937;&#30340;&#21442;&#25968;&#24517;&#39035;&#26159;&#24038;&#20540;&#12290;&#20351;&#29992; + <a href="http://www.boost.org/libs/functional/forward/doc/index.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">forward_adapter</span></code></a> + &#25110; <a href="http://www.boost.org/libs/bind/bind.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span></code></a> + &#20063;&#21487;&#32452;&#35013;&#25104;&#25509;&#21463;&#21491;&#20540;&#30340;&#24037;&#21378;&#31867;&#12290;
     </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_functional_factory.background"></a><a href="index.html#boost_functional_factory.background" title="Background">Background</a></h2></div></div></div> +<a name="boost_functional_factory.background"></a><a class="link" href="index.html#boost_functional_factory.background" title="Background&#65288;&#32972;&#26223;&#20171;&#32461;&#65289;"> Background&#65288;&#32972;&#26223;&#20171;&#32461;&#65289;</a>
+</h2></div></div></div>
 <p>
In traditional Object Oriented Programming a Factory is an object implementing an interface of one or more methods that construct objects conforming to known
-      interfaces.
+ interfaces.<br> &#22312;&#20256;&#32479;&#30340;&#38754;&#21521;&#23545;&#35937;&#32534;&#31243;&#20013;&#65292;&#24037;&#21378;&#26159;&#19968;&#20010;&#21487;&#36890;&#36807;&#19968;&#65288;&#25110;&#22810;&#65289;&#20010;&#26041;&#27861;&#26500;&#36896;&#31526;&#21512;&#35201;&#27714;&#23545;&#35937;&#30340;&#23545;&#35937;&#12290;
     </p>
<pre class="programlisting"><span class="comment">// assuming a_concrete_class and another_concrete_class are derived
-</span><span class="comment">// from an_abstract_class
+</span><span class="comment">// from an_abstract_class
+</span><span class="comment">// &#20551;&#23450;&#20855;&#20307;&#23454;&#29616;&#31867; a_concrete_class &#21644; another_concrete_class &#37117; +</span><span class="comment">// &#20174;&#25277;&#35937;&#22522;&#31867; an_abstract_class &#27966;&#29983;
 </span>
<span class="keyword">class</span> <span class="identifier">a_factory</span>
 <span class="special">{</span>
@@ -121,7 +134,9 @@
This approach has several drawbacks. The most obvious one is that there is lots of boilerplate code. In other words there is too much code to express a rather simple intention. We could use templates to get rid of some of it
-      but the approach remains inflexible:
+ but the approach remains inflexible: <br> &#20197;&#19978;&#23454;&#29616;&#26041;&#27861;&#26377;&#20960;&#20010;&#32570;&#28857;&#65292;&#26368;&#26126;&#26174;&#32773;&#23601;&#26159;&#26377;&#22826;&#22810;&#37325;&#22797;&#27515;&#26495;&#30340;&#20195;&#30721;&#12290;&#25442;&#35328;&#20043;&#65292;&#22914;&#27492;&#22810;&#30340; + &#20195;&#30721;&#19982;&#35201;&#23454;&#29616;&#30340;&#31616;&#21333;&#30446;&#30340;&#30456;&#27604;&#26377;&#20123;&#23567;&#39064;&#22823;&#20570;&#12290;&#20351;&#29992;&#27169;&#26495;&#21487;&#36991;&#20813;&#20197;&#19978;&#26576;&#20123;&#32570;&#28857;&#65292;
+      &#20294;&#20173;&#19981;&#22815;&#28789;&#27963;&#65306;
     </p>
<pre class="programlisting"><span class="identifier">o</span> <span class="identifier">We</span> <span class="identifier">may</span> <span class="identifier">want</span> <span class="identifier">a</span> <span class="identifier">factory</span> <span class="identifier">that</span> <span class="identifier">takes</span> <span class="identifier">some</span> <span class="identifier">arguments</span> <span class="identifier">that</span> <span class="identifier">are</span> <span class="identifier">forwarded</span> <span class="identifier">to</span> <span class="identifier">the</span> <span class="identifier">constructor</span><span class="special">,</span>
@@ -130,71 +145,114 @@
   <span class="identifier">objects</span><span class="special">,</span>
<span class="identifier">o</span> <span class="identifier">we</span> <span class="identifier">might</span> <span class="keyword">not</span> <span class="identifier">necessarily</span> <span class="identifier">need</span> <span class="identifier">a</span> <span class="identifier">polymorphic</span> <span class="identifier">base</span> <span class="keyword">class</span> <span class="keyword">for</span> <span class="identifier">the</span> <span class="identifier">objects</span><span class="special">,</span> <span class="identifier">o</span> <span class="identifier">as</span> <span class="identifier">we</span> <span class="identifier">will</span> <span class="identifier">see</span><span class="special">,</span> <span class="identifier">we</span> <span class="keyword">do</span> <span class="keyword">not</span> <span class="identifier">need</span> <span class="identifier">a</span> <span class="identifier">factory</span> <span class="identifier">base</span> <span class="keyword">class</span> <span class="identifier">at</span> <span class="identifier">all</span><span class="special">,</span> -<span class="identifier">o</span> <span class="identifier">we</span> <span class="identifier">might</span> <span class="identifier">want</span> <span class="identifier">to</span> <span class="identifier">just</span> <span class="identifier">call</span> <span class="identifier">the</span> <span class="identifier">constructor</span> <span class="special">-</span> <span class="identifier">without</span> #<span class="keyword">new</span># <span class="identifier">to</span> <span class="identifier">create</span> +<span class="identifier">o</span> <span class="identifier">we</span> <span class="identifier">might</span> <span class="identifier">want</span> <span class="identifier">to</span> <span class="identifier">just</span> <span class="identifier">call</span> <span class="identifier">the</span> <span class="identifier">constructor</span> <span class="special">-</span> <span class="identifier">without</span> <span class="error">`</span><span class="keyword">new</span><span class="error">`</span> <span class="identifier">to</span> <span class="identifier">create</span> <span class="identifier">an</span> <span class="identifier">object</span> <span class="identifier">on</span> <span class="identifier">the</span> <span class="identifier">stack</span><span class="special">,</span> <span class="keyword">and</span> <span class="identifier">o</span> <span class="identifier">finally</span> <span class="identifier">we</span> <span class="identifier">might</span> <span class="identifier">want</span> <span class="identifier">to</span> <span class="identifier">use</span> <span class="identifier">customized</span> <span class="identifier">memory</span> <span class="identifier">management</span><span class="special">.</span>
 </pre>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ &#21487;&#33021;&#38656;&#35201;&#24037;&#21378;&#25509;&#21463;&#21442;&#25968;&#21518;&#33021;&#36716;&#21457;&#65288;&#38750;&#25335;&#36125;&#35821;&#20041;&#65289;&#33267;&#26500;&#36896;&#20989;&#25968;&#65292;
+      </li>
+<li>
+ &#38656;&#35201;&#24037;&#21378;&#33021;&#22815;&#20135;&#29983; smart pointer &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;,
+      </li>
+<li>
+ &#38656;&#35201;&#65288;&#24037;&#21378;&#20855;&#22791; &#65289;&#22810;&#20010;&#25104;&#21592;&#20989;&#25968;&#20197;&#20135;&#29983;&#19981;&#21516;&#31867;&#22411;&#30340;&#23545;&#35937;,
+      </li>
+<li>
+ &#23545;&#20110;&#20135;&#29983;&#30340;&#23545;&#35937;&#32780;&#35328;&#65292;&#29978;&#33267;&#22810;&#24577;&#22522;&#31867;&#20063;&#21487;&#33021;&#19981;&#26159;&#24517;&#39035;&#30340;,
+      </li>
+<li>
+ &#25105;&#20204;&#23558;&#20250;&#30475;&#21040;&#65292;&#24037;&#21378;&#23436;&#20840;&#19981;&#38656;&#35201;&#19968;&#20010;&#20844;&#20849;&#30340;&#22522;&#31867;,
+      </li>
+<li>
+ &#25152;&#38656;&#30340;&#20165;&#20165;&#26159;&#35843;&#29992;&#26500;&#36896;&#20989;&#25968;&#65292;&#33021;&#22815;&#22312;&#26632;&#19978;&#26500;&#36896;&#32780;&#38750;&#35843;&#29992; + <code class="computeroutput"><span class="keyword">new</span></code> &#24182;&#19988;
+      </li>
+<li>
+ &#38500;&#27492;&#20043;&#22806;&#36824;&#33021;&#22815;&#36827;&#34892;&#23450;&#21046;&#21270;&#30340;&#20869;&#23384;&#31649;&#29702;&#12290;
+      </li>
+</ul></div>
 <p>
Experience has shown that using function objects and generic Boost components for their composition, Design Patterns that describe callback mechasisms (typically requiring a high percentage of boilerplate code with pure Object Oriented methodology) - become implementable with just few code lines and without extra classes. + become implementable with just few code lines and without extra classes. <br> + &#32463;&#39564;&#21578;&#35785;&#25105;&#20204;&#65292;&#20351;&#29992;&#20989;&#25968;&#23545;&#35937;&#65288;&#20223;&#20989;&#25968;&#65289;&#21644; Boost &#27867;&#22411;&#32452;&#20214;&#32452;&#21512;&#26469;&#23454;&#29616;&#22238;&#35843;&#26426;&#21046;&#30340;&#35774;&#35745;&#27169;&#24335;&#65292; + &#26080;&#38656;&#39069;&#22806;&#30340;&#31867;&#65292;&#23525;&#23525;&#25968;&#34892;&#21363;&#21487;&#23436;&#12290;&#30456;&#27604;&#20043;&#19979;&#21516;&#26679;&#30340;&#21151;&#33021;&#22312;&#32431;&#38754;&#21521;&#23545;&#35937;&#26041;&#27861;&#23454;&#29616;&#20013;&#36890;&#24120;&#38656;&#35201;&#22823;&#37327;
+      &#30340;&#21574;&#26495;&#20195;&#30721;&#12290;
     </p>
 <p>
Factories are callback mechanisms for constructors, so we provide two class templates, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code>, that encasulate object construction via direct application of the constructor and the <code class="computeroutput"><span class="keyword">new</span></code> operator, respectively. + <br> &#24037;&#21378;&#21363;&#26159;&#23545;&#26500;&#36896;&#20989;&#25968;&#30340;&#19968;&#31181;&#22238;&#35843;&#26426;&#21046;&#65292;&#23545;&#24212;&#20110;&#27492;&#26412;&#24211;&#25552;&#20379;&#20102;&#20004;&#20010;&#31867;&#27169;&#26495;, + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code> &#21644; <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code>&#65292;&#23545;&#24212;&#23553;&#35013;&#20102;&#30452;&#25509;&#20351;&#29992;&#26500;&#36896;&#20989;&#25968;&#21644; + <code class="computeroutput"><span class="keyword">new</span></code> &#25805;&#20316;&#31526;&#23545;&#23545;&#35937;&#30340;&#26500;&#36896;&#12290;
     </p>
 <p>
We let the function objects forward their arguments to the construction expressions they encapsulate. Overthis <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code> - optionally allows the use of smart pointers and <a href="http://www.sgi.com/tech/stl/concepts/allocator.html"; target="_top">Allocators</a>. + optionally allows the use of smart pointers and <a href="http://www.sgi.com/tech/stl/concepts/allocator.html"; target="_top">Allocators</a>.<br> + &#25105;&#20204;&#20196;&#20989;&#25968;&#23545;&#35937;&#23558;&#25509;&#21463;&#21040;&#30340;&#21442;&#25968;&#36716;&#21457;&#65288;&#38750;&#25335;&#36125;&#35821;&#24847;&#65289;&#33267;&#20854;&#23553;&#35013;&#30340;&#26500;&#36896;&#20989;&#25968;&#65292;&#22240;&#27492; + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">factory</span></code> &#26159;&#21487;&#20197;&#20351;&#29992; smart pointer &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;&#21644; + <a href="http://www.sgi.com/tech/stl/concepts/allocator.html"; target="_top">Allocators</a>&#30340;&#12290;
     </p>
 <p>
-      Compile-time polymorphism can be used where appropriate,
+ Compile-time polymorphism can be used where appropriate,<br> &#22914;&#26524;&#26465;&#20214;&#20801;&#35768;&#65292;&#20134;&#21487;&#20351;&#29992;&#32534;&#35793;&#26399;&#22810;&#24577;&#65292;
     </p>
-<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span> -<span class="keyword">void</span> <span class="identifier">do_something</span><span class="special">()</span>
-<span class="special">{</span>
-    <span class="comment">// [...]
-</span> <span class="identifier">T</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span>
-
- <span class="comment">// for conceptually similar objects x we neither need virtual -</span> <span class="comment">// functions nor a common base class in this context.
-</span>    <span class="comment">// [...]
-</span><span class="special">}</span>
+<pre class="programlisting"> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span> <span class="special">&gt;</span> + <span class="keyword">void</span> <span class="identifier">do_something</span><span class="special">()</span>
+  <span class="special">{</span>
+      <span class="comment">// [...]
+</span> <span class="identifier">T</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">T</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span>
+
+ <span class="comment">// for conceptually similar objects x we neither need virtual +</span> <span class="comment">// functions nor a common base class in this context. +</span> <span class="comment">// &#22312;&#27492;&#35821;&#22659;&#20013;&#65292;&#23545;&#20110;&#26500;&#36896;&#20989;&#25968;&#35843;&#29992;&#19982;&#23545;&#35937; x &#31867;&#20284;&#32773;&#65292;&#26082;&#19981;&#38656;&#35201;&#34394;&#20989;&#25968; +</span> <span class="comment">// &#20063;&#19981;&#38656;&#35201;&#20844;&#20849;&#30340;&#22522;&#31867;&#12290;
+</span>
+<span class="comment">// [...]
+</span>  <span class="special">}</span>
 </pre>
 <p>
Now, to allow inhomogenous signaturs for the constructors of the types passed in for <code class="computeroutput"><span class="identifier">T</span></code> we can use <code class="computeroutput"><span class="identifier">value_factory</span></code> and <a href="http://www.boost.org/libs/bind/bind.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span></code></a>
-      to normalize between them.
+ to normalize between them. <br> &#29616;&#22312;&#65292;&#20026;&#23558;&#19981;&#21516;&#31867;&#22411;&#31614;&#21517;&#24335;&#30340;&#31867;&#22411;&#20256;&#20837;&#31867;&#22411; + <code class="computeroutput"><span class="identifier">T</span></code> &#30340;&#26500;&#36896;&#20989;&#25968;&#65292;&#21487;&#20351;&#29992; + <code class="computeroutput"><span class="identifier">value_factory</span></code> &#21644; <a href="http://www.boost.org/libs/bind/bind.html"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span></code></a> + &#26469;&#20316;&#20986;&#19968;&#33268;&#30340;&#22788;&#29702;&#12290;
     </p>
-<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ValueFactory</span> <span class="special">&gt;</span> -<span class="keyword">void</span> <span class="identifier">do_something</span><span class="special">(</span><span class="identifier">ValueFactory</span> <span class="identifier">make_obj</span> <span class="special">=</span> <span class="identifier">ValueFactory</span><span class="special">())</span>
-<span class="special">{</span>
-    <span class="comment">// [...]
-</span> <span class="keyword">typename</span> <span class="identifier">ValueFactory</span><span class="special">::</span><span class="identifier">result_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">make_obj</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span>
-
- <span class="comment">// for conceptually similar objects x we neither need virtual -</span> <span class="comment">// functions nor a common base class in this context.
-</span>    <span class="comment">// [...]
-</span><span class="special">}</span>
-
-<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
-<span class="special">{</span>
-    <span class="comment">// [...]
+<pre class="programlisting"> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">ValueFactory</span> <span class="special">&gt;</span> + <span class="keyword">void</span> <span class="identifier">do_something</span><span class="special">(</span><span class="identifier">ValueFactory</span> <span class="identifier">make_obj</span> <span class="special">=</span> <span class="identifier">ValueFactory</span><span class="special">())</span>
+  <span class="special">{</span>
+      <span class="comment">// [...]
+</span> <span class="keyword">typename</span> <span class="identifier">ValueFactory</span><span class="special">::</span><span class="identifier">result_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">make_obj</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span>
+
+ <span class="comment">// for conceptually similar objects x we neither need virtual +</span> <span class="comment">// functions nor a common base class in this context. +</span> <span class="comment">// &#22312;&#27492;&#35821;&#22659;&#20013;&#65292;&#23545;&#20110;&#26500;&#36896;&#20989;&#25968;&#35843;&#29992;&#19982;&#23545;&#35937; x &#31867;&#20284;&#32773;&#65292;&#26082;&#19981;&#38656;&#35201;&#34394;&#20989;&#25968; +</span> <span class="comment">// &#20063;&#19981;&#38656;&#35201;&#20844;&#20849;&#30340;&#22522;&#31867;&#12290;
+</span>
+<span class="comment">// [...]
+</span>  <span class="special">}</span>
+
+ <span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+  <span class="special">{</span>
+      <span class="comment">// [...]
 </span>
- <span class="identifier">do_something</span><span class="special">(</span><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;());</span> - <span class="identifier">do_something</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span><span class="special">(</span><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code><span class="special">&lt;</span><span class="identifier">Y</span><span class="special">&gt;(),</span><span class="identifier">_1</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="identifier">_2</span><span class="special">));</span>
-    <span class="comment">// construct X(a,b) and Y(a,5,b), respectively.
+ <span class="identifier">do_something</span><span class="special">(</span><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;());</span> + <span class="identifier">do_something</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span><span class="special">(</span><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">value_factory</span></code><span class="special">&lt;</span><span class="identifier">Y</span><span class="special">&gt;(),</span><span class="identifier">_1</span><span class="special">,</span><span class="number">5</span><span class="special">,</span><span class="identifier">_2</span><span class="special">));</span>
+      <span class="comment">// construct X(a,b) and Y(a,5,b), respectively.
+</span> <span class="comment">// &#30456;&#24212;&#30340;&#26500;&#36896; X(a,b) &#21644; Y(a,5,b)&#12290;
 </span>
-    <span class="comment">// [...]
-</span><span class="special">}</span>
+      <span class="comment">// [...]
+</span>  <span class="special">}</span>
 </pre>
 <p>
Maybe we want our objects to outlive the function's scope, in this case we
-      have to use dynamic allocation;
+ have to use dynamic allocation;<br> &#20063;&#35768;&#25105;&#20204;&#38656;&#35201;&#26500;&#24314;&#30340;&#23545;&#35937;&#30340;&#29983;&#21629;&#21608;&#26399;&#38271;&#20110;&#20989;&#25968;&#20316;&#29992;&#22495;&#65292;&#27492;&#26102;&#38656;&#35201;&#21160;&#24577;&#20998;&#37197;&#65307;
     </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Factory</span> <span class="special">&gt;</span> <span class="identifier">whatever</span> <span class="identifier">do_something</span><span class="special">(</span><span class="identifier">Factory</span> <span class="identifier">new_obj</span> <span class="special">=</span> <span class="identifier">Factory</span><span class="special">())</span>
@@ -209,20 +267,30 @@
 </span>    <span class="comment">// above.
</span> <span class="comment">// Note that we are also free to have the type erasure happen </span> <span class="comment">// somewhere else (e.g. in the constructor of this function's
-</span>    <span class="comment">// result type).
+</span>    <span class="comment">// result type).
+</span> <span class="comment">// &#21516;&#19978;&#65292;&#26080;&#38656;&#20844;&#20849;&#22522;&#31867;&#25110;&#34394;&#20989;&#25968;,&#21487;&#36890;&#36807;&#20351;&#29992; +</span> <span class="comment">// &#24418;&#22914; boost::shared_ptr&lt;base&gt; +</span> <span class="comment">// &#32780;&#19981;&#26159; typename Factory::result_type +</span> <span class="comment">// &#30340;&#20195;&#30721;&#26469;&#30830;&#20445;&#20135;&#29983;&#30340;&#23545;&#35937;&#26377;&#20849;&#21516;&#30340;&#22810;&#24577;&#22522;&#31867;&#12290; +</span> <span class="comment">// &#35831;&#27880;&#24847;&#21040;&#25105;&#20204;&#20063;&#21487;&#20219;&#24847;&#20915;&#23450;&#31350;&#31455;&#20309;&#22788;&#25165;&#36827;&#34892;&#21521;&#19978;&#36716;&#22411;&#65288;&#32780;&#20002;&#22833;&#23454;&#38469;&#31867;&#22411;&#65289; +</span> <span class="comment">// &#65288;&#27604;&#22914;&#22312;&#27492;&#20989;&#25968;&#36820;&#22238;&#20540;&#31867;&#22411;&#30340;&#26500;&#36896;&#20989;&#25968;&#20013;&#36827;&#34892;&#65289;
 </span>
     <span class="comment">// [...]
 </span><span class="special">}</span>

<span class="comment">// [... call do_something like above but with __factory__ instead
 </span><span class="comment">// of __value_factory__]
+</span><span class="comment">// [... &#22914;&#21516;&#21069;&#20363;&#19968;&#33324;&#35843;&#29992; do_something &#65292;&#20165;&#23558; __value_factory__
+</span><span class="comment">// &#26367;&#25442;&#25104; __factory__]
 </span></pre>
 <p>
Although we might have created polymorphic objects in the previous example, we have used compile time polymorphism for the factory. If we want to erase the type of the factory and thus allow polymorphism at run time, we can use <a href="http://www.boost.org/doc/html/function.html"; target="_top">Boost.Function</a>
-      to do so. The first example can be rewritten as follows.
+ to do so. The first example can be rewritten as follows.<br> &#23613;&#31649;&#21069;&#20363;&#20013;&#25105;&#20204;&#24314;&#31435;&#20102;&#22810;&#24577;&#30340;&#23545;&#35937;&#65292;&#20294;&#20173;&#22312;&#24037;&#21378;&#20013;&#20351;&#29992;&#20102;&#32534;&#35793;&#26399;&#22810;&#24577;&#12290;&#22914;&#26524;&#24076;&#26395;&#22312;&#24037;&#21378;&#20013; + &#38544;&#34255;&#20855;&#20307;&#31867;&#22411;&#32780;&#36798;&#21040;&#36816;&#34892;&#26399;&#22810;&#24577;&#65292;&#21017;&#21487;&#20351;&#29992; <a href="http://www.boost.org/doc/html/function.html"; target="_top">Boost.Function</a> + &#26469;&#23436;&#25104;&#12290;&#21069;&#20363;&#21487;&#37325;&#20889;&#22914;&#19979;&#12290;
     </p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span><span class="special">&lt;</span> <span class="identifier">an_abstract_class</span><span class="special">*()</span> <span class="special">&gt;</span> <span class="identifier">a_factory</span><span class="special">;</span>

@@ -243,36 +311,42 @@
 </pre>
 <p>
Of course we can just as easy create factories that take arguments and/or return - <a href="http://www.boost.org/libs/smart_ptr/index.html"; target="_top">Smart Pointers</a>. + <a href="http://www.boost.org/libs/smart_ptr/index.html"; target="_top">Smart Pointers</a>.<br> + &#24403;&#28982;&#20063;&#21487;&#31616;&#21333;&#22320;&#24314;&#31435;&#33021;&#22815;&#25509;&#21463;/&#36820;&#22238; <a href="http://www.boost.org/libs/smart_ptr/index.html"; target="_top">Smart + Pointers</a> &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;&#30340;&#24037;&#21378;&#12290;
     </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_functional_factory.reference"></a><a href="index.html#boost_functional_factory.reference" title=" Reference"> Reference</a></h2></div></div></div> +<a name="boost_functional_factory.reference"></a><a class="link" href="index.html#boost_functional_factory.reference" title="Reference&#65288;&#21442;&#32771;&#65289;"> Reference&#65288;&#21442;&#32771;&#65289;</a>
+</h2></div></div></div>
 <div class="toc"><dl>
<dt><span class="section"><a href="index.html#boost_functional_factory.reference.value_factory">value_factory</a></span></dt> <dt><span class="section"><a href="index.html#boost_functional_factory.reference.factory">factory</a></span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_functional_factory.reference.value_factory"></a><a href="index.html#boost_functional_factory.reference.value_factory" title="value_factory">value_factory</a></h3></div></div></div> -<a name="boost_functional_factory.reference.value_factory.description"></a><h4>
-<a name="id936876"></a>
- <a href="index.html#boost_functional_factory.reference.value_factory.description">Description</a>
-      </h4>
+<a name="boost_functional_factory.reference.value_factory"></a><a class="link" href="index.html#boost_functional_factory.reference.value_factory" title="value_factory">value_factory</a>
+</h3></div></div></div>
+<a name="boost_functional_factory.reference.value_factory.description____________"></a><h5>
+<a name="id4860102"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.value_factory.description____________">Description&#65288;&#27010;&#36848;&#65289;</a>
+      </h5>
 <p>
- Function object template that invokes the constructor of the type <code class="computeroutput"><span class="identifier">T</span></code>. + Function object template that invokes the constructor of the type <code class="computeroutput"><span class="identifier">T</span></code>.<br> &#35843;&#29992;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> + &#26500;&#36896;&#20989;&#25968;&#30340;&#20989;&#25968;&#23545;&#35937;&#27169;&#26495;&#12290;
       </p>
-<a name="boost_functional_factory.reference.value_factory.header"></a><h4>
-<a name="id936914"></a>
- <a href="index.html#boost_functional_factory.reference.value_factory.header">Header</a>
-      </h4>
+<a name="boost_functional_factory.reference.value_factory.header_______________"></a><h5>
+<a name="id4860149"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.value_factory.header_______________">Header&#65288;&#22836;&#25991;&#20214;&#65289;</a>
+      </h5>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">value_factory</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
-<a name="boost_functional_factory.reference.value_factory.synopsis"></a><h4>
-<a name="id936989"></a>
- <a href="index.html#boost_functional_factory.reference.value_factory.synopsis">Synopsis</a>
-      </h4>
+<a name="boost_functional_factory.reference.value_factory._synopsis_synopsis____________"></a><h5>
+<a name="id4860219"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.value_factory._synopsis_synopsis____________">:synopsis
+        Synopsis&#65288;&#25688;&#35201;&#65289;</a>
+      </h5>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
 <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">&gt;</span>
@@ -280,31 +354,34 @@
 <span class="special">}</span>
 </pre>
 <div class="variablelist">
-<p class="title"><b>Notation</b></p>
+<p class="title"><b>Notation&#65288;&#34920;&#31034;&#27861;&#65289;</b></p>
 <dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">T</span></code></span></dt>
 <dd><p>
-            an arbitrary type with at least one public constructor
-          </p></dd>
+ an arbitrary type with at least one public constructor<br> &#26377;&#33267;&#23569;&#19968;&#20010; + public &#26500;&#36896;&#20989;&#25968;&#30340;&#20219;&#24847;&#31867;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt>
 <dd><p>
- argument LValues to a constructor of <code class="computeroutput"><span class="identifier">T</span></code>
-          </p></dd>
+ argument LValues to a constructor of <code class="computeroutput"><span class="identifier">T</span></code><br> + &#35843;&#29992; <code class="computeroutput"><span class="identifier">T</span></code> &#26500;&#36896;&#20989;&#25968;&#30340;&#35832;&#24038;&#20540;&#21442;&#25968;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
 <dd><p>
- the type <code class="computeroutput"><span class="identifier">value_factory</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></code>
-          </p></dd>
+ the type <code class="computeroutput"><span class="identifier">value_factory</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></code><br> <code class="computeroutput"><span class="identifier">value_factory</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></code>&#30340;&#31867;&#22411;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
 <dd><p>
- an instance object of <code class="computeroutput"><span class="identifier">F</span></code>
-          </p></dd>
+ an instance object of <code class="computeroutput"><span class="identifier">F</span></code><br> + <code class="computeroutput"><span class="identifier">F</span></code> &#31867;&#30340;&#19968;&#20010;&#23545;&#35937;&#23454;&#20363;
+            </p></dd>
 </dl>
 </div>
-<a name="boost_functional_factory.reference.value_factory.expression_semantics"></a><h4>
-<a name="id937226"></a>
- <a href="index.html#boost_functional_factory.reference.value_factory.expression_semantics">Expression
-        Semantics</a>
-      </h4>
+<a name="boost_functional_factory.reference.value_factory.expression_semantics_____________________"></a><h5>
+<a name="id4860496"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.value_factory.expression_semantics_____________________">Expression + Semantics&#65288;&#34920;&#36798;&#24335;&#35821;&#20041;&#65289;</a>
+      </h5>
 <div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -312,88 +389,96 @@
 </colgroup>
 <thead><tr>
 <th>
-              <p>
-                Expression
-              </p>
+                <p>
+                  Expression&#65288;&#34920;&#36798;&#24335;&#65289;
+                </p>
               </th>
 <th>
-              <p>
-                Semantics
-              </p>
+                <p>
+                  Semantics&#65288;&#35821;&#20041;&#65289;
+                </p>
               </th>
 </tr></thead>
 <tbody>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">()</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">()</span></code>
+                </p>
               </td>
 <td>
-              <p>
- creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>.
-              </p>
+                <p>
+ creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>. + <br> &#24314;&#31435;&#31867;&#22411; <code class="computeroutput"><span class="identifier">F</span></code>
+                  &#30340;&#19968;&#20010;&#23545;&#35937;&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
+                </p>
               </td>
 <td>
-              <p>
- creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>.
-              </p>
+                <p>
+ creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>. + <br> &#24314;&#31435;&#31867;&#22411; <code class="computeroutput"><span class="identifier">F</span></code>
+                  &#30340;&#19968;&#20010;&#23545;&#35937;&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
+                </p>
               </td>
 <td>
-              <p>
- returns <code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>.
-              </p>
+                <p>
+ returns <code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>. <br> &#36820;&#22238;<code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">result_type</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">result_type</span></code>
+                </p>
               </td>
 <td>
-              <p>
- is the type <code class="computeroutput"><span class="identifier">T</span></code>.
-              </p>
+                <p>
+ is the type <code class="computeroutput"><span class="identifier">T</span></code>. + <br> <code class="computeroutput"><span class="identifier">T</span></code>&#30340;&#31867;&#22411;
+                </p>
               </td>
 </tr>
 </tbody>
 </table></div>
-<a name="boost_functional_factory.reference.value_factory.limits"></a><h4>
-<a name="id937498"></a>
- <a href="index.html#boost_functional_factory.reference.value_factory.limits">Limits</a>
-      </h4>
+<a name="boost_functional_factory.reference.value_factory.limits____________"></a><h5>
+<a name="id4860834"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.value_factory.limits____________">Limits&#65288;&#38480;&#21046;&#65289;</a>
+      </h5>
 <p>
The macro BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY can be defined to set
-        the maximum arity. It defaults to 10.
+ the maximum arity. It defaults to 10.<br> &#21487;&#23450;&#20041; BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY + &#23439;&#26469;&#20915;&#23450;&#24037;&#21378;&#21487;&#25509;&#21463;&#30340;&#26368;&#22810;&#21442;&#25968;&#20540;&#65292; &#40664;&#35748;&#20540;&#26159;10&#12290;
       </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_functional_factory.reference.factory"></a><a href="index.html#boost_functional_factory.reference.factory" title="factory">factory</a></h3></div></div></div>
-<a name="boost_functional_factory.reference.factory.description"></a><h4>
-<a name="id937545"></a>
- <a href="index.html#boost_functional_factory.reference.factory.description">Description</a>
-      </h4>
+<a name="boost_functional_factory.reference.factory"></a><a class="link" href="index.html#boost_functional_factory.reference.factory" title="factory">factory</a>
+</h3></div></div></div>
+<a name="boost_functional_factory.reference.factory.description____________"></a><h5>
+<a name="id4860882"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.factory.description____________">Description&#65288;&#27010;&#36848;&#65289;</a>
+      </h5>
 <p>
Function object template that dynamically constructs a pointee object for the type of pointer given as template argument. Smart pointers may be used for the template argument, given that <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">pointee</span><span class="special">&lt;</span><span class="identifier">Pointer</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
-        yields the pointee type.
+ yields the pointee type.<br> &#26681;&#25454;&#32473;&#23450;&#30340;&#27169;&#26495;&#21442;&#25968;&#26469;&#21160;&#24577;&#26500;&#24314;&#31867;&#25351;&#38024;&#31867;&#23545;&#35937;&#30340;&#20989;&#25968;&#23545;&#35937;&#27169;&#26495;&#12290;&#21487;&#20351;&#29992; + Smart pointer &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;&#20316;&#20026;&#27169;&#26495;&#21442;&#25968;&#65292;&#23545;&#20110; boost &#20013;&#25552;&#20379;&#30340;&#31867;&#25351;&#38024;&#31867;&#65292;<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">pointee</span><span class="special">&lt;</span><span class="identifier">Pointer</span><span class="special">&gt;::</span><span class="identifier">type</span></code> &#31867;&#22411;&#20248;&#20808;&#20110;&#31867;&#25351;&#38024;&#31867;&#26412;&#36523;&#30340;&#31867;&#22411;&#12290;
       </p>
 <p>
If an <span class="underline">_allocator</span>_ is given, it is used
@@ -402,23 +487,32 @@
destructor and deallocates the memory with a copy of the Allocator is used for the second constructor argument of <code class="computeroutput"><span class="identifier">Pointer</span></code>
         (thus it must be a __smart<span class="underline">pointer</span>_
- that provides a suitable constructor, such as <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>). + that provides a suitable constructor, such as <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>).<br> &#33509;&#32473;&#23450;&#20102; + <span class="underline">_allocator</span>_ &#65288;&#20998;&#37197;&#22120;&#65289;&#21442;&#25968;&#65292;&#21017;&#20854;&#20316;&#20026; + <code class="computeroutput"><span class="keyword">new</span></code> &#25805;&#20316;&#31526;&#26500;&#24314;&#23545;&#35937;&#26102;&#20998;&#37197;&#12289;&#21450;&#20854;&#23601;&#22320;&#20998;&#37197;&#24418;&#24335; + &#30340;&#20869;&#23384;&#31649;&#29702;&#20043;&#29992;&#12290;&#19968;&#20010;&#24102;&#26377; Allocator &#65288;&#20998;&#37197;&#22120;&#65289;&#25335;&#36125;&#24182;&#29992;&#20110;&#35843;&#29992;&#26512;&#26500;&#20989;&#25968;&#12289;&#22238;&#25910;&#20869;&#23384;&#30340;&#20989;&#25968;&#23545;&#35937;&#23558; + &#20316;&#20026;&#31532;&#20108;&#20010;&#21442;&#25968;&#20256;&#36882;&#32473; <code class="computeroutput"><span class="identifier">Pointer</span></code> + &#31867;&#30340;&#26500;&#36896;&#20989;&#25968;&#65288;&#35201;&#27714;&#19968;&#20010; __smart<span class="underline">pointer</span>_ + &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;&#24517;&#39035;&#26377; &#31526;&#21512;&#35201;&#27714;&#30340;&#26500;&#36896;&#20989;&#25968;&#65292;&#27604;&#22914; <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>&#65289;&#12290;
       </p>
 <p>
If a third template argument is <code class="computeroutput"><span class="identifier">factory_passes_alloc_to_smart_pointer</span></code>, the allocator itself is used for the third constructor argument of <code class="computeroutput"><span class="identifier">Pointer</span></code> (<a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a> then uses the allocator - to manage the memory of its seperately allocated reference counter). + to manage the memory of its seperately allocated reference counter).<br> + &#33509;&#32473;&#23450;&#20102; <code class="computeroutput"><span class="identifier">factory_passes_alloc_to_smart_pointer</span></code> + &#20316;&#20026;&#31532;&#19977;&#20010;&#27169;&#26495;&#21442;&#25968;&#65292;&#21017; allocator&#65288;&#20998;&#37197;&#22120;&#65289;&#26412;&#36523;&#23558;&#20316;&#20026;&#31532;&#19977;&#20010;&#21442;&#25968;&#20256;&#36882;&#32473; + <code class="computeroutput"><span class="identifier">Pointer</span></code> &#31867;&#65288;<a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm"; target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a> &#23558;&#20351;&#29992;&#27492; allocator&#65288;&#20998;&#37197;&#22120;&#65289;&#29992;&#20110;&#20854;&#36827;&#34892;&#24341;&#29992;&#35745;&#25968;&#22120;&#30340;&#29420;&#31435;&#20998;&#37197;&#30340;&#20869;&#23384;&#30340;&#31649;&#29702;&#65289;&#12290;
       </p>
-<a name="boost_functional_factory.reference.factory.header"></a><h4>
-<a name="id937729"></a>
- <a href="index.html#boost_functional_factory.reference.factory.header">Header</a>
-      </h4>
+<a name="boost_functional_factory.reference.factory.header_______________"></a><h5>
+<a name="id4861212"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.factory.header_______________">Header&#65288;&#22836;&#25991;&#20214;&#65289;</a>
+      </h5>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">factory</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
-<a name="boost_functional_factory.reference.factory.synopsis"></a><h4>
-<a name="id937804"></a>
- <a href="index.html#boost_functional_factory.reference.factory.synopsis">Synopsis</a>
-      </h4>
+<a name="boost_functional_factory.reference.factory.synopsis____________"></a><h5>
+<a name="id4861280"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.factory.synopsis____________">Synopsis&#65288;&#25688;&#35201;&#65289;</a>
+      </h5>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span>
 <span class="special">{</span>
<span class="keyword">enum</span> <span class="identifier">factory_alloc_propagation</span>
@@ -435,35 +529,42 @@
 <span class="special">}</span>
 </pre>
 <div class="variablelist">
-<p class="title"><b>Notation</b></p>
+<p class="title"><b>Notation&#65288;&#34920;&#31034;&#27861;&#65289;</b></p>
 <dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">T</span></code></span></dt>
 <dd><p>
-            an arbitrary type with at least one public constructor
-          </p></dd>
+ an arbitrary type with at least one public constructor<br> &#26377;&#33267;&#23569;&#19968;&#20010; + public &#26500;&#36896;&#20989;&#25968;&#30340;&#20219;&#24847;&#31867;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></span></dt>
 <dd><p>
- pointer or smart pointer to <code class="computeroutput"><span class="identifier">T</span></code>
-          </p></dd>
+ pointer or smart pointer to <code class="computeroutput"><span class="identifier">T</span></code><br> + &#25351;&#21521; <code class="computeroutput"><span class="identifier">T</span></code> &#30340;&#25351;&#38024;&#25110; + smart pointer &#65288;&#26234;&#33021;&#25351;&#38024;&#65289;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt>
 <dd><p>
- argument LValues to a constructor of <code class="computeroutput"><span class="identifier">T</span></code>
-          </p></dd>
+ argument LValues to a constructor of <code class="computeroutput"><span class="identifier">T</span></code><br> + &#35843;&#29992; <code class="computeroutput"><span class="identifier">T</span></code> &#26500;&#36896;&#20989;&#25968;&#30340;&#35832;&#24038;&#20540;&#21442;&#25968;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
 <dd><p>
- the type <code class="computeroutput"><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">P</span><span class="special">&gt;</span></code>
-          </p></dd>
+ the type <code class="computeroutput"><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">P</span><span class="special">&gt;</span></code><br> + <code class="computeroutput"><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">P</span><span class="special">&gt;</span></code>
+              &#30340;&#31867;&#22411;
+            </p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
 <dd><p>
- an instance object of <code class="computeroutput"><span class="identifier">F</span></code>
-          </p></dd>
+ an instance object of <code class="computeroutput"><span class="identifier">F</span></code><br> + <code class="computeroutput"><span class="identifier">F</span></code> &#31867;&#30340;&#19968;&#20010;&#23545;&#35937;&#23454;&#20363;
+            </p></dd>
 </dl>
 </div>
-<a name="boost_functional_factory.reference.factory.expression_semantics"></a><h4>
-<a name="id938169"></a>
- <a href="index.html#boost_functional_factory.reference.factory.expression_semantics">Expression
-        Semantics</a>
-      </h4>
+<a name="boost_functional_factory.reference.factory.expression_semantics_____________________"></a><h5>
+<a name="id4861695"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.factory.expression_semantics_____________________">Expression + Semantics&#65288;&#34920;&#36798;&#24335;&#35821;&#20041;&#65289;</a>
+      </h5>
 <div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -471,83 +572,91 @@
 </colgroup>
 <thead><tr>
 <th>
-              <p>
-                Expression
-              </p>
+                <p>
+                  Expression&#65288;&#34920;&#36798;&#24335;&#65289;
+                </p>
               </th>
 <th>
-              <p>
-                Semantics
-              </p>
+                <p>
+                  Semantics&#65288;&#35821;&#20041;&#65289;
+                </p>
               </th>
 </tr></thead>
 <tbody>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">()</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">()</span></code>
+                </p>
               </td>
 <td>
-              <p>
- creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>.
-              </p>
+                <p>
+ creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>. + <br> &#24314;&#31435;&#31867;&#22411; <code class="computeroutput"><span class="identifier">F</span></code>
+                  &#30340;&#19968;&#20010;&#23545;&#35937;&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
+                </p>
               </td>
 <td>
-              <p>
- creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>.
-              </p>
+                <p>
+ creates an object of type <code class="computeroutput"><span class="identifier">F</span></code>. + <br> &#24314;&#31435;&#31867;&#22411; <code class="computeroutput"><span class="identifier">F</span></code>
+                  &#30340;&#19968;&#20010;&#23545;&#35937;&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
+                </p>
               </td>
 <td>
-              <p>
- dynamically creates an object of type <code class="computeroutput"><span class="identifier">T</span></code> - using <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code> as arguments for the constructor
-                invocation.
-              </p>
+                <p>
+ dynamically creates an object of type <code class="computeroutput"><span class="identifier">T</span></code> + using <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code> as arguments for the constructor + invocation.<br> &#20351;&#29992; <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code> &#20316;&#20026;&#21442;&#25968;&#35843;&#29992;&#26500;&#36896;&#20989;&#25968;&#21160;&#24577;&#24314;&#31435;&#19968;&#20010; + <code class="computeroutput"><span class="identifier">T</span></code> &#31867;&#22411;&#30340;&#23545;&#35937;&#12290;
+                </p>
               </td>
 </tr>
 <tr>
 <td>
-              <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">result_type</span></code>
-              </p>
+                <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">result_type</span></code>
+                </p>
               </td>
 <td>
-              <p>
- is the type <code class="computeroutput"><span class="identifier">P</span></code> with
-                top-level cv-qualifiers removed.
-              </p>
+                <p>
+ is the type <code class="computeroutput"><span class="identifier">P</span></code> with + top-level cv-qualifiers removed. <br> <code class="computeroutput"><span class="identifier">P</span></code> + &#30340;&#31867;&#22411;&#65292;&#20294;&#39030;&#32423;&#30340; cv &#38480;&#23450;&#35789;&#34987;&#31227;&#38500;&#12290;
+                </p>
               </td>
 </tr>
 </tbody>
 </table></div>
-<a name="boost_functional_factory.reference.factory.limits"></a><h4>
-<a name="id938440"></a>
- <a href="index.html#boost_functional_factory.reference.factory.limits">Limits</a>
-      </h4>
+<a name="boost_functional_factory.reference.factory.limits____________"></a><h5>
+<a name="id4862034"></a>
+ <a class="link" href="index.html#boost_functional_factory.reference.factory.limits____________">Limits&#65288;&#38480;&#21046;&#65289;</a>
+      </h5>
 <p>
The macro BOOST_FUNCTIONAL_FACTORY_MAX_ARITY can be defined to set the maximum
-        arity. It defaults to 10.
+ arity. It defaults to 10.<br> &#21487;&#23450;&#20041; BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY + &#23439;&#26469;&#20915;&#23450;&#24037;&#21378;&#21487;&#25509;&#21463;&#30340;&#26368;&#22810;&#21442;&#25968;&#20540;&#65292; &#40664;&#35748;&#20540;&#26159;10&#12290;
       </p>
 </div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_functional_factory.acknowledgements"></a><a href="index.html#boost_functional_factory.acknowledgements" title="Acknowledgements">Acknowledgements</a></h2></div></div></div> +<a name="boost_functional_factory.acknowledgements"></a><a class="link" href="index.html#boost_functional_factory.acknowledgements" title="Acknowledgements&#65288;&#40483;&#35874;&#65289;"> Acknowledgements&#65288;&#40483;&#35874;&#65289;</a>
+</h2></div></div></div>
 <p>
Eric Niebler requested a function to invoke a type's constructor (with the arguments supplied as a Tuple) as a Fusion feature. These Factory utilities
@@ -567,7 +676,8 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_functional_factory.references"></a><a href="index.html#boost_functional_factory.references" title="References">References</a></h2></div></div></div> +<a name="boost_functional_factory.references"></a><a class="link" href="index.html#boost_functional_factory.references" title="References&#65288;&#21442;&#32771;&#65289;"> References&#65288;&#21442;&#32771;&#65289;</a>
+</h2></div></div></div>
 <div class="orderedlist"><ol type="1">
 <li>
<a href="http://en.wikipedia.org/wiki/Design_Patterns"; target="_top">Design Patterns</a>,

Other related posts:

  • » [boost-doc-zh] r411 committed - [No log message] - boost-doc-zh