[boost-doc-zh commit] r237 - no log message

  • From: codesite-noreply@xxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Wed, 08 Apr 2009 11:49:36 +0000

Author: zengkun100
Date: Wed Apr  8 04:43:38 2009
New Revision: 237

Modified:
   trunk/libs/flyweight/doc/examples.html
   trunk/libs/flyweight/doc/index.html
   trunk/libs/flyweight/doc/performance.html
   trunk/libs/flyweight/doc/reference/factories.html
   trunk/libs/flyweight/doc/reference/flyweight.html
   trunk/libs/flyweight/doc/reference/holders.html
   trunk/libs/flyweight/doc/reference/index.html
   trunk/libs/flyweight/doc/reference/key_value.html
   trunk/libs/flyweight/doc/reference/locking.html
   trunk/libs/flyweight/doc/reference/tags.html
   trunk/libs/flyweight/doc/reference/tracking.html
   trunk/libs/flyweight/doc/tests.html
   trunk/libs/flyweight/doc/tutorial/basics.html
   trunk/libs/flyweight/doc/tutorial/configuration.html
   trunk/libs/flyweight/doc/tutorial/extension.html
   trunk/libs/flyweight/doc/tutorial/index.html
   trunk/libs/flyweight/doc/tutorial/key_value.html
   trunk/libs/flyweight/doc/tutorial/lambda_expressions.html
   trunk/libs/flyweight/doc/tutorial/technical.html

Log:


Modified: trunk/libs/flyweight/doc/examples.html
==============================================================================
--- trunk/libs/flyweight/doc/examples.html      (original)
+++ trunk/libs/flyweight/doc/examples.html      Wed Apr  8 04:43:38 2009
@@ -1,62 +1,367 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 Transitional//EN">
-
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Flyweight Documentation - Examples</title>
-<link rel="stylesheet" href="style.css" type="text/css">
-<link rel="start" href="index.html">
-<link rel="prev" href="performance.html">
-<link rel="up" href="index.html">
-<link rel="next" href="tests.html">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <title>Boost.Flyweight Documentation - Examples</title>
+  <link rel="stylesheet" href="style.css" type="text/css">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="start" href="index.html">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="prev" href="performance.html">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="up" href="index.html">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="next" href="tests.html">
 </head>

+
 <body>
-<h1><img src="../../../boost.png" alt="Boost logo" align=
-"middle" width="277" height="86">Boost.Flyweight Examples</h1>
+
+
+
+
+
+
+
+
+<h1><img src="../../../boost.png" alt="Boost logo" align="middle" height="86" width="277">Boost.Flyweight Examples</h1>
+
+
+
+
+
+
+
+

<div class="prev_link"><a href="performance.html"><img src="prev.gif" alt="performance" border="0"><br>
+
+
+
+
+
+
+
+
 Performance
 </a></div>
+
+
+
+
+
+
+
+
<div class="up_link"><a href="index.html"><img src="up.gif" alt="index" border="0"><br>
+
+
+
+
+
+
+
+
 Index
 </a></div>
+
+
+
+
+
+
+
+
<div class="next_link"><a href="tests.html"><img src="next.gif" alt="tests" border="0"><br>
+
+
+
+
+
+
+
+
 Tests
-</a></div><br clear="all" style="clear: all;">
-<br clear="all" style="clear: all;">
+</a></div>
+
+
+
+
+
+
+
+<br style="" clear="all">
+
+
+
+
+
+
+
+
+<br style="" clear="all">
+
+
+
+
+
+
+
+

 <hr>

-<h2>Contents</h2>
+<h2>Contents &nbsp;&#30446;&#24405;</h2>
+
+
+
+
+
+
+
+

 <ul>
-  <li><a href="#example1">Example 1: basic usage</a></li>
+
+
+
+
+
+
+
+
+ <li><a href="#example1">Example 1: basic usage &nbsp;&#20363;1&#65306;&#22522;&#26412;&#29992;&#27861;</a></li>
+
+
+
+
+
+
+
+
   <li><a href="#example2">Example 2: key-value flyweights</a></li>
+
+
+
+
+
+
+
+
<li><a href="#example3">Example 3: flyweights and the composite pattern</a></li>
+
+
+
+
+
+
+
+
   <li><a href="#example4">Example 4: formatted text processing</a></li>
+
+
+
+
+
+
+
+
   <li><a href="#example5">Example 5: flyweight-based memoization</a></li>
+
+
+
+
+
+
+
+
   <li><a href="#example6">Example 6: performance comparison</a></li>
+
+
+
+
+
+
+
+
   <li><a href="#example7">Example 7: custom factory</a></li>
+
+
+
+
+
+
+
+
 </ul>

-<h2><a name="example1">Example 1: basic usage</a></h2>
+
+
+
+
+
+
+
+
+<h2><a name="example1">Example 1: basic usage &nbsp;&#20363;1&#65306;&#22522;&#26412;&#29992;&#27861;</a></h2>
+
+
+
+
+
+
+
+

 <p>
-See <a href="../example/basic.cpp">source code</a>.
+See <a href="../example/basic.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/basic.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 Dummy program showing the basic capabilities of <code>flyweight</code>
-explained at the <a href="tutorial/basics.html">tutorial</a>.
+explained at the <a href="tutorial/basics.html">tutorial</a>.</p>
+
+
+
+
+
+
+
+<p>&#23637;&#31034;<a href="tutorial/basics.html">&#25945;&#31243;</a>&#20013;&#25152;&#35762;&#36848;&#30340; <code>flyweight</code>&nbsp;&#22522;&#26412;&#21151;&#33021;&#30340;&#20667;&#29916;&#31243;&#24207;&#12290;
 </p>

-<h2><a name="example2">Example 2: key-value flyweights</a></h2>
+
+
+
+
+
+
+
+
+<h2><a name="example2">Example 2: key-value flyweights&nbsp;&#20363;2&#65306;&#38190;-&#20540; flyweights</a></h2>
+
+
+
+
+
+
+
+

 <p>
-See <a href="../example/key_value.cpp">source code</a>.
+See <a href="../example/key_value.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/key_value.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 The program simulates the scenario described at the tutorial section on
 <a href="tutorial/key_value.html">key-value flyweights</a>: The class
@@ -66,15 +371,47 @@
 them into key-value flyweights keyed by filename. Observe how the
 execution of the program results in no extra constructions or copies
 of objects of type <code>texture</code> except those absolutely
-necessary.
-</p>
+necessary.</p>
+
+
+
+
+<p>
+
+&#35813;&#31243;&#24207;&#27169;&#25311;&#30340;&#22330;&#26223;&#22312;&#25945;&#31243;&#30340;<a href="tutorial/key_value.html">&#38190;-&#20540; flyweights</a>&#31456;&#33410;&#20013;&#25551;&#36848;&#65306;&#31867;<code>texture</code>&#31649;&#29702;&#30528;&#19968;&#20123;&#23384;&#20648;&#22312;&#25991;&#20214;&#20013;&#30340;&#32441;&#29702;&#28210;&#26579;&#25968;&#25454;&#65292;&#25991;&#20214;&#30340;&#20301;&#32622;&#22312;&#26500;&#36896;&#30340;&#26102;&#20505;
+&#32473;&#20986;&#12290;&#35813;&#31243;&#24207;&#36890;&#36807;&#25226;&#36825;&#20010;&#31867;&#23553;&#35013;&#36827;&#20197;&#25991;&#20214;&#21517;&#20026;&#38190;&#30340;&#38190;-&#20540;flyweights&#26469;&#22788;&#29702;&#22823;&#37327;&#35813;&#31867;&#22411;&#30340;&#23545;&#35937;&#12290;&#35266;&#23519;&#31243;&#24207;&#26159;&#24590;&#26679;&#36816;&#34892;&#30340;&#65292;&#20351;&#24471;&#38500;&#20102;&#37027;&#20123;&#32477;&#23545;&#24517;&#39035;&#30340;&#26500;&#36896;&#21644;
+&#25335;&#36125;&#20043;&#22806;&#65292;&#20877;&#27809;&#26377;&#22810;&#20313;&#30340;&#25805;&#20316;&#12290;</p>
+
+
+
+
+
+
+
+
+
+<h2><a name="example3">Example 3: flyweights and the composite pattern &nbsp;&#20363;3&#65306;flyweights &#21644;&#32452;&#21512;&#27169;&#24335;</a></h2>
+
+
+
+
+
+
+

-<h2><a name="example3">Example 3: flyweights and the composite pattern</a></h2>

 <p>
-See <a href="../example/composite.cpp">source code</a>.
+See <a href="../example/composite.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/composite.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 The <a href="http://c2.com/cgi/wiki?CompositePattern";><i>composite
 design pattern</i></a> revolves about the idea that a tree data structure
@@ -86,34 +423,100 @@
 having a high degree of duplication of nodes and subtrees (as for instance
 those generated when parsing a computer program) are a natural fit for the
 flyweight idiom: simply turning the node type into a flyweight
-automatically deals with duplication at the node and subtree level.
-</p>
+automatically deals with duplication at the node and subtree level.</p>
+
+
+<p><a href="http://c2.com/cgi/wiki?CompositePattern";>&#32452;&#21512;&#35774;&#35745;&#27169;&#24335;</a>&#22260;&#32469;&#30340;&#24605;&#24819;&#26159;&#65306;&#36890;&#36807;
+&#23450;&#20041;&#26641;&#33410;&#28857;&#31867;&#22411;&#20026;&#22810;&#24577;&#30340;&#31867;&#22411;&#65292;&#20351;&#24471;&#23427;&#35201;&#20040;&#26159;&#19968;&#20010;&#21494;&#23376;&#33410;&#28857;&#35201;&#20040;&#21253;&#21547;&#25351;&#21521;&#23376;&#33410;&#28857;&#25351;&#38024;&#30340;&#38142;&#34920;&#65292;&#19968;&#20010;&#26641;&#22411;&#25968;&#25454;&#32467;&#26500;&#21487;&#20197;&#34987;&#23481;&#26131;&#30340;&#21019;&#24314;&#21644;&#22788;&#29702;&#12290;&#25353;&#29031;&#36825;&#31181;&#26041;&#24335;&#65292;&#19968;&#26869;&#25968;&#21644;
+&#23427;&#30340;&#26681;&#33410;&#28857;&#23601;&#26159;&#23436;&#20840;&#30456;&#21516;&#30340;&#23454;&#20307;&#20102;&#65292;&#36825;&#26679;&#23601;&#21487;&#20197;&#36827;&#34892;&#38750;&#24120;&#31616;&#21333;&#30340;&#26641;&#24418;&#22788;&#29702;&#31639;&#27861;&#12290;&#33410;&#28857;&#21644;&#23376;&#26641;&#30340;&#37325;&#22797;&#24230;&#24456;&#39640;&#30340;&#22823;&#22411;&#22797;&#21512;&#26641;&#65288;&#20363;&#22914;&#22312;&#20998;&#26512;&#35745;&#31639;&#26426;&#31243;&#24207;&#26102;&#29983;&#25104;&#30340;&#26641;&#65289;&#29983;&#26469;&#23601;
+&#36866;&#21512;flyweight&#24815;&#29992;&#27861;&#65306;&#21482;&#38656;&#31616;&#21333;&#30340;&#23558;&#33410;&#28857;&#31867;&#22411;&#21464;&#20026;&#19968;&#20010;flyweight&#23601;&#21487;&#20197;&#33258;&#21160;&#30340;&#22788;&#29702;&#33410;&#28857;&#21644;&#23376;&#26641;&#30340;&#37325;&#22797;&#12290;</p>
+

-<p>
 The example program parses Lisp-like lists of the form
 <code>(a<sub>1</sub> ... a<sub><i>n</i></sub>)</code> where each
 <code>a<sub>i</sub></code> is a terminal string or a list. The parsed
data structure is a composite type defined using Boost.Flyweight in conjunction
 with the recursive facilities of
-<a href="../../variant/index.html">Boost.Variant</a>. So, given the list
-</p>
+<a href="../../variant/index.html">Boost.Variant</a>. So, given the list<br>
+
+
+<br>
+
+
+&#31034;&#20363;&#31243;&#24207;&#20998;&#26512;&#20855;&#26377;<code>(a<sub>1</sub> ... a<sub><i>n</i></sub>)</code>&#26684;&#24335;&#30340;&#31867;&#20284;Lisp&#30340;&#38142;&#34920;&#65292;&#20854;&#20013;&#27599;&#20010;<code>a<sub>i</sub></code>&#26159;&#20010;&#23383;&#31526;&#20018;&#25110;&#32773;&#26159;&#19968;&#20010;&#38142;&#34920;&#12290;&#20998;&#26512;&#20986;&#30340;&#25968;&#25454;&#32467;&#26500;&#26159;&#19968;&#20010;Boost.Flyweight&#32467;&#21512;<a href="../../variant/index.html">Boost.Variant</a>&#36882;&#24402;&#24037;&#20855;&#23450;&#20041;&#20986;&#30340;&#32452;&#21512;&#31867;&#22411;&#12290;&#20110;&#26159;&#65292;&#32473;&#23450;&#36825;&#20010;&#38142;&#34920;&#12290;
+
+
+
+
+
+
+
+<blockquote>
+
+
+
+
+
+
+
+ <pre>(= (tan (+ x y))(/ (+ (tan x)(tan y))(- 1 (* (tan x)(tan y)))))<br></pre>
+
+
+
+
+
+
+
+</blockquote>
+
+
+
+
+
+
+

-<blockquote><pre>
-(= (tan (+ x y))(/ (+ (tan x)(tan y))(- 1 (* (tan x)(tan y)))))
-</pre></blockquote>

 <p>
 the resulting data structure implicitly detects the duplicated
 occurrences of <code>+</code>, <code>x</code>, <code>y</code>,
-<code>tan</code>, <code>(tan x)</code> and <code>(tan y)</code>.
+<code>tan</code>, <code>(tan x)</code> and <code>(tan y)</code>.</p>
+
+
+<p>&#32467;&#26524;&#25968;&#25454;&#32467;&#26500;&#26263;&#22320;&#37324;<span class="wbtr_mn">&#26816;&#27979;</span>&#21040;&#20102;&#37325;&#22797;&#30340;<code>+</code>, <code>x</code>, <code>y</code>, +<code>tan</code>, <code>(tan x)</code> &#21644; <code>(tan y)&#12290;</code>
 </p>

-<h2><a name="example4">Example 4: formatted text processing</a></h2>
+
+
+
+
+
+
+
+
+<h2><a name="example4">Example 4: formatted text processing &nbsp;&#20363;4&#65306;&#26684;&#24335;&#21270;&#25991;&#26412;&#22788;&#29702;</a></h2>
+
+
+
+
+
+
+
+

 <p>
-See <a href="../example/html.cpp">source code</a>.
+See <a href="../example/html.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/html.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 A classic example of application of the flyweight pattern is that of a
 text processor which handles characters with rich formatting information,
@@ -121,24 +524,61 @@
 Coding the formatting information of each character takes considerable
 space, but, given the high degree of repetition typical in a document,
 maintaining formatted characters as flyweight objects drastically reduces
-memory consumption.
+memory consumption.</p>
+
+
+<p>&#22788;&#29702;&#21547;&#26377;&#20016;&#23500;&#26684;&#24335;&#21270;&#20449;&#24687;&#23383;&#31526;&#30340;&#23383;&#22788;&#29702;&#31243;&#24207;&#26159;flyweight&#27169;&#24335;&#30340;&#20856;&#22411;&#20363;&#23376;&#65292;&#36825;&#20123;&#20449;&#24687;&#26377;&#23383;&#20307;&#31867;&#22411;&#65292;&#22823;&#23567;&#65292;&#39068;&#33394;&#21644;&#29305;&#27530;&#30340;&#36873;&#39033;&#65288;&#40657;&#20307;&#65292;&#26012;&#20307;&#65292;&#31561;&#31561;&#65289;&#12290;
+&#20026;&#27599;&#19968;&#20010;&#23383;&#31526;&#32534;&#30721;&#26684;&#24335;&#21270;&#20449;&#24687;&#20250;&#28040;&#32791;&#22823;&#37327;&#30340;&#31354;&#38388;&#65292;&#20294;&#26159;&#65292;&#32771;&#34385;&#21040;&#36890;&#24120;&#19968;&#20010;&#25991;&#26723;&#20013;&#37325;&#22797;&#24230;&#26159;&#24456;&#39640;&#30340;&#65292;&#23558;&#26684;&#24335;&#21270;&#30340;&#23383;&#31526;&#20316;&#20026;flyweight&#23545;&#35937;&#26469;&#32500;&#25252;&#21487;&#20197;&#26174;&#33879;&#30340;&#20943;
+&#23569;&#20869;&#23384;&#28040;&#32791;&#12290;
 </p>

+
+
+
+
+
+
+
+
 <p>
 The example program parses, manipulates and stores HTML documents following
 flyweight-based representation techniques. Given the hierarchical nature
 of HTML markup, a crude approximation to the formatting options of a given
 character is just to equate them with the stack of tag contexts to which
-the character belongs, as the figure shows.
+the character belongs, as the figure shows.</p>
+
+<p>&#35813;&#31034;&#20363;&#31243;&#24207;&#37319;&#29992;&#22522;&#20110;flyweight&#30340;&#34920;&#31034;&#25216;&#26415;&#20998;&#26512;&#65292;&#22788;&#29702;&#21644;&#23384;&#20648;HTML&#25991;&#26723;&#12290;&#32771;&#34385;&#21040;HTML&#26631;&#35760;&#20998;&#23618;&#30340;&#24615;&#36136;&#65292;&#19968;&#31181;&#23545;&#32473;&#23450;&#23383;&#31526;&#30340;&#26684;&#24335;&#21270;&#36873;&#39033;&#31895;&#30053;&#30340;&#36817;&#20284;&#26159;&#23558;&#23427;&#31561;&#21516;&#20110;&#23383;&#31526;&#38582;&#23646;&#30340;&#26631;&#35760;&#19978;&#19979;&#25991;&#30340;&#22534;&#26632;&nbsp; &#65292;&#22914;&#22270;&#25152;&#31034;&#12290;
 </p>

+
+
+
+
+
+
+
+
 <p align="center">
-<img src="html.png"
-alt="formatting contexts of characters in an HTML document"
-width="320" height="275"><br>
+<img src="html.png" alt="formatting contexts of characters in an HTML document" height="275" width="320"><br>
+
+
+
+
+
+
+
+
 <b>Fig. 1: Formatting contexts of characters in an HTML document.</b>
 </p>

+
+
+
+
+
+
+
+
 <p>
 HTML documents are then parsed as arrays of (character, format)
pairs, where the format is the tag context as described above. The very high
@@ -149,22 +589,60 @@
 reverses the text occupying the central portion of the document.
 Saving the result in HTML reduces to traversing the array of formatted
characters and emitting opening/closing HTML tags as the context of adjacent
-characters varies.
+characters varies.</p>
+
+<p>&#20110;&#26159;HTML&#25991;&#26723;&#34987;&#20998;&#26512;&#25104;&#65288;&#23383;&#31526;&#65292;&#26684;&#24335;&#65289;&#23545;&#30340;&#25968;&#32452;&#65292;&#36825;&#37324;&#26684;&#24335;&#26159;&#19978;&#25991;&#25551;&#36848;&#30340;&#26631;&#35760;&#19978;&#19979;&#25991;&#12290;&#26684;&#24335;&#21270;&#20449;&#24687;&#30340;&#39640;&#24230;&#20887;&#20313;&#20132;&#32473;Boost.Flyweight&#21435;&#22788;
+&#29702;&#12290;&#36825;&#31181;&#22522;&#20110;&#23383;&#31526;&#30340;&#25551;&#36848;&#35753;&#25805;&#32437;&#25991;&#26723;&#21464;&#24471;&#31616;&#21333;&#65306;&#35843;&#25442;&#21644;&#21024;&#38500;&#25991;&#26412;&#20013;&#30340;&#37096;&#20998;&#26159;&#23567;&#33756;&#19968;&#30879;&#12290;&#20363;&#22914;&#65292;&#35813;&#31243;&#24207;&#21453;&#36716;&#20102;&#25991;&#26723;&#20013;&#37096;&#30340;&#25991;&#26412;&#12290;&#20445;&#23384;&#32467;&#26524;&#20026;HTML&#21464;&#20026;&#36941;&#21382;&#26684;&#24335;&#21270;&#23383;
+&#31526;&#30340;&#25968;&#32452;&#28982;&#21518;&#24403;&#30456;&#37051;&#23383;&#31526;&#30340;&#19978;&#19979;&#25991;&#25913;&#21464;&#26102;&#24377;&#20986;&#24320;/&#20851;HTML&#26631;&#35760;&#12290;
 </p>

+
+
+
+
+
+
+
+
 <p>
 For the sake of brevity, the HTML parsing capabilities of this program
are coarse: for instance, elements without end-tag (like &lt;BR&gt;), character
 enconding and HTML entities (e.g. "&amp;copy;" for &copy;) are not properly
-handled. Improving the parsing code is left as an exercise to the reader.
+handled. Improving the parsing code is left as an exercise to the reader.</p>
+
+<p>&#20026;&#31616;&#27905;&#36215;&#35265;&#65292;&#35813;&#31243;&#24207;&#30340;HTML&#20998;&#26512;&#21151;&#33021;&#26159;&#31895;&#31961;&#30340;&#65306;&#20363;&#22914;&#65292;&#27809;&#26377;&#32467;&#26463;&#26631;&#35760;&#30340;&#20803;&#32032;&#65288;&#27604;&#22914;&lt;BR&gt;&#65289;&#65292;&#23383;&#31526;&#32534;&#30721;&#21644;HTML&#23454;&#20307;&#23383;&#31526;&#65288;&#27604;&#22914; "&amp;copy;" &#20195;&#34920; &copy;&#65289;&#19981;&#33021;&#36866;&#24403;&#30340;&#22788;&#29702;&#12290;&#25913;&#36827;&#36825;&#20010;&#20998;&#26512;&#31243;&#24207;&#30041;&#32473;&#35835;&#32773;&#20316;&#20026;&#32451;&#20064;&#12290;
 </p>

-<h2><a name="example5">Example 5: flyweight-based memoization</a></h2>
+
+
+
+
+
+
+
+
+<h2><a name="example5">Example 5: flyweight-based memoization &nbsp;&#20363;5&#65306;&#22522;&#20110;flyweight&#30340;memoization</a></h2>
+
+
+
+
+
+
+
+

 <p>
-See <a href="../example/fibonacci.cpp">source code</a>.
+See <a href="../example/fibonacci.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/fibonacci.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 <a href="http://en.wikipedia.org/wiki/Memoization";>Memoization</a>
 is an optimization technique consisting in caching
@@ -177,35 +655,98 @@
 <code>compute_f</code> is a type that does the computation of
<i>f</i>(<i>n</i>) at its <code>compute_f::compute_f(int)</code> constructor. For instance, the <a href="http://mathworld.wolfram.com/FibonacciNumber.html";>Fibonacci
-numbers</a> can be computed with memoization like this:
-</p>
+numbers</a> can be computed with memoization like this:</p>
+
+
+
+<p><a href="http://en.wikipedia.org/wiki/Memoization";>Memoization</a>&nbsp;&#26159;&#19968;&#31181;&#23558;&#35745;&#31639;&#32467;&#26524;&#32531;&#23384;&#36215;&#26469;&#20379;&#20197;&#21518;&#22797;&#29992;&#30340;&#20248;&#21270;&#25216;&#26415;&#65307;&#20363;&#22914;&#36825;&#31181;&#20248;&#21270;&#25216;&#26415;&#22312;&#36827;&#34892;&#36882;&#24402;&#30340;&#25968;&#20540;&#35745;&#31639;&#26102;&#21487;&#20197;&#26497;&#22823;&#30340;&#25552;&#21319;&#24615;&#33021;&#12290;&#36890;&#36807;&#23558;&#19968;&#20010;&#20989;&#25968;&#30340;memoized&#35843;&#29992;&#30475;&#20316;&#31867;&#22411;<code>flyweight&lt;key_value&lt;int,compute_f&gt; &gt;</code>&#30340;&#20540;&#65292;<a href="tutorial/key_value.html">&#38190;-&#20540; flyweights</a>&#21487;&#20197;&#29992;&#26469;&#23454;&#29616;&#25968;&#20540;&#20989;&#25968;<i>f</i>&#30340;memoization&#21270;&#65292;&#22312;&#36825;&#37324;<code>compute_f</code>&#31867;&#22411;&#22312;&#23427;&#30340;&#26500;&#36896;&#20989;&#25968;<code>compute_f::compute_f(int)</code>&#37324;&#35745;&#31639;<i>f</i>(<i>n</i>)&#12290;&#20363;&#22914;&#65292;<a href="http://mathworld.wolfram.com/FibonacciNumber.html";>Fibonacci &#25968;</a>&#21487;&#20197;&#20687;&#36825;&#26679;&#20351;&#29992;memoization&#26469;&#35745;&#31639;&#12290;</p>
+
+
+
+
+
+
+
+
+
+<blockquote>
+
+
+
+
+
+
+
+ <pre><span class="keyword">typedef</span> <span class="identifier">flyweight</span><span class="special">&lt;</span><span class="identifier">key_value</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">compute_fibonacci</span><span class="special">&gt;,</span><span class="identifier">no_tracking</span><span class="special">&gt;</span> <span class="identifier">fibonacci</span><span class="special">;</span>
+
+<span class="keyword">struct</span> <span class="identifier">compute_fibonacci</span>
+<span class="special">{</span>
+ <span class="identifier">compute_fibonacci</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span> + <span class="identifier">result</span><span class="special">(</span><span class="identifier">n</span><span class="special">==</span><span class="number">0</span><span class="special">?</span><span class="number">0</span><span class="special">:</span><span class="identifier">n</span><span class="special">==</span><span class="number">1</span><span class="special">?</span><span class="number">1</span><span class="special">:</span><span class="identifier">fibonacci</span><span class="special">(</span><span class="identifier">n</span><span class="special">-</span><span class="number">2</span><span class="special">).</span><span class="identifier">get</span><span class="special">()+</span><span class="identifier">fibonacci</span><span class="special">(</span><span class="identifier">n</span><span class="special">-</span><span class="number">1</span><span class="special">).</span><span class="identifier">get</span><span class="special">())</span>
+  <span class="special">{}</span>
+
+ <span class="keyword">operator</span> <span class="keyword">int</span><span class="special">()</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">result</span><span class="special">;}</span> + <span class="keyword">int</span> <span class="identifier">result</span><span class="special">;</span>
+<span class="special">};</span></pre>
+
+
+
+
+
+
+
+</blockquote>
+
+
+
+
+
+

-<blockquote><pre>
-<span class=keyword>typedef</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>key_value</span><span class=special>&lt;</span><span class=keyword>int</span><span class=special>,</span><span class=identifier>compute_fibonacci</span><span class=special>&gt;,</span><span class=identifier>no_tracking</span><span class=special>&gt;</span> <span class=identifier>fibonacci</span><span class=special>;</span>

-<span class=keyword>struct</span> <span class=identifier>compute_fibonacci</span>
-<span class=special>{</span>
- <span class=identifier>compute_fibonacci</span><span class=special>(</span><span class=keyword>int</span> <span class=identifier>n</span><span class=special>):</span> - <span class=identifier>result</span><span class=special>(</span><span class=identifier>n</span><span class=special>==</span><span class=number>0</span><span class=special>?</span><span class=number>0</span><span class=special>:</span><span class=identifier>n</span><span class=special>==</span><span class=number>1</span><span class=special>?</span><span class=number>1</span><span class=special>:</span><span class=identifier>fibonacci</span><span class=special>(</span><span class=identifier>n</span><span class=special>-</span><span class=number>2</span><span class=special>).</span><span class=identifier>get</span><span class=special>()+</span><span class=identifier>fibonacci</span><span class=special>(</span><span class=identifier>n</span><span class=special>-</span><span class=number>1</span><span class=special>).</span><span class=identifier>get</span><span class=special>())</span>
-  <span class=special>{}</span>
-
- <span class=keyword>operator</span> <span class=keyword>int</span><span class=special>()</span><span class=keyword>const</span><span class=special>{</span><span class=keyword>return</span> <span class=identifier>result</span><span class=special>;}</span> - <span class=keyword>int</span> <span class=identifier>result</span><span class=special>;</span>
-<span class=special>};</span>
-</pre></blockquote>

 <p>
The <a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>
 policy is used so that the memoized computations persist for future
-use throughout the program. The provided program develops this example in full.
-</p>
+use throughout the program. The provided program develops this example in full.</p>
+
+
+
+<p>
+
+
+&#20351;&#29992;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&#31574;&#30053;&#30340;&#30446;&#30340;&#26159;&#35753;&#35745;&#31639;&#32467;&#26524;&#22312;&#25972;&#20010;&#31243;&#24207;&#36816;&#34892;&#30340;&#36807;&#31243;&#20013;&#37117;&#21487;&#29992;&#12290;&#31034;&#20363;&#31243;&#24207;&#35814;&#32454;&#35762;&#36848;&#20102;&#36825;&#20010;&#20363;&#23376;&#12290;</p>
+
+
+
+
+
+
+
+
+
+<h2><a name="example6">Example 6: performance comparison &nbsp;&#20363;6&#65306;&#24615;&#33021;&#27604;&#36739;</a></h2>
+
+
+
+
+
+
+

-<h2><a name="example6">Example 6: performance comparison</a></h2>

 <p>
-See <a href="../example/perf.cpp">source code</a>.
+See <a href="../example/perf.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/perf.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 This program measures the time and space performances of a simple
 string type against several differently configured <code>flyweight</code>
@@ -215,44 +756,178 @@
 components (the string type itself, flyweight factories, etc.) with custom
 allocators that keep track of the allocations and deallocations requested.
 The program has been used to produce the experimental results given
-at the <a href="performance.html#results">performance section</a>.
-</p>
+at the <a href="performance.html#results">performance section</a>.</p>
+
+
+<p>
+
+
+
+&#35813;&#31243;&#24207;&#23545;&#27604;&#27979;&#37327;&#20102;&#22312;&#36827;&#34892;&#19968;&#39033;&#24120;&#35268;&#30340;&#20219;&#21153;&#26102;&#19968;&#20010;&#31616;&#21333;&#30340;&#23383;&#31526;&#20018;&#31867;&#22411;&#21644;&#20960;&#20010;&#19981;&#21516;&#37197;&#32622;&#30340;<code>flyweight</code>&#23454;&#20363;&#30340;&#26102;&#38388;&#21644;&#31354;&#38388;&#24615;&#33021;&#65292;&#35813;&#20219;&#21153;&#21253;&#25324;&#20998;&#26512;&#19968;&#20010;&#25991;&#20214;&#36824;&#26377;&#23545;&#20998;&#26512;&#20986;
+&#26469;&#30340;&#25991;&#26412;&#36827;&#34892;&#19968;&#20123;&#25805;&#20316;&#12290;&#20869;&#23384;&#30340;&#28040;&#32791;&#26159;&#36890;&#36807;&#20026;&#30456;&#20851;&#31867;&#22411;&#65288;&#23383;&#31526;&#20018;&#31867;&#26412;&#36523;&#65292;flyweight&#24037;&#21378;&#31561;&#31561;&#65289;&#37197;&#22791;&#33258;&#23450;&#20041;&#30340;&#20998;&#37197;&#22120;&#20197;&#36319;&#36394;&#20998;&#37197;&#21644;&#37322;&#25918;&#35831;&#27714;&#35745;&#31639;&#20986;&#26469;&#30340;&#12290;<a href="performance.html#results">&#24615;&#33021;&#31456;&#33410;</a>&#20013;
+&#32473;&#20986;&#30340;&#23454;&#39564;&#32467;&#26524;&#23601;&#26159;&#30001;&#36825;&#20010;&#31243;&#24207;&#20135;&#29983;&#30340;&#12290;</p>
+
+
+
+
+
+
+
+
+
+<h2><a name="example7">Example 7: custom factory &nbsp;&#20363;7&#65306;&#33258;&#23450;&#20041;&#24037;&#21378;</a></h2>
+
+
+
+
+
+
+

-<h2><a name="example7">Example 7: custom factory</a></h2>

 <p>
-See <a href="../example/custom_factory.cpp">source code</a>.
+See <a href="../example/custom_factory.cpp">source code</a>. &nbsp;&#26597;&#30475;<a href="../example/custom_factory.cpp">&#28304;&#20195;&#30721;</a>
 </p>

+
+
+
+
+
+
+
+
 <p>
 The example shows how to write and use a custom factory class. This
"verbose" factory outputs messages tracing the invocations of its public interface
-by Boost.Flyweight, so helping the user visualize factory usage patterns.
-</p>
+by Boost.Flyweight, so helping the user visualize factory usage patterns.<br>
+
+
+
+
+
+
+&#36825;&#20010;&#20363;&#23376;&#28436;&#31034;&#20102;&#24590;&#26679;&#32534;&#20889;&#24182;&#20351;&#29992;&#19968;&#20010;&#33258;&#23450;&#20041;&#24037;&#21378;&#31867;&#12290;&#36825;&#20010;&ldquo;&#32599;&#21990;&#30340;&rdquo;&#24037;&#21378;&#36755;&#20986;Boost.Flyweight&#23545;&#23427;&#30340;&#20844;&#20849;&#25509;&#21475;&#30340;&#35843;&#29992;&#30340;&#20449;&#24687;&#65292;&#20197;&#27492;&#24110;&#21161;&#29992;&#25143;&#21487;&#35270;&#21270;&#24037;&#21378;&#30340;&#20351;&#29992;&#26041;&#24335;&#12290;</p>
+
+
+
+
+
+
+
+

 <hr>

<div class="prev_link"><a href="performance.html"><img src="prev.gif" alt="performance" border="0"><br>
+
+
+
+
+
+
+
+
 Performance
 </a></div>
+
+
+
+
+
+
+
+
<div class="up_link"><a href="index.html"><img src="up.gif" alt="index" border="0"><br>
+
+
+
+
+
+
+
+
 Index
 </a></div>
+
+
+
+
+
+
+
+
<div class="next_link"><a href="tests.html"><img src="next.gif" alt="tests" border="0"><br>
+
+
+
+
+
+
+
+
 Tests
-</a></div><br clear="all" style="clear: all;">
-<br clear="all" style="clear: all;">
+</a></div>
+
+
+
+
+
+
+
+<br style="" clear="all">
+
+
+
+
+
+
+
+
+<br style="" clear="all">
+
+
+
+
+
+
+
+

 <br>

+
+
+
+
+
+
+
+
 <p>Revised December 2nd 2008</p>

+
+
+
+
+
+
+
+
 <p>&copy; Copyright 2006-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>
 http://www.boost.org/LICENSE_1_0.txt</a>)
 </p>
+
+
+
+
+
+
+
+

 </body>
 </html>

Modified: trunk/libs/flyweight/doc/index.html
==============================================================================
--- trunk/libs/flyweight/doc/index.html (original)
+++ trunk/libs/flyweight/doc/index.html Wed Apr  8 04:43:38 2009
@@ -4,6 +4,8 @@



+
+


   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -11,6 +13,9 @@



+
+
+



@@ -20,12 +25,16 @@



+
+


   <link rel="start" href="index.html">



+
+


   <link rel="next" href="tutorial/index.html">
@@ -36,32 +45,39 @@



+
<h1><img src="../../../boost.png" alt="Boost logo" align="middle" height="86" width="277">Boost Flyweight Library</h1>




+
 <div class="prev_link"></div>



+
 <div class="up_link"></div>



+
<div class="next_link"><a href="tutorial/index.html"><img src="next.gif" alt="tutorial" border="0"><br>



+
 Tutorial
 </a></div>


+
 <br style="" clear="all">




+
 <hr>

 <p>
@@ -73,7 +89,8 @@
 <code>const T</code>.</p>


-<p>Flyweights是一些小型的句柄类授权对公共共享数据的常量访问,于是可以在有限 的内存里管理大量的实体。
+
+<p>Flyweights是一些授权对共享的公共数据进行常量访问的小型的句柄类,于是可以 在有限的内存里管理大量的实体。 Boost.Flyweight提供的类模板flyweight&lt;T&gt;让这种常见的编程范式易于使 用,这个类模板起着const
 T非正式替代品的作用。&nbsp;
 </p>
@@ -81,40 +98,49 @@



+
 <p>
 Learning to use Boost.Flyweight can be accomplished in a matter of minutes.
 When special needs arise, however, an extensive customization interface
is provided which allows the user to control and extend the following aspects:</p>


+
<p>学习使用Boost.Flyweight只需要花几分钟的时间。然而,当出现特殊的需求 时,有一个可以广泛定制的接口允许用户对以下几个方面进行控制和扩展:
 </p>


+
 <ul>



+
   <li>Type tagging for separation of domains using the same basic
- flyweight types. &nbsp;采用类标注来区分使用了相同flyweight类型的域。 </li> + flyweight types. &nbsp;采用类标注对使用相同flyweight类型的不同定义域加以 区分。</li>
+



   <li>Specification and parameterization of the so-called flyweight
-    factory. &nbsp;所谓的flyweight工厂的专门化和参数化</li>
+    factory. &nbsp;所谓的flyweight工厂的专门化和参数化。</li>
+



- <li>Control of the factory instantiation procedure. &nbsp;控制工厂实例化 的过程</li> + <li>Control of the factory instantiation procedure. &nbsp;工厂实例化过程 的控制。</li>



- <li>Specification of the internal synchronization mechanisms. &nbsp;内部 同步机制的专门化</li>
+
+ <li>Specification of the internal synchronization mechanisms. &nbsp;内部 同步机制的专门化。</li>
+



   <li>Flyweight tracking, allowing for the disposal of stored
- values when no longer referenced by any flyweight object. &nbsp;Flyweight跟踪,当存储的值不再被任何flyweight对象引用的时候释放它们。 </li> + values when no longer referenced by any flyweight object. &nbsp;Flyweight跟踪,当所存储的值不再被任何flyweight对象引用的时候释放它们。 </li>
+



@@ -124,16 +150,20 @@



+
 <h2>Contents &nbsp;目录</h2>




+
 <ul>



-  <li><a href="tutorial/index.html">Tutorial &nbsp;指南</a></li>
+
+  <li><a href="tutorial/index.html">Tutorial &nbsp;教程</a></li>
+



@@ -141,74 +171,90 @@



+
   <li><a href="performance.html">Performance &nbsp;性能</a></li>



+
   <li><a href="examples.html">Examples &nbsp;示例</a></li>



+
   <li><a href="tests.html">Tests &nbsp;测试</a></li>



+
   <li><a href="future_work.html">Future work &nbsp;未来的工作</a></li>



+
   <li><a href="release_notes.html">Release notes &nbsp;发布说明</a></li>



+
   <li><a href="acknowledgements.html">Acknowledgements &nbsp;致谢</a></li>



+
 </ul>




+
 <hr>

 <div class="prev_link"></div>



+
 <div class="up_link"></div>



+
<div class="next_link"><a href="tutorial/index.html"><img src="next.gif" alt="tutorial" border="0"><br>



+
 Tutorial
 </a></div>


+
 <br style="" clear="all">




+
 <br>




+
 <p>Revised September 3rd 2008</p>




+
 <p>&copy; Copyright 2006-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt"> LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>
 http://www.boost.org/LICENSE_1_0.txt</a>)
 </p>
+




Modified: trunk/libs/flyweight/doc/performance.html
==============================================================================
--- trunk/libs/flyweight/doc/performance.html   (original)
+++ trunk/libs/flyweight/doc/performance.html   Wed Apr  8 04:43:38 2009
@@ -1,472 +1,1176 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 Transitional//EN">
-
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Flyweight Documentation - Performance</title>
-<link rel="stylesheet" href="style.css" type="text/css">
-<link rel="start" href="index.html">
-<link rel="prev" href="reference/tracking.html">
-<link rel="up" href="index.html">
-<link rel="next" href="examples.html">
+
+
+
+
+
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+
+
+
+
+
+
+
+  <title>Boost.Flyweight Documentation - Performance</title>
+  <link rel="stylesheet" href="style.css" type="text/css">
+
+
+
+
+
+  <link rel="start" href="index.html">
+
+
+
+
+
+  <link rel="prev" href="reference/tracking.html">
+
+
+
+
+
+  <link rel="up" href="index.html">
+
+
+
+
+
+  <link rel="next" href="examples.html">
 </head>

+
 <body>
-<h1><img src="../../../boost.png" alt="Boost logo" align=
-"middle" width="277" height="86">Boost.Flyweight Performance</h1>

-<div class="prev_link"><a href="reference/tracking.html"><img src="prev.gif" alt="tracking policies" border="0"><br>
-Tracking policies
-</a></div>
-<div class="up_link"><a href="index.html"><img src="up.gif" alt="index" border="0"><br>
-Index
-</a></div>
-<div class="next_link"><a href="examples.html"><img src="next.gif" alt="examples" border="0"><br>
-Examples
-</a></div><br clear="all" style="clear: all;">
-<br clear="all" style="clear: all;">

-<hr>

-<h2>Contents</h2>
+<h1><img src="../../../boost.png" alt="Boost logo" align="middle" height="86" width="277">Boost.Flyweight
+Performance</h1>
+
+
+
+<div class="prev_link"><a href="reference/tracking.html"><img src="prev.gif" alt="tracking policies" border="0"><br>
+
+
+
+Tracking policies
+</a></div>
+
+
+
+<div class="up_link"><a href="index.html"><img src="up.gif" alt="index" border="0"><br>
+
+
+
+Index
+</a></div>
+
+
+
+<div class="next_link"><a href="examples.html"><img src="next.gif" alt="examples" border="0"><br>
+
+
+
+Examples
+</a></div>
+
+
+
+<br style="" clear="all">
+
+
+
+<br style="" clear="all">
+
+
+
+<hr>
+<h2>Contents &nbsp;&#30446;&#24405;</h2>
+
+
+
+<ul>
+
+
+
+  <li><a href="#intro">Introduction &nbsp;&#31616;&#20171;</a></li>
+
+
+
+  <li><a href="#memory">Memory consumption
+&nbsp;&#20869;&#23384;&#28040;&#32791;</a>
+
+
+    <ul>
+
+
+
+      <li><a href="#flyweight_size">Flyweight size
+&nbsp;Flyweight &#22823;&#23567;</a></li>
+
+
+
+      <li><a href="#entry_size">Entry size
+&nbsp;Entry &#22823;&#23567;</a></li>
+
+
+
+      <li><a href="#overall_memory">Overall memory
+consumption &nbsp;&#24635;&#30340;&#20869;&#23384;&#28040;&#32791;</a></li>
+
+
+
+
+
+    </ul>
+
+
+
+  </li>
+
+
+
+  <li><a href="#time">Time efficiency &nbsp;&#26102;&#25928;</a>
+
+
+    <ul>
+
+
+
+      <li><a href="#initialization">Initialization
+&nbsp;&#21021;&#22987;&#21270;</a></li>
+
+
+
+      <li><a href="#assignment">Assignment
+&nbsp;&#36171;&#20540;</a></li>
+
+
+
+      <li><a href="#equality_comparison">Equality
+comparison &nbsp;&#21028;&#31561;</a></li>
+
+
+
+      <li><a href="#value_access">Value access
+&nbsp;&#20540;&#23384;&#21462;</a></li>
+
+
+
+
+
+    </ul>
+
+
+
+  </li>
+
+
+
+  <li><a href="#results">Experimental results
+&nbsp;&#23454;&#39564;&#32467;&#26524;</a>
+
+
+    <ul>
+
+
+
+      <li><a href="#msvc_80">Microsoft Visual C++ 8.0</a>
+
+
+        <ul>
+
+
+
+          <li><a href="#msvc_80_memory">Memory
+&nbsp;&#20869;&#23384;</a></li>
+
+
+
+          <li><a href="#msvc_80_time">Execution time
+&nbsp;&#25191;&#34892;&#26102;&#38388;</a></li>
+
+
+
+
+
+        </ul>
+
+
+
+      </li>
+
+
+
+      <li><a href="#gcc_344">GCC 3.4.4</a>
+
+
+        <ul>
+
+
+
+          <li><a href="#gcc_344_memory">Memory
+&nbsp;&#20869;&#23384;</a></li>
+
+
+
+          <li><a href="#gcc_344_time">Execution time
+&nbsp;&#25191;&#34892;&#26102;&#38388;</a></li>
+
+
+
+
+
+        </ul>
+
+
+
+      </li>
+
+
+
+
+
+    </ul>
+
+
+
+  </li>
+
+
+
+  <li><a href="#conclusions">Conclusions &nbsp;&#32467;&#35770;</a></li>
+
+
+
+</ul>
+
+
+
+<h2><a name="intro">Introduction &nbsp;&#31616;&#20171;</a></h2>
+
+
+
+<p>
+We show how to estimate the memory reduction obtained by the usage of
+Boost.Flyweight in a particular scenario and study the impact on the
+execution
+time for the different functional areas of <code>flyweight</code>.
+Some experimental results are provided.</p>
+
+
+
+<p>&#25105;&#20204;&#28436;&#31034;&#20102;&#24590;&#26679;&#35780;&#20272;&#22312;&#19968;&#20010;&#29305;&#23450;&#30340;&#24773;&#24418;&#19979;&#36890;&#36807;&#20351;&#29992;Boost.Flyweight&#21487;&#20197;&#20943;&#23569;&#30340;&#20869;&#23384;&#29992;&#37327;&#24182;&#19988;&#30740;&#31350;&#20102;<code>flyweight</code>&#21508;&#31181;&#20351;&#29992;&#24773;&#20917;&#19979;&#23545;&#25191;&#34892;&#26102;&#38388;&#30340;&#24433;&#21709;&#12290;&#26368;&#21518;&#32473;&#20986;&#20102;&#19968;&#20123;&#23454;&#39564;&#32467;&#26524;&#12290;</p>
+
+
+
+<h2><a name="memory">Memory consumption
+&nbsp;&#20869;&#23384;&#28040;&#32791;</a></h2>
+
+
+
+<p>
+As we saw in the <a href="tutorial/index.html#rationale">tutorial
+rationale</a>,
+the flyweight pattern is based on two types of objects:</p>
+
+
+
+<p>&#27491;&#22914;&#25105;&#20204;&#24050;&#32463;&#22312;<a href="tutorial/index.html#rationale">&#25945;&#31243; &#21407;&#29702;</a>&#20013;&#25152;&#30475;&#21040;&#30340;&#65292;flyweight&#27169;&#24335;&#22522;&#20110;2&#31181;&#31867;&#22411;&#30340;&#23545;&#35937;&#65306;
+</p>
+
+
+
+<ul>
+
+
+
+  <li>The flyweight objects proper, which have very small size,
+typically that of a pointer.</li>
+
+
+
+
+</ul>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flyweight&#23545;&#35937;&#26412;&#36523;&#65292;&#23427;&#20204;&#38750;&#24120;&#23567;&#65292;&#36890;&#24120;&#26159;&#19968;&#20010;&#25351;&#38024;&#30340;&#22823;&#23567;&#12290;
+<ul>
+
+
+
+  <li>The shared values, which are stored as internal <i>entries</i>
+into the flyweight factory.</li>
+</ul>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#20849;&#20139;&#30340;&#20540;&#65292;&#23427;&#20204;&#20316;&#20026;&#20869;&#37096;&#30340;<i>entries</i>&#23384;&#20648;&#22312;flyweight&#24037;&#21378;&#37324;<i></i>&#12290;
+<ul>
+
+
+
+</ul>
+
+
+
+The overall memory consumption is then a function of the size of the
+flyweight objects, the size of the entry objects and the degree of
+value redundancy.<br>
+<br>
+
+
+
+&#20110;&#26159;&#24635;&#30340;&#20869;&#23384;&#28040;&#32791;&#23601;&#26159;&#19968;&#20010;&#20851;&#20110;flyweight&#23545;&#35937;&#30340;&#22823;&#23567;&#65292;entry&#23545;&#35937;&#30340;&#22823;&#23567;&#21644;&#20540;&#20887;&#20313;&#24230;&#30340;&#20989;&#25968;&#12290;
+<h3><a name="flyweight_size">Flyweight size
+&nbsp;Flyweight &#22823;&#23567;</a></h3>
+
+
+
+<p>
+The only data member of a <code>flyweight</code> object is
+a so-called
+<i>handle</i>, an opaque object of small size provided by
+the internal
+flyweight factory to refer to the entries it stores. For the default
+<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>, +this handle is merely a pointer, so <code>sizeof(flyweight&lt;T&gt;)=sizeof(void*)</code>,
+4 bytes in typical 32-bit architectures.
+For other types of factories, the handle is an iterator to an internal
+container used in the implementation of the factory: again, its size
+is typically that of a pointer.</p>
+
+
+
+<p><code>flyweight</code>&#23545;&#35937;&#21807;&#19968;&#30340;&#25968;&#25454;&#25104;&#21592;&#26159;&#19968;&#20010;&#25152;&#35859;&#30340;<span style="font-style: italic;">&#21477;&#26564;</span>&#65292;&#36825;&#26159;&#30001;&#20869;&#37096;flyweight&#24037;&#21378;&#25152;&#25552;&#20379;&#30340;&#19968;&#20010;&#23567;&#22411;&#30340;&#19981;&#36879;&#26126;&#30340;&#23545;&#35937;&#65292;&#29992;&#26469;&#24341;&#29992;&#21040;&#24037;&#21378;&#37324;&#23384;&#20648;&#30340;entries&#12290;&#23545;&#40664;&#35748;&#30340;<a href="tutorial/configuration.html#hashed_factory">hashed_factory</a>&#65292; +&#36825;&#20010;&#21477;&#26564;&#20165;&#20165;&#26159;&#19968;&#20010;&#25351;&#38024;&#65292;&#22240;&#27492;<code>sizeof(flyweight&lt;T&gt;)=sizeof(void*)</code>&#65292; &#36890;&#24120;&#22312;32&#20301;&#26550;&#26500;&#19978;&#26159;4&#20010;&#23383;&#33410;&#30340;&#22823;&#23567;&#12290;&#23545;&#20854;&#23427;&#31867;&#22411;&#30340;&#24037;&#21378;&#65292;&#35813;&#21477;&#26564;&#26159;&#19968;&#20010;&#29992;&#26469;&#23454;&#29616;&#36825;&#20010;&#24037;&#21378;&#30340;&#20869;&#37096;&#23481;&#22120;&#30340;&#36845;&#20195;&#22120;&#65306;&#21516;&#26679;&#65292;&#23427;&#30340;&#22823;&#23567;&#36890;&#24120;&#26159;&#19968;&#20010;&#25351;&#38024;&#30340;&#22823;&#23567;&#12290;
+</p>
+
+
+
+<h3><a name="entry_size">Entry size &nbsp;Entry
+&#22823;&#23567;</a></h3>
+
+
+
+<p>
+The entries stored in the factory associated to <code>flyweight&lt;T,...&gt;</code>
+need not only hold a value of <code>T</code>, but also
+contain additional
+information related to the internal implementation of
+<code>flyweight&lt;T,...&gt;</code>:</p>
+
+
+
+<p>&#19982;<code>flyweight&lt;T,...&gt;</code>&#30456;&#20851;&#32852;&#30340;entries&#65292;&#22312;&#24037;&#21378;&#20013;&#23384;&#20648;&#26102;&#65292;&#19981;&#20165;&#21253;&#21547;&#19968;&#20010;T&#31867;&#22411;&#30340;&#20540;&#65292;
+&#32780;&#19988;&#36824;&#21253;&#21547;&#19982;<code>flyweight&lt;T,...&gt;</code>&#30340;&#20869;&#37096;&#23454;&#29616;&#30456;&#20851;&#30340;&#39069;&#22806;&#20449;&#24687;&#12290;
+</p>
+
+
+
+<blockquote> <i>entry</i> = <code>sizeof(T)</code>
++ <i>overhead</i>.
+</blockquote>
+
+
+
+<p>
+For the current implementation of Boost.Flyweight, the following
+aspects
+contribute to <i>overhead</i>:</p>
+
+
+
+<p>&#23601;Boost.Flyweight&#30446;&#21069;&#30340;&#23454;&#29616;&#26469;&#35828;&#65292;&#20197;&#19979;&#20960;&#20010;&#26041;&#38754;&#20250;&#22686;&#21152;<span style="font-style: italic;">&#39069;&#22806;&#24320;&#38144;</span>&#65306;
+</p>
+
+
+
+<ul>
+
+
+
+  <li>Usage of <a href="tutorial/key_value.html">key-value
+flyweights</a>.</li>
+
+
+
+
+</ul>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#20351;&#29992;<a href="tutorial/key_value.html">&#38190;-&#20540;flyweight</a>&#12290;
+<ul>
+
+
+
+ <li>Internal overhead of the <a href="tutorial/configuration.html#factories">factory</a>
+container.</li>
+
+
+
+
+</ul>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="tutorial/configuration.html#factories">&#24037;&#21378;</a>&#23481;&#22120;&#30340;&#20869;&#37096;&#39069;&#22806;&#24320;&#38144;&#12290;
+<ul>
+
+
+
+ <li>Bookkeeping information associated to the <a href="tutorial/configuration.html#tracking">tracking
+mechanism</a>.</li>
+
+
+
+
+
+
+</ul>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="tutorial/configuration.html#tracking">tracking&#26426;&#21046;</a>&#30456;&#20851;&#30340;&#34180;&#35760;&#20449;&#24687;&#12290;<br>
+
+
+
+The table summarizes the separate contributions to <i>overhead</i>
+introduced
+by the different components taking part of the definition of
+a <code>flyweight</code> instantiation. Values are given
+in <i>words</i>,
+i.e. the size of a pointer, which is 4 bytes in a typical 32-bit
+architecture.
+Alignment may introduce additional overhead.<br>
+<br>
+
+
+
+&#36825;&#20010;&#34920;&#26684;&#24635;&#32467;&#20102;&#23450;&#20041;&#19968;&#20010;<code>flyweight</code>&#23454;&#20363;&#30340;&#21508;&#20010;&#32452;&#25104;&#37096;&#20998;&#21508;&#33258;&#24341;&#36215;&#30340;<span style="font-style: italic;">&#39069;&#22806;&#24320;&#38144;</span>&#12290;&#36825;&#20123;&#20540;&#30340;&#21333;&#20301;&#37117;&#26159;<span style="font-style: italic;">&#23383;</span>&#65292;
+&#25442;&#21477;&#35805;&#35828;&#65292;&#19968;&#20010;&#25351;&#38024;&#30340;&#22823;&#23567;&#65292;&#36890;&#24120;&#22312;32&#20301;&#26550;&#26500;&#19978;&#26159;4&#20010;&#23383;&#33410;&#12290;&#23545;&#40784;&#21487;&#33021;&#23548;&#33268;&#39069;&#22806;&#30340;&#24320;&#38144;&#12290;
+<table cellspacing="0">
+
+
+
+  <caption><b>Entry overhead of the components of
+Boost.Flyweight.</b></caption> <tbody>
+
+
+
+    <tr>
+
+
+
+      <th colspan="2" align="center">component</th>
+
+
+
+      <th align="center">overhead (words)</th>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+ <td rowspan="2" align="center">&nbsp;&nbsp;<a href="tutorial/key_value.html#key_value"><code>key_value</code></a>&nbsp;&nbsp;</td>
+
+
+
+ <td align="center">&nbsp;&nbsp;with <a href="tutorial/key_value.html#key_extractor">key extractor</a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;1<sup>(1)</sup>&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+ <td align="center">&nbsp;&nbsp;without <a href="tutorial/key_value.html#key_extractor">key extractor</a>&nbsp;&nbsp;</td>
+
+
+
+ <td align="center">&nbsp;&nbsp;1 + <code>sizeof(Key)&nbsp;&nbsp;</code></td>
+
+
+
+    </tr>
+
+
+
+    <tr class="odd_tr">
+
+
+
+      <td rowspan="3" align="center">&nbsp;&nbsp;factory&nbsp;&nbsp;</td>
+
+
+
+ <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;~2.5&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+    <tr class="odd_tr">
+
+
+
+ <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#set_factory"><code>set_factory</code></a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;4<sup>(2)</sup>&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+    <tr class="odd_tr">
+
+
+
+ <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#assoc_container_factory"><code>assoc_container_factory</code></a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;depends on
+the container used&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+      <td rowspan="2" align="center">&nbsp;&nbsp;tracking
+mechanism&nbsp;&nbsp;</td>
+
+
+
+ <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;1<sup>(3)</sup>&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+ <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&nbsp;&nbsp;</td>
+
+
+
+      <td align="center">&nbsp;&nbsp;0&nbsp;&nbsp;</td>
+
+
+
+    </tr>
+
+
+
+
+
+  </tbody>
+</table>
+
+

-<ul>
-  <li><a href="#intro">Introduction</a></li>
-  <li><a href="#memory">Memory consumption</a>
-    <ul>
-      <li><a href="#flyweight_size">Flyweight size</a></li>
-      <li><a href="#entry_size">Entry size</a></li>
-      <li><a href="#overall_memory">Overall memory consumption</a></li>
-    </ul>
-  </li>
-  <li><a href="#time">Time efficiency</a>
-    <ul>
-      <li><a href="#initialization">Initialization</a></li>
-      <li><a href="#assignment">Assignment</a></li>
-      <li><a href="#equality_comparison">Equality comparison</a></li>
-      <li><a href="#value_access">Value access</a></li>
-    </ul>
-  </li>
-  <li><a href="#results">Experimental results</a>
-    <ul>
-      <li><a href="#msvc_80">Microsoft Visual C++ 8.0</a>
-        <ul>
-          <li><a href="#msvc_80_memory">Memory</a></li>
-          <li><a href="#msvc_80_time">Execution time</a></li>
-        </ul>
-      </li>
-      <li><a href="#gcc_344">GCC 3.4.4</a>
-        <ul>
-          <li><a href="#gcc_344_memory">Memory</a></li>
-          <li><a href="#gcc_344_time">Execution time</a></li>
-        </ul>
-      </li>
-    </ul>
-  </li>
-  <li><a href="#conclusions">Conclusions</a></li>
-</ul>
+<sup>(1)</sup> <small>Assuming that <code>sizeof(Key)&lt;=sizeof(Value)</code>.</small>
+<small>&nbsp;&#20551;&#23450;<code>sizeof(Key)&lt;=sizeof(Value)&#12290;</code></small><br>

-<h2><a name="intro">Introduction</a></h2>

-<p>
-We show how to estimate the memory reduction obtained by the usage of
-Boost.Flyweight in a particular scenario and study the impact on the execution
-time for the different functional areas of <code>flyweight</code>.
-Some experimental results are provided.
-</p>

-<h2><a name="memory">Memory consumption</a></h2>
+<sup>(2)</sup> <small>For some implementations of <code>std::set</code>
+this overhead reduces to 3.</small><small> &nbsp;&#23545;&#26576;&#20123;<code>std::set&#30340;&#23454;&#29616;&#36825;&#20010;&#39069;&#22806;&#24320;&#38144;&#38477;&#21040;3&#12290;</code> </small><br>

-<p>
-As we saw in the <a href="tutorial/index.html#rationale">tutorial rationale</a>,
-the flyweight pattern is based on two types of objects:
-<ul>
-  <li>The flyweight objects proper, which have very small size, typically
-    that of a pointer.
-  </li>
- <li>The shared values, which are stored as internal <i>entries</i> into the
-     flyweight factory.
-  </li>
-</ul>
-The overall memory consumption is then a function of the size of the
-flyweight objects, the size of the entry objects and the degree of
-value redundancy.
-</p>

-<h3><a name="flyweight_size">Flyweight size</a></h3>

-<p>
-The only data member of a <code>flyweight</code> object is a so-called
-<i>handle</i>, an opaque object of small size provided by the internal
-flyweight factory to refer to the entries it stores. For the default
-<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>, -this handle is merely a pointer, so <code>sizeof(flyweight&lt;T&gt;)=sizeof(void*)</code>,
-4 bytes in typical 32-bit architectures.
-For other types of factories, the handle is an iterator to an internal
-container used in the implementation of the factory: again, its size
-is typically that of a pointer.
-</p>
+<sup>(3)</sup> <small>In some platforms this value
+can be 2. &nbsp;&#22312;&#26576;&#20123;&#24179;&#21488;&#19978;&#36825;&#20010;&#20540;&#21487;&#33021;&#26159;2&#12290;</small> +<p>For instance, for the default configuration parameters of <code>flyweight</code>,
+<i>overhead</i> is typically 2.5(<code>hashed_factory</code>)
++ 1(<code>refcounted</code>)
+= 3 words.</p>

-<h3><a name="entry_size">Entry size</a></h3>

-<p>
-The entries stored in the factory associated to <code>flyweight&lt;T,...&gt;</code>
-need not only hold a value of <code>T</code>, but also contain additional
-information related to the internal implementation of
-<code>flyweight&lt;T,...&gt;</code>:
+<p>&#20363;&#22914;&#65292;&#23601;<code>flyweight</code>&#30340;&#40664;&#35748;&#37197;&#32622;&#21442;&#25968;&#32780;&#35328;&#65292;<span style="font-style: italic;">&#39069;&#22806;&#24320;&#38144;</span>&#36890;&#24120;&#26159;2.5(<code>hashed_factory</code>)
++ 1(<code>refcounted</code>)
+= 3&#20010;&#23383;&#12290;
 </p>

-<blockquote>
-<i>entry</i> = <code>sizeof(T)</code> + <i>overhead</i>.
-</blockquote>

-<p>
-For the current implementation of Boost.Flyweight, the following aspects
-contribute to <i>overhead</i>:
-<ul>
- <li>Usage of <a href="tutorial/key_value.html">key-value flyweights</a>.</li> - <li>Internal overhead of the <a href="tutorial/configuration.html#factories">factory</a>
-    container.
-  </li>
-  <li>Bookkeeping information associated to the
-    <a href="tutorial/configuration.html#tracking">tracking mechanism</a>.
-  </li>
-</ul>
-The table summarizes the separate contributions to <i>overhead</i> introduced
-by the different components taking part of the definition of
-a <code>flyweight</code> instantiation. Values are given in <i>words</i>,
-i.e. the size of a pointer, which is 4 bytes in a typical 32-bit architecture.
-Alignment may introduce additional overhead.
-</p>

-<p align="center">
-<table cellspacing="0">
- <caption><b>Entry overhead of the components of Boost.Flyweight.</b></caption>
-<tr>
-  <th align="center"colspan="2">component</th>
-  <th align="center">overhead (words)</th>
-</tr>
-<tr>
- <td align="center" rowspan="2">&nbsp;&nbsp;<a href="tutorial/key_value.html#key_value"><code>key_value</code></a>&nbsp;&nbsp;</td> - <td align="center">&nbsp;&nbsp;with <a href="tutorial/key_value.html#key_extractor">key extractor</a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;1<sup>(1)</sup>&nbsp;&nbsp;</td>
-</tr>
-<tr>
- <td align="center">&nbsp;&nbsp;without <a href="tutorial/key_value.html#key_extractor">key extractor</a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;1 + <code>sizeof(Key)&nbsp;&nbsp;</td>
-</tr>
-<tr class="odd_tr">
-  <td align="center" rowspan="3">&nbsp;&nbsp;factory&nbsp;&nbsp;</td>
- <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;~2.5&nbsp;&nbsp;</td>
-</tr>
-<tr  class="odd_tr">
- <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#set_factory"><code>set_factory</code></a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;4<sup>(2)</sup>&nbsp;&nbsp;</td>
-</tr>
-<tr class="odd_tr">
- <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#assoc_container_factory"><code>assoc_container_factory</code></a>&nbsp;&nbsp;</td> - <td align="center">&nbsp;&nbsp;depends on the container used&nbsp;&nbsp;</td>
-</tr>
-<tr>
- <td align="center" rowspan="2">&nbsp;&nbsp;tracking mechanism&nbsp;&nbsp;</td> - <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;1<sup>(3)</sup>&nbsp;&nbsp;</td>
-</tr>
-<tr>
- <td align="center">&nbsp;&nbsp;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&nbsp;&nbsp;</td>
-  <td align="center">&nbsp;&nbsp;0&nbsp;&nbsp;</td>
-</tr>
-</table>
-<sup>(1)</sup> <small>Assuming that <code>sizeof(Key)&lt;=sizeof(Value)</code>.</small><br> -<sup>(2)</sup> <small>For some implementations of <code>std::set</code> this overhead reduces to 3.</small><br>
-<sup>(3)</sup> <small>In some platforms this value can be 2.</small>
-</p>
+<h3><a name="overall_memory">Overall memory
+consumption &nbsp;&#24635;&#30340;&#20869;&#23384;&#28040;&#32791;</a></h3>

-<p>
-For instance, for the default configuration parameters of <code>flyweight</code>, -<i>overhead</i> is typically 2.5(<code>hashed_factory</code>) + 1(<code>refcounted</code>)
-= 3 words.
-</p>

-<h3><a name="overall_memory">Overall memory consumption</a></h3>

 <p>
-Consider a scenario where there are <i>N</i> different objects of type <code>T</code>
-jointly taking <i>M</i> different values. The objects consume then
-<i>S</i> = <i>N</i>&middot;<i>T</i> bytes, where <i>T</i> is defined as the
-average size of <code>T</code> (<code>sizeof(T)</code> plus dynamic
+Consider a scenario where there are <i>N</i> different
+objects of type <code>T</code>
+jointly taking <i>M</i> different values. The objects
+consume then
+<i>S</i> = <i>N</i>&middot;<i>T</i>
+bytes, where <i>T</i> is defined as the
+average size of <code>T</code> (<code>sizeof(T)</code>
+plus dynamic
 memory allocated by <code>T</code> objects).
 If we now replace <code>T</code> by some instantiation
-<code>flyweight&lt;T,...&gt;</code>, the resulting memory consumption
-will be
+<code>flyweight&lt;T,...&gt;</code>, the resulting
+memory consumption
+will be</p>
+
+
+
+<p>&#32771;&#34385;&#36825;&#26679;&#19968;&#20010;&#22330;&#26223;&#65306;<i>N</i>&#20010;&#19981;&#21516;&#30340; <code>T</code>&#31867;&#22411;&#30340;&#23545;&#35937;&#24635;&#20849;&#21344;&#25454;&#20102;<i>M</i>&#20010;&#19981;&#21516;&#30340;&#20540;&#12290;&#37027;&#20040;&#36825;&#20123;&#23545;&#35937;&#28040;&#32791;<i>S</i> = <i>N</i>&middot;<i>T</i>&#23383;&#33410;&#65292;<i>T</i>&#26159;&#31867;&#22411;<code>T</code>&#30340;&#24179;&#22343;&#22823;&#23567;&#65288;<code>sizeof(T)</code>&#21152;&#19978;&nbsp;<code>T</code>&#23545;&#35937;&#21160;&#24577;&#20998;&#37197;&#30340;&#20869;&#23384;&#65289;&#12290;&#22914;&#26524;&#25105;&#20204;&#29616;&#22312;&#29992;&#26576;&#31181;<code>flyweight&lt;T,...&gt;</code>&#30340;&#23454;&#20363;&#26469;&#26367;&#25442; <code>T</code>&#65292;&#20869;&#23384;&#28040;&#32791;&#30340;&#32467;&#26524;&#23558;&#20250;&#26159;&#65306;
 </p>

-<blockquote>
-<i>S<sub>F</sub></i> =
-<i>N</i>&middot;<i>P</i> + <i>M</i>&middot;(<i>T</i> + <i>overhead</i>),
+
+
+<blockquote> <i>S<sub>F</sub></i> = <i>N</i>&middot;<i>P</i>
++ <i>M</i>&middot;(<i>T</i> + <i>overhead</i>),
 </blockquote>

+
+
 <p>
-where <i>P</i> is <code>sizeof(flyweight&lt;T,...&gt;)</code>, typically
+where <i>P</i> is <code>sizeof(flyweight&lt;T,...&gt;)</code>,
+typically
equal to <code>sizeof(void*)</code>, as seen <a href="#flyweight_size">before</a>.
-The ratio <i>S<sub>F</sub></i> / <i>S</i> is then
+The ratio <i>S<sub>F</sub></i> / <i>S</i>
+is then</p>
+
+
+
+<p>&#22312;&#36825;&#37324;P&#26159;<code>sizeof(flyweight&lt;T,...&gt;)</code>&#65292;&#23601;&#20687;<a href="#flyweight_size">&#20043;&#21069;</a>&#30475;&#21040;&#30340;&#65292;&#36890;&#24120;&#24773;&#20917;&#19979;&#31561;&#20110;<code>sizeof(void*)</code>&#12290;&#37027;&#20040;<i>S<sub>F</sub></i> / <i>S</i>&#30340;&#27604;&#20540;&#26159;
 </p>

-<blockquote>
-<i>S<sub>F</sub></i> / <i>S</i> =
-(<i>P</i> / <i>T</i>)+ (<i>M</i> / <i>N</i>)(1 + <i>overhead</i> / <i>T</i>).
+
+
+<blockquote> <i>S<sub>F</sub></i> / <i>S</i>
+=
+(<i>P</i> / <i>T</i>)+ (<i>M</i> /
+  <i>N</i>)(1 + <i>overhead</i> / <i>T</i>).
 </blockquote>

+
+
 <p>
-<i>S<sub>F</sub></i> / <i>S</i> tends to its minimum, <i>P</i> / <i>T</i>,
-as <i>M</i> / <i>N</i> tends to 0, i.e. when the degree of value redundancy
-among <code>T</code> objects grows higher. On the other hand, the worst possible case -<i>S<sub>F</sub></i> / <i>S</i> = 1 + (<i>P</i> + <i>overhead</i>) / <i>T</i> -happens when <i>M</i> / <i>N</i> = 1, that is, if there is no value redundancy at all; in this situation there is
-no point in applying the flyweight pattern in the first place.
+<i>S<sub>F</sub></i> / <i>S</i>
+tends to its minimum, <i>P</i> / <i>T</i>,
+as <i>M</i> / <i>N</i> tends to 0, i.e. when
+the degree of value redundancy
+among <code>T</code> objects grows higher. On the other
+hand, the worst possible case
+<i>S<sub>F</sub></i> / <i>S</i> =
+1 + (<i>P</i> + <i>overhead</i>) / <i>T</i>
+happens when <i>M</i> / <i>N</i> = 1, that
+is, if there is no value redundancy at all; in this situation there is
+no point in applying the flyweight pattern in the first place.</p>
+
+
+
+<p>&#24403; <i>M</i> / <i>N</i>&#36235;&#36817;&#20110;0&#65292;&#20063;&#23601;&#26159;&#35828;&#65292;&#24403;<code>T</code>&#23545;&#35937;&#30340;&#20540;&#30340;&#20887;&#20313;&#24230;&#22686;&#21152;&#30340;&#26102;&#20505;&#65292;<i>S<sub>F</sub></i> / <i>S</i>&#36235;&#36817;&#20110;&#23427;&#30340;&#26368;&#23567;&#20540;<i>P</i> / <i>T</i>&#12290;&#21478;&#19968;&#26041;&#38754;&#65292;&#24403;<i>M</i> / <i>N</i> = 1&#65292;&#23601;&#26159;&#35828;&#65292;
+&#26681;&#26412;&#23601;&#27809;&#26377;&#20887;&#20313;&#30340;&#20540;&#26102;&#65292;&#20986;&#29616;&#26368;&#24046;&#30340;&#24773;&#24418;
+<i>S<sub>F</sub></i> / <i>S</i> =
+1 + (<i>P</i> + <i>overhead</i>) / <i>T</i>&#65292;&#36825;&#31181;&#24773;&#20917;&#19979;&#24403;&#21021;&#24341;&#20837;flyweight&#27169;&#24335;&#23601;&#26159;&#27809;&#24847;&#20041;&#30340;&#12290;
 </p>

+
+
 <p align="center">
-<img src="memory.png" alt="relative memory consumption of Boost.Flyweight as a function of value diversity"
-width="446" height="411"><br>
-<b>Fig. 1: Relative memory consumption of Boost.Flyweight as a function of value diversity.</b> +<img src="memory.png" alt="relative memory consumption of Boost.Flyweight as a function of value diversity" height="411" width="446"><br>
+
+
+
+<b>Fig. 1: Relative memory consumption of Boost.Flyweight as a
+function of value diversity.</b>
 </p>

+
+
 <h2>
-<a name="time">Time efficiency</a>
+<a name="time">Time efficiency &nbsp;&#26102;&#25928;</a>
 </h2>

+
+
 <p>
-The introduction of the flyweight pattern involves an extra level of indirection -that, in general, results in some execution overhead when accessing the values. On -the other hand, manipulation of flyweight objects is considerably faster than
-moving around the heavy values they stand for. We analyze qualitatively the
-execution overheads or improvements associated to the different usage contexts
-of Boost.Flyweight.
+The introduction of the flyweight pattern involves an extra level of
+indirection
+that, in general, results in some execution overhead when accessing the
+values. On
+the other hand, manipulation of flyweight objects is considerably
+faster than
+moving around the heavy values they stand for. We analyze qualitatively
+the
+execution overheads or improvements associated to the different usage
+contexts
+of Boost.Flyweight.</p>
+
+
+
+<p>&#24341;&#20837;flyweight&#27169;&#24335;&#29301;&#28041;&#21040;&#19968;&#23618;&#39069;&#22806;&#30340;&#38388;&#25509;&#65292;&#36890;&#24120;&#36825;&#20250;&#23548;&#33268;&#22312;&#23384;&#21462;&#20540;&#30340;&#26102;&#20505;&#20135;&#29983;&#19968;&#20123;&#39069;&#22806;&#24320;&#38144;&#12290;&#21478;&#19968;&#26041;&#38754;&#65292;&#25805;&#32437;flyweight&#23545;&#35937;&#35201;&#26174;&#33879;&#24555;&#20110;&#23427;&#20204;&#25152;&#20195;&#34920;&#30340;
+&#37325;&#22411;&#23545;&#35937;&#12290;&#25105;&#20204;&#23450;&#24615;&#22320;&#20998;&#26512;Boost.Flyweight&#22312;&#19981;&#21516;&#20351;&#29992;&#29615;&#22659;&#19979;&#36816;&#34892;&#26102;&#30340;&#39069;&#22806;&#24320;&#38144;&#25110;&#32773;&#25913;&#36827;&#12290;
 </p>

-<h3><a name="initialization">Initialization</a></h3>
+
+
+<h3><a name="initialization">Initialization
+&nbsp;&#21021;&#22987;&#21270;</a></h3>
+
+

 <p>
-As compared with the initialization an object of type <code>T</code>, constructing -a <code>flyweight&lt;T&gt;</code> performs important extra work like looking -up the value in the flyweight factory and inserting it if it is not present.
+As compared with the initialization an object of type <code>T</code>,
+constructing
+a <code>flyweight&lt;T&gt;</code> performs
+important extra work like looking
+up the value in the flyweight factory and inserting it if it is not
+present.
 So, construction of flyweights (other than copy construction, which is
-cheap), is expected to be noticeably slower than the construction of the
-underlying type <code>T</code>. Much of the time spent at constructing
-the associated <code>T</code> value proper can be saved, however, by
-using <a href="tutorial/key_value.html">key-value flyweights</a>.
+cheap), is expected to be noticeably slower than the construction of
+the
+underlying type <code>T</code>. Much of the time spent at
+constructing
+the associated <code>T</code> value proper can be saved,
+however, by
+using <a href="tutorial/key_value.html">key-value
+flyweights</a>.</p>
+
+
+
+<p>&#19982;&#19968;&#20010;<code>T</code>&#31867;&#22411;<code></code>&#23545;&#35937;&#30340;&#21021;&#22987;&#21270;&#30456;&#27604;&#65292;&#26500;&#36896;&#19968;&#20010;<code>flyweight&lt;T&gt;</code>&#35201;&#25191;&#34892;&#37325;&#35201;&#30340;&#39069;&#22806;&#24037;&#20316;&#27604;&#22914;&#22312;
+flyweight&#24037;&#21378;&#37324;&#26597;&#25214;&#20540;&#24182;&#19988;&#22312;&#23427;&#19981;&#23384;&#22312;&#30340;&#26102;&#20505;&#25554;&#20837;&#23427;&#12290;&#22240;&#27492;&#65292;flyweights&#30340;&#21019;&#24314;&#65288;&#24182;&#38750;&#25335;&#36125;&#26500;&#36896;&#65292;&#36825;&#35201;&#24265;&#20215;&#24471;&#22810;&#65289;&#65292;&#21487;&#20197;&#39044;&#35745;&#35201;&#26174;&#33879;&#24930;&#20110;&#24213;&#23618;&#31867;&#22411;T&#30340;&#26500;&#36896;&#12290;&#28982;&#32780;&#65292;&#36890;&#36807;&#20351;&#29992;<a href="tutorial/key_value.html">&#38190;-&#20540;flyweight</a>&#65292;&#35768;&#22810;&#33457;&#36153;&#22312;&#26500;&#36896;<code>T</code>&#20540;&#26412;&#36523;&#30340;&#26102;&#38388;&#26159;&#21487;&#20197;&#36991;&#20813;&#30340;&#12290;
 </p>

-<h3><a name="assignment">Assignment</a></h3>
+
+
+<h3><a name="assignment">Assignment &nbsp;&#36171;&#20540;</a></h3>
+
+

 <p>
 Assignment of flyweight objects is extremely fast, as it only involves
-assigning an internal handle type used to refer to the shared value. Moreover,
-assignment of <code>flyweight</code> objects never throws. Assignment time
+assigning an internal handle type used to refer to the shared value.
+Moreover,
+assignment of <code>flyweight</code> objects never throws.
+Assignment time
is influenced by the type of <a href="tutorial/configuration.html#tracking">tracking
 policy</a> used; in this regard,
<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>
-is the fastest option.
+is the fastest option.</p>
+
+
+
+<p>flyweight&#23545;&#35937;&#30340;&#36171;&#20540;&#26497;&#24555;&#65292;&#22240;&#20026;&#36825;&#21482;&#28041;&#21450;&#21040;&#36171;&#20540;&#19968;&#20010;&#24341;&#29992;&#21040;&#20849;&#20139;&#20540;&#30340;&#21477;&#26564;&#12290;&#27492;&#22806;&#65292;<code>flyweight</code>&#23545;&#35937;&#30340;&#36171;&#20540;&#32477;&#19981;&#20250;&#25243;&#20986;&#24322;
+&#24120;&#12290;&#36171;&#20540;&#30340;&#26102;&#38388;&#21463;&#21040;<a href="tutorial/configuration.html#tracking">tracking policy</a>&#31867;&#22411;&#30340;&#24433;&#21709;&#65307;&#23601;&#36825;&#19968;&#28857;&#32780;&#35328;&#65292;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&#26159;&#26368;&#24555;&#30340;&#36873;&#39033;&#12290;
 </p>

-<h3><a name="equality_comparison">Equality comparison</a></h3>
+
+
+<h3><a name="equality_comparison">Equality
+comparison &nbsp;&#21028;&#31561;</a></h3>
+
+

 <p>
-Comparing two <code>flyweight</code> objects for equality reduces to
-checking that the <i>addresses</i> of the values they are associated to
+Comparing two <code>flyweight</code> objects for equality
+reduces to
+checking that the <i>addresses</i> of the values they are
+associated to
 are equal; in general, this operation is much faster than comparing the
-underlying values. This aspect is of particular relevance when the flyweight
-objects stand for complex values like those arising in the application of
-the <a href="examples.html#example3"><i>composite pattern</i></a>.
+underlying values. This aspect is of particular relevance when the
+flyweight
+objects stand for complex values like those arising in the application
+of
+the <a href="examples.html#example3"><i>composite
+pattern</i></a>.</p>
+
+
+
+<p>&#21028;&#26029;2&#20010;<code>flyweight</code>&#23545;&#35937;&#26159;&#21542;&#30456;&#31561;&#38477;&#20026;&#21028;&#26029;&#23427;&#20204;&#25152;&#20851;&#32852;&#30340;&#20540;&#30340;<span style="font-style: italic;">&#22320;&#22336;</span>&#26159;&#21542;&#30456;&#21516;&#65307;&#36890;&#24120;&#24773;&#20917;&#19979;&#65292;&#36825;&#20010;&#25805;&#20316;&#35201;&#36828;&#36828;&#24555;&#36807;&#27604;&#36739;&#24213;&#23618;&#30340;&#20540;&#12290;<span style="color: rgb(0, 0, 0);">&#24403;</span>flyweight<span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">&#23545;&#35937; +&#20195;&#34920;&#30340;&#26159;&#37027;&#20123;&#20986;&#29616;&#22312;&#32452;&#21512;&#27169;&#24335;&#30340;&#24212;&#29992;&#31243;&#24207;&#30340;&#22797;&#26434;&#30340;&#20540;&#26102;</span></span><span style="color: rgb(0, 0, 0);">&#36825;&#20010;&#26041;&#38754;&#29305;&#21035;&#37325;&#35201;&#12290;</span>
 </p>

-<h3><a name="value_access">Value access</a></h3>
+
+
+<h3><a name="value_access">Value access &nbsp;&#20540;&#23384;&#21462;</a></h3>
+
+

 <p>
-The conversion from <code>flyweight&lt;T&gt;</code> to <code>const T&amp;</code>
+The conversion from <code>flyweight&lt;T&gt;</code>
+to <code>const T&amp;</code>
 relies on a level of indirection relating the flyweight objects to the
-values they are associated to; so, value access is expected to be slower
+values they are associated to; so, value access is expected to be
+slower
 when using Boost.Flyweight as compared to using the associated values
-directly. This overhead, however, can be masked by an indirect improvement
+directly. This overhead, however, can be masked by an indirect
+improvement
resulting from locality and cache effects: as the set of different <code>T</code>
-values handled by an instantiation of <code>flyweight&lt;T&gt;</code> is
-generally much smaller than the equivalent family of <code>T</code> objects
+values handled by an instantiation of <code>flyweight&lt;T&gt;</code>
+is
+generally much smaller than the equivalent family of <code>T</code>
+objects
 when Boost.Flyweight is not used, active values can fit better
-into the processor cache.
+into the processor cache.</p>
+
+
+
+<p><span style="color: rgb(0, 0, 0);">&#20174;</span><code style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">flyweight&lt;T&gt;</span></code><span style="color: rgb(0, 0, 0);">&#21040;</span><code style="color: rgb(0, 0, 0);">const T&amp;</code><span style="color: rgb(0, 0, 0);">&#30340;&#36716;&#25442;&#20381;&#36182;&#20110;&#19968;&#23618;&#38388;&#25509;&mdash;&mdash;&#20174;flyweight&#23545;&#35937;&#25214;&#21040;&#23427;&#20204;&#25152;&#20851;&#32852;&#30340;&#20540;&#65307;&#22240;&#27492;&#21487;&#20197;&#39044;&#35745;&#65292;&#24403;&#20351;&#29992;</span>Boost.Flyweight&#26102;&#65292;<span style="color: rgb(0, 0, 0);">&#20540;&#30340;</span><span style="color: rgb(0, 0, 0);">&#23384;&#21462;&#20250;&#27604;&#30452;&#25509;&#20351;&#29992;&#30456;&#20851;&#30340;&#20540;&#35201;&#24930;&#19968;&#20123;&#12290;&#28982;&#32780;&#65292;&#36825;&#31181;&#39069;&#22806;&#36127;&#25285;&#33021;&#22815;&#34987;&#30001;&#20110;&#38598;&#20013;&#21644;&#32531;&#23384;&#25928;&#26524;&#24102;&#26469;&#30340;&#38388;&#25509;&#25913;&#36827;&#25152;&#25513;&#30422;&#65306;&#22240;&#20026;</span><span style="color: rgb(0, 0, 0);">&#19968;&#20010;</span><code>flyweight&lt;T&gt;</code><span style="color: rgb(0, 0, 0);">&#30340;</span><span style="color: rgb(0, 0, 0);">&#23454;&#20363;&#31649;&#29702;&#30340;</span><span style="color: rgb(0, 0, 0);">&#19981;&#21516;</span><code>T</code><span style="color: rgb(0, 0, 0);">&#20540;&#30340;&#38598;&#21512;</span>&#36890;&#24120;&#35201;&#27604;&#27809;&#26377;&#20351;&#29992;Boost.Flyweight &#26102;&#31561;&#20215;&#30340;<code>T</code>&#23545;&#35937;&#30340;&#23478;&#26063;&#23567;&#24471;&#22810;&#65292;&#27963;&#21160;&#30340;&#20540;&#21487;&#20197;&#26356;&#22909;&#30340;&#36866;&#24212;&#22788;&#29702;&#22120;&#30340;&#32531;&#23384;&#12290;<span style="color: rgb(0, 0, 0);"></span>
 </p>

-<h2><a name="results">Experimental results</a></h2>
+
+
+<h2><a name="results">Experimental results
+&nbsp;&#23454;&#39564;&#32467;&#26524;</a></h2>
+
+

 <p>
-A <a href="examples.html#example6">profiling program</a> was devised to test
+A <a href="examples.html#example6">profiling program</a>
+was devised to test
the space and time efficiency of different instantiations of <code>flyweight</code> -against a base situation not using Boost.Flyweight. The profiled scenarios are:
+against a base situation not using Boost.Flyweight. The profiled
+scenarios are:</p>
+
+
+
+<p>&#35774;&#35745;&#20102;&#19968;&#20010;<a href="examples.html#example6">&#20998;&#26512;&#31243;&#24207;</a>&#20197;&#19981;&#20351;&#29992;Boost.Flyweight&#30340;&#24773;&#20917;&#20316;&#20026;&#22522;&#25968;&#26469;&#23545;&#27604;&#27979;&#35797;&#19981;&#21516;<code>flyweight</code>&#23454;&#20363;&#30340;&#31354;&#38388;&#21644;&#26102;&#38388;&#25928;&#29575;&#12290;&#36825;&#20123;&#20998;&#26512;&#22330;&#26223;&#26159;&#65306;</p>
+
+
+
 <ol>
+
+
+
   <li><code>std::string</code>.</li>
- <li><code>flyweight&lt;std::string&gt;</code> with default configuration aspects - (<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>, - <a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a> tracking, - <a href="tutorial/configuration.html#simple_locking"><code>simple_locking</code></a>).
+
+
+
+  <li><code>flyweight&lt;std::string&gt;</code>
+with default configuration aspects (<a href="tutorial/configuration.html#hashed_factory"><code>hashed_factory</code></a>, + <a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a> +tracking, <a href="tutorial/configuration.html#simple_locking"><code>simple_locking</code></a>).
   </li>
+
+
+
<li><code>flyweight&lt;std::string,<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&gt;</code>.</li>
+
+
+
<li><code>flyweight&lt;std::string,<a href="tutorial/configuration.html#set_factory"><code>set_factory</code></a>&gt;</code>.</li>
+
+
+
<li><code>flyweight&lt;std::string,<a href="tutorial/configuration.html#set_factory"><code>set_factory</code></a>,<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&gt;</code>.</li>
+
+
+
 </ol>
-</p>
+
+

 <p>
-Actually the types tested are not exactly those listed above, but instrumented
-versions that keep track of the allocated memory for profiling purposes.
-The program parses a text file into an array of words and then perform various -manipulations involving the different context usages of Boost.Flyweight discussed
-<a href="#time">previously</a>. As our text file we have used the
-<a href="http://www.gutenberg.org/dirs/etext99/2donq10.txt";>plain text</a>
+Actually the types tested are not exactly those listed above, but
+instrumented
+versions that keep track of the allocated memory for profiling
+purposes.
+The program parses a text file into an array of words and then perform
+various
+manipulations involving the different context usages of Boost.Flyweight
+discussed
+<a href="#time">previously</a>. As our text file we
+have used the
+<a href="http://www.gutenberg.org/dirs/etext99/2donq10.txt";>plain
+text</a>
version of Project Gutenberg edition of <a href="http://www.gutenberg.org/etext/2000";><i>Don
-Quijote</i></a> (2.04 MB).
+Quijote</i></a> (2.04 MB).</p>
+<p>&#23454;&#38469;&#27979;&#35797;&#30340;&#31867;&#22411;&#21644;&#19978;&#38754;&#21015;&#20986;&#26469;&#30340;&#19981;&#23436;&#20840;&#19968;&#33268;&#65292;&#32780;&#26159;&#20462;&#25913;&#21518;&#30340;&#21487;&#20197;&#36319;&#36394;&#20869;&#23384;&#20998;&#37197;&#30340;&#29256;&#26412;&#29992;&#20197;&#20998;&#26512;&#12290;&#35813;&#31243;&#24207;&#20998;&#26512;&#19968;&#20010;&#25991;&#26412;&#25991;&#20214;&#24182;&#23558;&#32467;&#26524;&#20445;&#23384;&#22312;&#19968;&#20010;&#21333;&#35789;&#25968;&#32452;&#37324;&#28982;&#21518;&#36827;&#34892;&#21508;&#31181;&#25805;&#20316;&#65292;&#28041;&#21450;&#21040;&#21069;&#38754;&#35752;&#35770;&#30340;Boost.Flyweight&#30340;&#21508;&#31181;&#20351;&#29992;&#29615;&#22659;&#12290;&#25105;&#20204;&#20351;&#29992;<i><a href="http://www.gutenberg.org/etext/2000";><i>Don +Quijote</i></a></i>&#30340;Project Gutenberg&#29256;&#26412;&#30340;<a href="http://www.gutenberg.org/dirs/etext99/2donq10.txt";>&#32431;&#25991;&#26412;</a>&#26684;&#24335;&#20316;&#20026;&#25105;&#20204;&#30340;&#25991;&#26412;&#25991;&#20214;&#12290;
 </p>

+
+
 <h3><a name="msvc_80">Microsoft Visual C++ 8.0</a></h3>

+
+
 <p>
The program was built with default release settings and <code>_SECURE_SCL=0</code>. -Tests were run under Windows XP in a machine equipped with an Intel Core 2 Duo T5500
-processor and 1 GB of RAM.
+Tests were run under Windows XP in a machine equipped with an Intel
+Core 2 Duo T5500
+processor and 1 GB of RAM.</p>
+
+
+
+<p>&#31243;&#24207;&#20351;&#29992;&#40664;&#35748;&#30340;release&#35774;&#32622;&#32534;&#35793;&#65292;&#24182;&#19988;&#35774;&#32622;<code>_SECURE_SCL</code>&#36873;&#39033;&#20026;0&#12290;&#27979;&#35797;&#31243;&#24207;&#36816;&#34892;&#22312;&#19968;&#21488;&#37197;&#22791;&#20102;Intel
+Core 2 Duo T5500&#21644;1GB&#20869;&#23384;&#30340;Windwos&nbsp;XP&#26426;&#22120;&#19978;&#12290;
 </p>

-<h4><a name="msvc_80_memory">Memory</a></h4>
+
+
+<h4><a name="msvc_80_memory">Memory &nbsp;&#20869;&#23384;</a></h4>
+
+

 <p align="center">
-<img src="memory_msvc_80.png" alt="memory consumption (MB), MSVC++ 8.0"
-width="798" height="322"><br>
+<img src="memory_msvc_80.png" alt="memory consumption (MB), MSVC++ 8.0" height="322" width="798"><br>
+
+
+
 <b>Fig. 2: Memory consumption, MSVC++ 8.0. Values in MB.</b>
 </p>

+
+
 <p>
-The results show the memory consumption figures for the different profiled
+The results show the memory consumption figures for the different
+profiled
 scenarios.
-The standard library implementation of MSVC++ 8.0 features the so-called
+The standard library implementation of MSVC++ 8.0 features the
+so-called
 small buffer optimization for strings, by which <code>std::string</code>
 objects hold a small buffer that can be used when the string is short,
thus avoding dynamic allocations. This results in <code>sizeof(std::string)</code> -being quite high, 28 bytes. In our particular test strings are almost always -held in the small buffer, so the minimum <a href="#overall_memory"><i>S<sub>F</sub></i> / <i>S</i></a>
+being quite high, 28 bytes. In our particular test strings are almost
+always
+held in the small buffer, so the minimum <a href="#overall_memory"><i>S<sub>F</sub></i>
+/ <i>S</i></a>
 achievable is 4/28 = 14.3%, which is quite close to the experimental
 results, given that the memory devoted to storage of shared values
 is residual (around 3% of total memory) due to the high word redundancy
-of the text source.
+of the text source.</p>
+
+
+
+<p>&#36825;&#20010;&#32467;&#26524;&#26174;&#31034;&#20102;&#19981;&#21516;&#30340;&#20998;&#26512;&#22330;&#26223;&#19979;&#20869;&#23384;&#28040;&#32791;&#25351;&#26631;&#12290;MSVC++8.0&#30340;&#26631;&#20934;&#24211;&#23454;&#29616;&#20102;&#19968;&#20010;&#25152;&#35859;&#30340;&#38024;&#23545;&#23383;&#31526;&#20018;&#30340;&#23567;&#32531;&#20914;&#21306;&#20248;&#21270;&#65292;&#24403;&#23383;&#31526;&#20018;&#36739;&#30701;&#30340;&#26102;&#20505;&#21487;&#20197;&#30452;&#25509;&#23384;&#20648;&#22312;<code>std::string</code>&#33258;&#24102;&#30340;&#36825;&#20010;&#23567;&#32531;&#20914;&#21306;&#37324;&#65292;&#20110;&#26159;&#36991;&#20813;&#20102;&#21160;&#24577;&#20998;&#37197;&#12290;&#36825;&#23548;&#33268;<code>sizeof(std::string)</code>&#30456;&#24403;&#39640;&#65292;&#26377;28&#20010;&#23383;&#33410;&#12290;&#22312;&#25105;&#20204;&#36825;&#20010;&#27979;&#35797;&#37324;&#23383;&#31526;&#20018;&#20960;&#20046;&#24635;&#26159;&#23384;&#20648;&#22312;&#36825;&#20010;&#23567;&#30340;&#32531;&#20914;&#21306;&#37324;&#65292;&#22240;&#27492;<a href="performance.html#overall_memory"><i>S<sub>F</sub></i> +/ <i>S</i></a>&#21487;&#20197;&#36798;&#22240;&#27492;&#21040;&#30340;&#26368;&#23567;&#20540;&#26159;4/28 = 14.3%&#65292;&#36825;&#36319;&#23454;&#39564;&#32467;&#26524;&#30456;&#24403;&#25509;&#36817;&#20102;&#65292;&#30001;&#20110;&#21407;&#25991;&#20013;&#21333;&#35789;&#39640;&#24230;&#30340;&#20887;&#20313;&#65292;&#29992;&#26469;&#23384;&#20648;&#20849;&#20139;&#20540;&#30340;&#20869;&#23384;&#19981;&#20540;&#19968;&#25552;&#65288;&#22823;&#27010;&#21344;&#24635;&#20869;&#23384;&#30340;3%&#65289;&#12290;
 </p>

-<h4><a name="msvc_80_time">Execution time</a></h4>
+
+
+<h4><a name="msvc_80_time">Execution time
+&nbsp;&#25191;&#34892;&#26102;&#38388;</a></h4>
+
+

 <p align="center">
-<img src="time_msvc_80.png" alt="execution time (s), MSVC++ 8.0"
-width="820" height="324"><br>
+<img src="time_msvc_80.png" alt="execution time (s), MSVC++ 8.0" height="324" width="820"><br>
+
+
+
 <b>Fig. 3: Execution time, MSVC++ 8.0. Values in seconds.</b>
 </p>

+
+
 <p>
-The figure displays execution times for the profiled scenarios in different
+The figure displays execution times for the profiled scenarios in
+different
 usage contexts. In accordance with our previous
-<a href="#time">qualitative analysis</a>, initialization of <code>flyweight</code>s -carries an important overhead with respect to the base case scenario (between 10% and 40%
+<a href="#time">qualitative analysis</a>,
+initialization of <code>flyweight</code>s
+carries an important overhead with respect to the base case scenario
+(between 10% and 40%
 of additional execution time), while the other usage contexts
-(assignment, equality comparison and value access) have performance gains,
-with speedup factors of up to 14 in some cases. The use of a
-<a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a>
+(assignment, equality comparison and value access) have performance
+gains,
+with speedup factors of up to 14 in some cases. The use of a <a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a>
 tracking policy introduces penalties with respect to
<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>
-in initialization and assignment, but has no effect in equality comparison
-and value access.
+in initialization and assignment, but has no effect in equality
+comparison
+and value access.</p>
+
+
+
+<p>&#36825;&#24133;&#22270;&#26174;&#31034;&#20102;&#19981;&#21516;&#30340;&#20998;&#26512;&#22330;&#26223;&#22312;&#21508;&#31181;&#20351;&#29992;&#29615;&#22659;&#19979;&#30340;&#25191;&#34892;&#26102;&#38388;&#12290;&#19982;&#25105;&#20204;&#20043;&#21069;&#30340;<a href="#time">&#23450;&#24615;&#20998;&#26512;</a>&#19968;&#33268;&#65292;&#19982;&#27604;&#36739;&#22522;&#25968;&#30456;&#27604;<code>flyweight</code>s&#30340;&#21021;&#22987;&#21270;&#26377;&#19968;&#20010;&#26126;&#26174;&#30340;&#39069;&#22806;&#24320;&#38144;&#65288;10% &#21040; 40%&#30340;&#39069;&#22806;&#25191;&#34892;&#26102;&#38388;&#19981;&#31561; &#65289;&#65292;&#28982;&#32780;&#20854;&#23427;&#30340;&#20351;&#29992;&#29615;&#22659;&#19979;&#65288;&#36171;&#20540;&#65292;&#21028;&#31561;&#21644;&#20540;&#23384;&#21462;&#65289;&#33719;&#24471;&#20102;&#24615;&#33021;&#30340;&#25552;&#21319;&#65292;&#22312;&#26576;&#20123;&#24773;&#20917;&#19979;&#21152;&#36895;&#31995;&#25968;&#39640;&#36798;14&#12290;&#19982;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&#36319;&#36394;&#31574;&#30053;&#30456;&#27604;<a href="tutorial/configuration.html#refcounted"><code>refcounted</code></a>&#36319;&#36394;&#31574;&#30053;&#22312;&#21021;&#22987;&#21270;&#21644;&#36171;&#20540;&#26102;&#24615;&#33021;&#26377;&#25152;&#19979;&#38477;&#65292;&#20294;&#26159;&#22312;&#21028;&#31561;&#21644;&#20540;&#23384;&#21462;&#26041;&#38754;&#27809;&#26377;&#20160;&#20040;&#21306;&#21035;&#12290;
 </p>

+
+
 <h3><a name="gcc_344">GNU GCC 3.4.4</a></h3>

+
+
 <p>
 The Cygwin/MinGW version of the compiler was used, with command options
 <code>-ftemplate-depth-128 -O3 -finline-functions -DNDEBUG</code>.
-Tests were run under a Cygwin terminal in the same machine as <a href="#msvc_80">before</a>.
-</p>
+Tests were run under a Cygwin terminal in the same machine as <a href="#msvc_80">before</a>.</p> +<p>&#20351;&#29992;&#30340;&#26159;Cygwin/MinGW&#37324;&#30340;&#29256;&#26412;&#65292;&#24102;&#26377;<code>-ftemplate-depth-128 -O3 -finline-functions -DNDEBUG</code>&#36873;&#39033;<code>&#12290;</code>&nbsp;&#27979;&#35797;&#31243;&#24207;&#36816;&#34892;&#30340;Cygwin&#32456;&#31471;&#21644;<a href="#msvc_80">&#20043;&#21069;</a>&#30340;&#27979;&#35797;&#22312;&#21516;&#19968;&#21488;&#26426;&#22120;&#19978;&#12290;</p>
+
+

 <h4><a name="gcc_344_memory">Memory</a></h4>

+
+
 <p align="center">
-<img src="memory_gcc_344.png" alt="memory consumption (MB), GCC 3.4.4"
-width="798" height="322"><br>
+<img src="memory_gcc_344.png" alt="memory consumption (MB), GCC 3.4.4" height="322" width="798"><br>
+
+
+
 <b>Fig. 4: Memory consumption, GCC 3.4.4. Values in MB.</b>
 </p>

+
+
 <p>
 The standard library used by GCC 3.4.4 implements <code>std::string</code>
using <a href="http://en.wikipedia.org/wiki/Copy-on-write";>copy-on-write</a>
 optimization techniques, which leads to very small value redundancy for
 some usage patterns. This explains why the memory reduction achieved
-by Boost.Flyweight is so poor in this case. Other contexts where assignment
+by Boost.Flyweight is so poor in this case. Other contexts where
+assignment
 is much less used than direct construction will favor Boost.Flyweight
-over plain copy-on-write <code>std::string</code>s.
+over plain copy-on-write <code>std::string</code>s.</p>
+
+<p>GCC 3.4.4&#20351;&#29992;&#30340;&#26631;&#20934;&#24211;&#23454;&#29616;<code>std::string</code>&#26102;&#20351;&#29992;&#20102;<a href="http://en.wikipedia.org/wiki/Copy-on-write";>&#20889;&#25335;&#36125;</a>&#20248;&#21270;&#25216;&#26415;&#65292;&#23548;&#33268;&#22312;&#26576;&#20123;&#20351;&#29992;&#26041;&#24335;&#19979;&#20887;&#20313;&#30340;&#20540;&#38750;&#24120;&#23569;&#12290;&#36825;&#35299;&#37322;&#20102;&#20026;&#20160;&#20040;&#22312;&#36825;&#31181;&#26465;&#20214;&#19979;&#20351;&#29992;Boost.Flyweight&#25152;&#20943;&#23569;&#30340;&#20869;&#23384;&#23569;&#30340;&#21487;&#24604;&#12290;&#22312;&#37027;&#20123;&#26356;&#22810;&#30340;&#37319;&#29992;&#30452;&#25509;&#26500;&#36896;&#32780;&#38750;&#36171;&#20540;&#30340;&#20351;&#29992;&#29615;&#22659;&#19979;&#65292;Boost.Flyweight&#30340;&#34920;&#29616;&#20248;&#20110;&#26222;&#36890;&#30340;&#20889;&#25335;&#36125;<code>std::string</code>s&#12290;
 </p>

-<h4><a name="gcc_344_time">Execution time</a></h4>
+
+
+<h4><a name="gcc_344_time">Execution time &nbsp;&#25191;&#34892;&#26102;&#38388;</a></h4>
+
+

 <p align="center">
-<img src="time_gcc_344.png" alt="execution time (s), GCC 3.4.4"
-width="820" height="324"><br>
+<img src="time_gcc_344.png" alt="execution time (s), GCC 3.4.4" height="324" width="820"><br>
+
+
+
 <b>Fig. 5: Execution time, GCC 3.4.4. Values in seconds.</b>
 </p>

+
+
 <p>
 Relative performance figures are similar to those obtained for
-<a href="#msvc_80_time">MSVC++ 8.0</a>, although some of the
+<a href="#msvc_80_time">MSVC++ 8.0</a>, although
+some of the
 speedups achieved by Boost.Flyweight are higher here (&times;25
 in equality comparison and up to &times;100 in assignment when
<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>
-is in effect).
+is in effect).</p>
+
+<p>&#30456;&#20851;&#30340;&#24615;&#33021;&#25351;&#26631;&#19982;<a href="performance.html#msvc_80_time">MSVC++ 8.0</a>&#30340;&#32467;&#26524;&#31867;&#20284;&#65292; &#28982;&#32780;&#36825;&#27425;&#26576;&#20123;&#20351;&#29992;Boost.Flyweight&#33719;&#24471;&#30340;&#21152;&#36895;&#25928;&#26524;&#26356;&#39640;&#65288;&#21028;&#31561;&#26102;&#25552;&#39640;&#20102;25&#20493;&#24403;&#20351;&#29992;<a href="tutorial/configuration.html#no_tracking"><code>no_tracking</code></a>&#26102;&#36171;&#20540;&#25552;&#39640;&#20102;100&#20493;&#65289;&#12290;
 </p>

-<h2><a name="conclusions">Conclusions</a></h2>
+
+
+<h2><a name="conclusions">Conclusions &nbsp;&#32467;&#35770;</a></h2>
+
+

 <p>
 The introduction of Boost.Flyweight in application scenarios with very
-high value redundancy yields important reductions in memory consumption:
+high value redundancy yields important reductions in memory
+consumption:
 this is especially relevant when data volume approaches the limits of
 physical memory in the machine, since Boost.Flyweight can avoid virtual
 memory thrashing thus making the application viable. We have shown
 how to estimate the achievable reduction in memory consumption from
 some basic value statistics and knowledge of the <code>flyweight</code>
-configuration aspects being used.
+configuration aspects being used.</p>
+
+<p>&#22312;&#20540;&#20887;&#20313;&#38750;&#24120;&#39640;&#30340;&#24212;&#29992;&#22330;&#21512;&#20351;&#29992;Boost.Flyweight&#21487;&#20197;&#26174;&#33879;&#20943;&#23569;&#20869;&#23384;&#29992;&#37327;&#65306;&#23588;&#20854;&#26159;&#24403;&#25968;&#25454;&#37327;&#36798;&#21040;&#26426;&#22120;&#29289;&#29702;&#20869;&#23384;&#38480;&#21046;&#30340;&#26102;&#20505;&#65292;&#22240;&#20026;
+Boost.Flyweight&#21487;&#20197;&#36991;&#20813;&#34394;&#25311;&#20869;&#23384;&#38663;&#33633;&#20110;&#26159;&#35753;&#24212;&#29992;&#31243;&#24207;&#21487;&#29992;&#24615;&#26356;&#24378;&#12290;&#25105;&#20204;&#24050;&#32463;&#28436;&#31034;&#20102;&#24590;&#26679;&#35780;&#20272;&#21487;&#20197;&#20943;&#23569;&#30340;&#20869;&#23384;&#29992;&#37327;&#65292;&#36890;&#36807;&#19968;&#20123;&#22522;&#26412;&#30340;<span class="wbtr_mn">&#32479;&#35745;&#25968;&#23383;</span>&#21644;&#20351;&#29992;&#21040;&#37197;
+&#32622;&#30340;<code>flyweight</code>&#36873;&#39033;&#30693;&#35782;&#12290;
 </p>

+
+
 <p>
 Boost.Flyweight can also accelerate execution times in areas other than
 object initialization, due to the fastest manipulation of small
 flyweight objects and to locality and cache effects arising from the
-drastic reduction of the set of allocated values.
+drastic reduction of the set of allocated values.</p>
+
+<p>
+Boost.Flyweight&#21487;&#20197;&#21152;&#36895;&#38500;&#20102;&#23545;&#35937;&#21021;&#22987;&#21270;&#20197;&#22806;&#30340;&#25191;&#34892;&#36895;&#24230;&#65292;&#22240;&#20026;&#25805;&#32437;&#23567;&#22411;&#30340;flyweight&#23545;&#35937;&#24456;&#24555;&#65292;&#36824;&#26377;&#22240;&#20026;&#25152;&#20998;&#37197;&#30340;&#20540;&#30340;&#38598;&#21512;&#24613;&#21095;&#20943;&#23569;&#24102;&#26469;&#30340;&#38598;&#20013;&#21644;&#32531;&#23384;&#25928;&#26524;&#12290;
 </p>

-<hr>

+
+<hr>
<div class="prev_link"><a href="reference/tracking.html"><img src="prev.gif" alt="tracking policies" border="0"><br>
+
+
+
 Tracking policies
 </a></div>
+
+
+
<div class="up_link"><a href="index.html"><img src="up.gif" alt="index" border="0"><br>
+
+
+
 Index
 </a></div>
+
+
+
<div class="next_link"><a href="examples.html"><img src="next.gif" alt="examples" border="0"><br>
+
+
+
 Examples
-</a></div><br clear="all" style="clear: all;">
-<br clear="all" style="clear: all;">
+</a></div>
+
+
+
+<br style="" clear="all">
+
+
+
+<br style="" clear="all">
+
+

 <br>

+
+
 <p>Revised December 2nd 2008</p>

-<p>&copy; Copyright 2006-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
-Distributed under the Boost Software
-License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
+
+
+<p>&copy; Copyright 2006-2008 Joaqu&iacute;n M
+L&oacute;pez Mu&ntilde;oz.
+Distributed under the Boost Software License, Version 1.0. (See
+accompanying file <a href="../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>
 http://www.boost.org/LICENSE_1_0.txt</a>)
 </p>
+
+

 </body>
 </html>

Modified: trunk/libs/flyweight/doc/reference/factories.html
==============================================================================
--- trunk/libs/flyweight/doc/reference/factories.html   (original)
+++ trunk/libs/flyweight/doc/reference/factories.html Wed Apr 8 04:43:38 2009
@@ -1,583 +1,1293 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 Transitional//EN">
-
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Flyweight Documentation - Factories reference</title>
-<link rel="stylesheet" href="../style.css" type="text/css">
-<link rel="start" href="../index.html">
-<link rel="prev" href="tags.html">
-<link rel="up" href="index.html">
-<link rel="next" href="holders.html">
+
+
+
+
+
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+
+
+
+
+
+
+
+  <title>Boost.Flyweight Documentation - Factories reference</title>
+  <link rel="stylesheet" href="../style.css" type="text/css">
+
+
+
+
+
+  <link rel="start" href="../index.html">
+
+
+
+
+
+  <link rel="prev" href="tags.html">
+
+
+
+
+
+  <link rel="up" href="index.html">
+
+
+
+
+
+  <link rel="next" href="holders.html">
 </head>

+
 <body>
-<h1><img src="../../../../boost.png" alt="Boost logo" align=
-"middle" width="277" height="86">Boost.Flyweight
+
+
+
+<h1><img src="../../../../boost.png" alt="Boost logo" align="middle" height="86" width="277">Boost.Flyweight
 Factories reference</h1>

+
+
<div class="prev_link"><a href="tags.html"><img src="../prev.gif" alt="tags" border="0"><br>
+
+
+
 Tags
 </a></div>
+
+
+
<div class="up_link"><a href="index.html"><img src="../up.gif" alt="Boost.Flyweight reference" border="0"><br>
+
+
+
 Boost.Flyweight reference
 </a></div>
+
+
+
<div class="next_link"><a href="holders.html"><img src="../next.gif" alt="holders" border="0"><br>
+
+
+
 Holders
-</a></div><br clear="all" style="clear: all;">
+</a></div>
+
+
+
+<br style="" clear="all">
+
+

 <hr>
+<h2>Contents &nbsp;&#30446;&#24405;</h2>
+

-<h2>Contents</h2>

 <ul>
-  <li><a href="#factory">Factories and factory specifiers</a></li>
-  <li><a href="#factory_tag_synopsis">Header
-    <code>"boost/flyweight/factory_tag.hpp"</code> synopsis</a>
+
+
+
+  <li><a href="#factory">Factories and factory
+specifiers &nbsp;&#24037;&#21378;&#21644;&#24037;&#21378;&#25551;&#36848;&#31526;</a></li>
+
+
+
+ <li><a href="#factory_tag_synopsis">Header <code>"boost/flyweight/factory_tag.hpp"</code> +synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/factory_tag.hpp"&#22823;&#24847;</a>
+
+
     <ul>
- <li><a href="#is_factory">Class template <code>is_factory</code></a></li> - <li><a href="#factory_construct">Class template <code>factory</code></a></li>
-    </ul>
-  </li>
-  <li><a href="#hashed_factory_fwd_synopsis">Header
-    <code>"boost/flyweight/hashed_factory_fwd.hpp"</code> synopsis</a>
+
+
+
+ <li><a href="#is_factory">Class template <code>is_factory &nbsp;&#31867;&#27169;&#26495; is_factory</code></a></li>
+
+
+
+      <li><a href="#factory_construct">Class
+template <code>factory &nbsp;&#31867;&#27169;&#26495; factory</code></a></li>
+
+
+
+
+
+    </ul>
+
+
+
   </li>
-  <li><a href="#hashed_factory_synopsis">Header
-    <code>"boost/flyweight/hashed_factory.hpp"</code> synopsis</a>
+
+
+
+ <li><a href="#hashed_factory_fwd_synopsis">Header <code>"boost/flyweight/hashed_factory_fwd.hpp"</code> +synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/hashed_factory_fwd.hpp"&#22823;&#24847;</a> </li>
+
+
+
+ <li><a href="#hashed_factory_synopsis">Header <code>"boost/flyweight/hashed_factory.hpp"</code> +synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/hashed_factory.hpp"&#22823;&#24847;</a>
+
+
     <ul>
- <li><a href="#hashed_factory_class">Class template <code>hashed_factory_class</code></a></li> - <li><a href="#hashed_factory">Class template <code>hashed_factory</code></a></li>
-    </ul>
-  </li>
-  <li><a href="#set_factory_fwd_synopsis">Header
-    <code>"boost/flyweight/set_factory_fwd.hpp"</code> synopsis</a>
+
+
+
+      <li><a href="#hashed_factory_class">Class
+template <code>hashed_factory_class &nbsp;&#31867;&#27169;&#26495; hashed_factory_class</code></a></li>
+
+
+
+ <li><a href="#hashed_factory">Class template <code>hashed_factory &#31867;&#27169;&#26495;&nbsp; hashed_factory&nbsp;</code></a></li>
+
+
+
+
+
+    </ul>
+
+
+
   </li>
-  <li><a href="#set_factory_synopsis">Header
-    <code>"boost/flyweight/set_factory.hpp"</code> synopsis</a>
+
+
+
+ <li><a href="#set_factory_fwd_synopsis">Header <code>"boost/flyweight/set_factory_fwd.hpp"</code> +synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/set_factory_fwd.hpp"&#22823;&#24847;</a> </li>
+
+
+
+ <li><a href="#set_factory_synopsis">Header <code>"boost/flyweight/set_factory.hpp"</code> +synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/set_factory.hpp"&#22823;&#24847;</a>
+
+
     <ul>
- <li><a href="#set_factory_class">Class template <code>set_factory_class</code></a></li> - <li><a href="#set_factory">Class template <code>set_factory</code></a></li>
-    </ul>
+
+
+
+      <li><a href="#set_factory_class">Class
+template <code>set_factory_class &nbsp;&#31867;&#27169;&#26495; set_factory_class</code></a></li>
+
+
+
+ <li><a href="#set_factory">Class template <code>set_factory &nbsp;&#31867;&#27169;&#26495; set_factory</code></a></li>
+
+
+
+
+
+    </ul>
+
+
+
   </li>
+
+
+
   <li><a href="#assoc_container_factory_fwd_synopsis">Header
- <code>"boost/flyweight/assoc_container_factory_fwd.hpp"</code> synopsis</a>
-  </li>
+    <code>"boost/flyweight/assoc_container_factory_fwd.hpp"</code>
+synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/assoc_container_factory_fwd.hpp"&#22823;&#24847;</a> </li>
+
+
+
   <li><a href="#assoc_container_factory_synopsis">Header
-    <code>"boost/flyweight/assoc_container_factory.hpp"</code> synopsis</a>
+    <code>"boost/flyweight/assoc_container_factory.hpp"</code>
+synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/assoc_container_factory.hpp"&#22823;&#24847;</a>
+
+
     <ul>
- <li><a href="#assoc_container_factory_class">Class template <code>assoc_container_factory_class</code></a></li> - <li><a href="#assoc_container_factory">Class template <code>assoc_container_factory</code></a></li>
-    </ul>
+
+
+
+      <li><a href="#assoc_container_factory_class">Class
+template <code>assoc_container_factory_class &nbsp;&#31867;&#27169;&#26495;&nbsp; assoc_container_factory_class</code></a></li>
+
+
+
+      <li><a href="#assoc_container_factory">Class
+template <code>assoc_container_factory &nbsp;&#31867;&#27169;&#26495;&nbsp; assoc_container_factory</code></a></li>
+
+
+
+
+
+    </ul>
+
+
+
   </li>
+
+
+
 </ul>

-<h2><a name="factory">Factories and factory specifiers</a></h2>
+
+
+<h2><a name="factory">Factories and factory
+specifiers &nbsp;&#24037;&#21378;&#21644;&#24037;&#21378;&#25551;&#36848;&#31526;</a></h2>
+
+

 <p>
 Given a type <code>Key</code> and an
<a href="http://www.sgi.com/tech/stl/Assignable.html";><code>Assignable</code></a> -type <code>Entry</code> implicitly convertible to <code>const Key&amp;</code>, a
-<i>factory of <code>Entry</code> elements</i> (implicitly associated to
+type <code>Entry</code> implicitly convertible to <code>const
+Key&amp;</code>, a
+<i>factory of <code>Entry</code> elements</i>
+(implicitly associated to
 <code>Key</code>) is a
<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default -Constructible</code></a> entity able to store and retrieve immutable elements of
-type <code>Entry</code>. A factory is governed by an associated equivalence
+Constructible</code></a> entity able to store and retrieve
+immutable elements of
+type <code>Entry</code>. A factory is governed by an
+associated equivalence
 relation defined on <code>Key</code> so that no two
 <code>Entry</code> objects convertible to equivalent <code>Key</code>s
-can be stored simultaneously in the factory. Different factory types can
-use different equivalence relations.
+can be stored simultaneously in the factory. Different factory types
+can
+use different equivalence relations.</p>
+
+
+
+<p>&#32473;&#23450;&#19968;&#20010;<big><code>Key</code></big>&#31867;&#22411;&#21644;&#19968;&#20010;<a href="http://www.sgi.com/tech/stl/Assignable.html";>&#21487;&#36171;&#20540;</a>&#21487; +&#38544;&#24335;&#36716;&#25442;&#25104;<big><code>const Key&amp;</code></big>&#30340;<big><code>Entry</code></big>&#31867;
+&#22411;&#65292;&#19968;<big>&#20010;<i><code>Entry</code></i></big>&#65288;&#38544;&#21547;&#20851;&#32852;&#21040;<big><code>Key</code></big>&#65289;<i><code></code>&#20803;
+&#32032;&#30340;&#24037;&#21378;</i>&#26159;&#19968;&#20010;&#21487;&#40664;&#35748;&#26500;&#36896;&#30340;&#23454;&#20307;&#65292;&#23427;&#21487;&#20197;&#23384;&#21462;&#19981;&#21487;&#21464;&#30340;<big><code>Entry</code></big>&#31867;&#22411;&#30340;&#20803;&#32032;&#12290;&#19968;
+&#20010;&#24037;&#21378;&#21463;&#23450;&#20041;&#22312;<big><code>Key</code></big>&#19978;&#30340;&#30456;&#31561;&#20851;&#31995;&#25903;&#37197;&#65292;2&#20010;&#21487;&#20197;&#36716;&#25442;&#21040;&#30456;&#21516;<big><code>Key</code>s</big>&#30340;<big><code>Entry</code></big>&#23545;&#35937;&#19981;&#33021;&#21516;&#26102;&#23384;&#20648;&#22312;&#24037;&#21378;&#37324;&#12290;&#19981;&#21516;&#30340;&#24037;&#21378;&#31867;&#22411;&#21487;&#20197;&#20351;&#29992;&#19981;&#21516;&#30340;&#30456;&#31561;&#20851;&#31995;&#12290;
 </p>

+
+
 <p>
-In the following table, <code>Factory</code> is a factory of elements
-of type <code>Entry</code>, <code>f</code> denotes an object of type <code>Factory</code>, -<code>x</code> is an object of type <code>Entry</code> and <code>h</code> is a
+In the following table, <code>Factory</code> is a factory
+of elements
+of type <code>Entry</code>, <code>f</code>
+denotes an object of type <code>Factory</code>,
+<code>x</code> is an object of type <code>Entry</code>
+and <code>h</code> is a
 value of <code>Factory::handle_type</code>.
 </p>

-<p align="center">
+
+
+<p style="text-align: left;">
+&#22312;&#19979;&#38754;&#36825;&#20010;&#34920;&#26684;&#37324;&#65292;<big><code>Factory</code></big>&#26159;&#19968;&#20010;<big><code>Entry</code></big>&#31867;
+&#22411;&#20803;&#32032;&#30340;&#24037;&#21378;&#65292;<big><code>f</code></big>&#20195;&#34920;&#19968;&#20010;<big><code>Factory</code></big>&#31867;&#22411;&#30340;
+&#23545;&#35937;&#65292;<big><code>x</code></big>&#26159;&#19968;&#20010;<big><code>Entry</code></big>&#31867;&#22411;&#30340;&#23545;&#35937;&#32780;<big><code>h</code></big>&#26159;<big><code>Factory::handle_type</code></big>&#31867;
+&#22411;&#30340;&#20540;&#12290;</p>
+
+
+
 <table cellspacing="0">
+
+
+
   <caption><b>Factory requirements.</b></caption>
-<tr>
-  <th align="center">expression</th>
-  <th align="center">return type</th>
-  <th align="center">assertion/note<br>pre/post-condition</th>
-</tr>
-<tr>
-  <td><code>Factory::handle_type</code></td>
-  <td>handle to elements of type <code>T</code><br>
-    stored in the factory
-  </td>
-  <td><code>handle_type</code> is
- <a href="http://www.sgi.com/tech/stl/Assignable.html";><code>Assignable</code></a>
-    and its copy and<br>
-    assignment operations never throw an exception.
-  </td>
-</tr>
-<tr class="odd_tr">
-  <td><code>f.insert(x);</code></td>
-  <td><code>handle_type</code></td>
- <td>Inserts a copy of <code>x</code> if there is no equivalent entry in <code>f</code>;<br>
-    returns a handle to the inserted or equivalent element.
-  </td>
-</tr>
-<tr>
-  <td><code>f.erase(h);</code></td>
-  <td><code>void</code></td>
-  <td>Erases the element associated to <code>h</code>.<br>
-   This operation does not throw.
-  </td>
-</tr>
-<tr class="odd_tr">
-  <td><code>f.entry(h);</code></td>
-  <td><code>const Entry&amp;</code></td>
-  <td>Returns a reference to the element associated to <code>h</code>.<br>
-    This operation does not throw.
-  </td>
-</tr>
+  <tbody>
+
+
+
+    <tr>
+
+
+
+      <th align="center">expression</th>
+
+
+
+      <th align="center">return type</th>
+
+
+
+      <th align="center">assertion/note<br>
+
+
+
+pre/post-condition</th>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+      <td><code>Factory::handle_type</code></td>
+
+
+
+      <td>handle to elements of type <code>T</code><br>
+
+
+
+stored in the factory </td>
+
+
+
+ <td><code>handle_type</code> is <a href="http://www.sgi.com/tech/stl/Assignable.html";><code>Assignable</code></a>
+and its copy and<br>
+
+
+
+assignment operations never throw an exception.<br>
+
+
+
+ <code>handle_type</code>&#26159;<a href="http://www.sgi.com/tech/stl/Assignable.html";>&#21487;&#36171;&#20540;&#30340;</a>&#32780;
+&#19988;&#23427;&#30340;&#25335;&#36125;&#21644;&#36171;<br>
+
+
+
+&#20540;&#25805;&#20316;&#32477;&#19981;&#20250;&#25243;&#20986;&#24322;&#24120; </td>
+
+
+
+    </tr>
+
+
+
+    <tr class="odd_tr">
+
+
+
+      <td><code>f.insert(x);</code></td>
+
+
+
+      <td><code>handle_type</code></td>
+
+
+
+      <td>Inserts a copy of <code>x</code> if there
+is no equivalent entry in <code>f</code>;<br>
+
+
+
+returns a handle to the inserted or equivalent element.<br>
+
+
+
+&#22914;&#26524;<code>f</code>&#37324;&#27809;&#26377;&#30456;&#31561;&#30340;entry&#25554;&#20837;&#19968;&#20010;<code>x</code>&#30340;&#25335;
+&#36125;&#65307;&#36820;<br>
+
+
+
+&#22238;&#19968;&#20010;&#21040;&#25554;&#20837;&#30340;&#25110;&#32773;&#30456;&#31561;&#30340;&#20803;&#32032;&#30340;&#21477;&#26564; </td>
+
+
+
+    </tr>
+
+
+
+    <tr>
+
+
+
+      <td><code>f.erase(h);</code></td>
+
+
+
+      <td><code>void</code></td>
+
+
+
+      <td>Erases the element associated to <code>h</code>.<br>
+
+
+
+This operation does not throw.<br>
+
+
+
+&#28165;&#38500;&#20851;&#32852;&#21040;<code>h</code>&#30340;&#20803;&#32032;&#12290;&#36825;&#20010;&#25805;&#20316;&#19981;&#25243;&#20986;&#24322;&#24120; </td>
+
+
+
+    </tr>
+
+
+
+    <tr class="odd_tr">
+
+
+
+      <td><code>f.entry(h);</code></td>
+
+
+
+      <td><code>const Entry&amp;</code></td>
+
+
+
+ <td>Returns a reference to the element associated to <code>h</code>.<br>
+
+
+
+This operation does not throw.<br>
+
+
+
+&#36820;&#22238;&#20851;&#32852;&#21040;<code>h</code>&#30340;&#20803;&#32032;&#30340;&#24341;&#29992;&#12290;&#36825;&#20010;&#25805;&#20316;&#19981;&#25243;&#20986;&#24322;&#24120; </td>
+
+
+
+    </tr>
+
+
+
+
+
+  </tbody>
 </table>
-</p>
+
+

 <p>
-Additionally to the basic thread safety guarantee which is implicitly assumed
+Additionally to the basic thread safety guarantee which is implicitly
+assumed
 for most classes including the majority of components of the
C++ standard library, it is required that the member function <code>entry</code>
-can be invoked simultaneously from different threads, even in the presence
-of concurrent accesses to <code>insert</code> and <code>erase</code> (as long
-as the entry returned by <code>entry</code> is not the one which is being
-erased).
+can be invoked simultaneously from different threads, even in the
+presence
+of concurrent accesses to <code>insert</code> and <code>erase</code>
+(as long
+as the entry returned by <code>entry</code> is not the one
+which is being
+erased).</p>
+
+
+
+<p>&#38500;&#24320;&#22823;&#22810;&#25968;&#31867;&#22411;&#21253;&#25324;C++&#26631;&#20934;&#24211;&#30340;&#22823;&#37096;&#20998;&#32452;&#20214;&#38544;&#21547;&#20551;&#35774;&#30340;&#22522;&#26412;&#32447;&#31243;&#23433;&#20840;&#20445;&#35777;&#20197;&#22806;&#65292;&#36824;&#35201;&#27714;&#25104;&#21592;&#20989;&#25968;<big><code>entry</code></big>&#21487;
+&#20197;&#21516;&#26102;&#20174;&#19981;&#21516;&#30340;&#32447;&#31243;&#37324;&#35843;&#29992;&#65292;&#21363;&#20351;&#26159;&#22312;&#24182;&#21457;&#30340;&#35775;&#38382;<big><code>insert</code></big>&#21644;<big><code>erase</code></big>&#30340;
+&#24773;&#20917;&#19979;&#65288;&#21482;&#35201;<big><code>entry</code></big>&#20989;&#25968;&#36820;&#22238;&#30340;entry&#19981;&#26159;&#27491;&#22312;&#34987;&#28165;&#38500;&#30340;&#37027;&#20010;&#65289;&#12290;
 </p>

+
+
 <p>
-A type <code>S</code> is said to be a <i>factory specifier</i> if:
+A type <code>S</code> is said to be a <i>factory
+specifier</i> if: &nbsp;&#19968;&#20010;&#31867;&#22411;<code>S</code>&#34987;&#31216;&#20026;&#26159;&#19968;&#20010;<span style="font-style: italic;">&#24037;&#21378;&#25551;&#36848;&#31526;</span>&#22914;&#26524;&#65306;
+</p>
+
+
+
 <ol>
+
+
+
   <li>One of the following conditions is satisfied:
+&nbsp;&#28385;&#36275;&#20197;&#19979;&#26465;&#20214;&#20043;&#19968;&#65306;
+
+
     <ol type="a">
- <li><a href="#is_factory"><code>is_factory&lt;S&gt;::type</code></a> is - <a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a>,</li> - <li><code>S</code> is of the form <a href="#factory_construct"><code>factory&lt;S'&gt;</code></a>.</li>
+
+
+
+      <li><a href="#is_factory"><code>is_factory&lt;S&gt;::type</code></a>
+is <a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a>, +&nbsp;<a href="factories.html#is_factory"><code>is_factory&lt;S&gt;::type</code></a> +&#26159; <a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a></li>
+
+
+
+ <li><code>S</code> is of the form <a href="#factory_construct"><code>factory&lt;S'&gt;</code></a>. + <code>S</code>&#30340;&#26684;&#24335;&#26159;<a href="factories.html#factory_construct"><code>factory&lt;S'&gt;</code></a></li>
+
+
+
+
+
     </ol>
+
+
+
   </li>
-  <li><code>S</code>, or <code>S'</code> if (b) applies, is an
- <a href="../../../mpl/doc/refmanual/lambda-expression.html"><code>MPL Lambda - Expression</code></a> such that invoking it with types (<code>Entry</code>, - <code>Key</code>) resolves to a factory type of <code>Entry</code> elements
-    (implicitly associated to <code>Key</code>).
-  </li>
+
+
+
+  <li><code>S</code>, or <code>S'</code>
+if (b) applies, is an <a href="../../../mpl/doc/refmanual/lambda-expression.html"><code>MPL
+Lambda Expression</code></a> such that invoking it with
+types (<code>Entry</code>, <code>Key</code>)
+resolves to a factory type of <code>Entry</code> elements
+(implicitly associated to <code>Key</code>).</li>
+
+
+
 </ol>
+
+
+
+<div style="margin-left: 40px;"><code>S</code>&#65292;
+&#25110;&#32773;<code>S'</code>&#22914;&#26524;&#26465;&#20214;b&#36866;&#29992;&#65292;&#26159;&#19968;&#20010;<a href="../../../mpl/doc/refmanual/lambda-expression.html"><code><big>MPL +Lambda</big> <big>&#34920;&#36798;&#24335;</big></code></a>&#65292;&#24403;&#29992;&#31867;&#22411;&#65288;<big><code>Entry&#65292;</code>
+<code>Key</code></big>&#65289;&#35843;&#29992;&#26102;&#29983;&#25104;&#19968;&#20010;<big><code>Entry</code></big>&#20803;&#32032;&#65288;&#38544;&#21547;&#20851;
+&#32852;&#21040;<big><code>Key</code></big>&#65289;&#30340;&#24037;&#21378;&#31867;&#22411;&#12290;</div>
+
+
+
+<h2><a name="factory_tag_synopsis">Header
+</a><a href="../../../../boost/flyweight/factory_tag.hpp"><code>"boost/flyweight/factory_tag.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+
+
+<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/factory_tag.hpp"><code>"boost/flyweight/factory_tag.hpp"</code></a>&#22823;
+&#24847;</h2>
+
+
+
+<blockquote>
+
+
+ <pre><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span><br><br><span class="keyword">namespace</span> <span class="identifier">flyweights</span><span class="special">{</span><br><br><span class="keyword">struct</span> <span class="identifier">factory_marker</span><span class="special">;</span><br><br><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><br><span class="keyword">struct</span> <span class="identifier">is_factory</span><span class="special">;</span><br><br><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><br><span class="keyword">struct</span> <span class="identifier">factory</span><span class="special">;</span><br><br><span class="special">}</span> <span class="comment">// namespace boost::flyweights</span><br><span class="special">}</span> <span class="comment">// namespace boost</span> </pre>
+
+
+
+</blockquote>
+
+
+
+<h3><a name="is_factory">Class template <code>is_factory
+&nbsp;&#31867;&#27169;&#26495; is_factory</code></a></h3>
+
+
+
+<p>
+Unless specialized by the user, <code>is_factory&lt;T&gt;::type</code>
+is
+<a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a>
+if <code>T</code> is derived from <code>factory_marker</code>,
+and it is
+<a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::false_</code></a>
+otherwise.</p>
+
+
+
+<p>&#38500;&#38750;&#29992;&#25143;&#36827;&#34892;&#19987;&#38376;&#21270;&#65292;&#22914;&#26524;<big><code>T</code></big>&#26159;&#20174;<big><code>factory_marker</code></big>&#27966;
+&#29983;&#30340;&#65292;<big><code>is_factory&lt;T&gt;::type</code></big>&#26159;<big><a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a></big>&#65292; +&#21542;&#21017;&#26159;<big><a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::false_</code></a></big>&#12290;<a href="../../../mpl/doc/refmanual/bool.html"><code></code></a>
+</p>
+
+
+
+<h3><a name="factory_construct">Class template <code>factory
+&nbsp;&#31867;&#27169;&#26495; factory</code></a></h3>
+
+
+
+<p>
+<code>factory&lt;T&gt;</code> is a syntactic
+construct meant to indicate
+that <code>T</code> is a factory specifier without
+resorting to the
+mechanisms provided by the <code>is_factory</code> class
+template.</p>
+
+
+
+<p><big><code>factory&lt;T&gt;</code></big>&#26159;&#19968;&#31181;&#34920;&#26126;<code>T</code>&#26159;
+&#19968;&#20010;&#24037;&#21378;&#25551;&#36848;&#31526;&#30340;&#35821;&#27861;&#26500;&#36896;&#65292;&#36825;&#26679;&#23601;&#19981;&#38656;&#35201;&#20511;&#21161;&#20110;<big><code>is_factory</code></big>&#31867;&#27169;&#26495;&#25552;&#20379;&#30340;&#26426;&#21046;&#12290;
+</p>
+
+
+
+<h2><a name="hashed_factory_fwd_synopsis">Header
+</a><a href="../../../../boost/flyweight/hashed_factory_fwd.hpp"><code>"boost/flyweight/hashed_factory_fwd.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+
+
+<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/hashed_factory_fwd.hpp"><code>"boost/flyweight/hashed_factory_fwd.hpp"</code></a>&#22823;
+&#24847;</h2>
+
+
+
+<blockquote>
+
+
+ <pre><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span><br><br><span class="keyword">namespace</span> <span class="identifier">flyweights</span><span class="special">{</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Entry</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Hash</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Pred</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Allocator</span><span class="special">=</span><b>implementation defined</b><br><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">hashed_factory_class</span><span class="special">;</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Hash</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp;&nbsp;typename</span> <span class="identifier">Pred</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Allocator</span><span class="special">=</span><b>implementation defined</b><br><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">hashed_factory</span><span class="special">;</span><br><br><span class="special">}</span> <span class="comment">// namespace boost::flyweights</span><br><br><span class="special">}</span> <span class="comment">// namespace boost</span> </pre>
+
+
+
+</blockquote>
+
+
+
+<p>
+<code>hashed_factory_fwd.hpp</code> forward declares the
+class templates
+<a href="#hashed_factory_class"><code>hashed_factory_class</code></a>
+and <a href="#hashed_factory"><code>hashed_factory</code></a>.</p>
+
+
+
+<p><big><code>hashed_factory_fwd.hpp</code></big>&#21069;&#32622;&#22768;&#26126;&#20102;&#31867;&#27169;&#26495;<big><a href="factories.html#hashed_factory_class"><code>hashed_factory_class</code></a></big>&#21644;<big><a href="factories.html#hashed_factory"><code>hashed_factory</code></a></big>
+</p>
+
+
+
+<h2><a name="hashed_factory_synopsis">Header
+</a><a href="../../../../boost/flyweight/hashed_factory.hpp"><code>"boost/flyweight/hashed_factory.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+
+
+<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/hashed_factory.hpp"><code>"boost/flyweight/hashed_factory.hpp"</code></a>&#22823;
+&#24847;</h2>
+
+
+
+<h3><a name="hashed_factory_class">Class template <code>hashed_factory_class
+&nbsp;&#31867;&#27169;&#26495; hashed_factory_class</code></a></h3>
+
+
+
+<p>
+<code>hashed_factory_class</code> is a <a href="#factory"><code>Factory</code></a>
+implemented with a hashed container.</p>
+
+
+
+<p><big><code>hashed_factory_class</code></big>&#26159;&#19968;&#20010;&#29992;&#21704;&#35199;&#23481;&#22120;&#23454;&#29616;&#30340;<a href="#factory">&#24037;&#21378;</a>
 </p>

-<h2><a name="factory_tag_synopsis">Header
-<a href="../../../../boost/flyweight/factory_tag.hpp"><code>"boost/flyweight/factory_tag.hpp"</code></a> synopsis</a></h2>

-<blockquote><pre>
-<span class=keyword>namespace</span> <span class=identifier>boost</span><span class=special>{</span>

-<span class=keyword>namespace</span> <span class=identifier>flyweights</span><span class=special>{</span>
+<blockquote>
+
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Entry</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Hash</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Pred</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Allocator</span><br><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">hashed_factory_class</span><br><span class="special">{</span><br><span class="keyword">public</span><span class="special">:</span><br><span class="keyword">&nbsp; typedef</span> <b>implementation defined</b> <span class="identifier">handle_type</span><span class="special">;</span><br><br><span class="identifier">&nbsp; handle_type</span> <span class="identifier">insert</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Entry</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span><br><span class="keyword">&nbsp; void</span> <span class="identifier">erase</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="keyword">&nbsp; const</span> <span class="identifier">Entry</span><span class="special">&amp;</span> <span class="identifier">entry</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="special">};</span> </pre>
+
+
+
+</blockquote>
+
+
+
+<p>
+<code>Hash</code> is a
+<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default
+Constructible</code></a>
+<a href="http://www.sgi.com/tech/stl/UnaryFunction.html";><code>Unary
+Function</code></a>
+taking a single argument of type <code>Key</code> and
+returning a
+value of type <code>std::size_t</code> in the range
+<code>[0, std::numeric_limits&lt;std::size_t&gt;::max())</code>.
+<code>Pred</code> is a
+<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default +Constructible</code></a> <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html";>
+<code>Binary Predicate</code></a> inducing an
+equivalence relation
+on elements of <code>Key</code>. It is required that
+a <code>Hash</code> object return the same value for
+objects
+equivalent under <code>Pred</code>.
+The equivalence relation on <code>Key</code> associated to
+the factory is
+that induced by <code>Pred</code>.
+The default arguments for <code>Hash</code> and <code>Pred</code>
+are
+<a href="../../../functional/hash/index.html"><code>boost::hash&lt;Key&gt;</code></a>
+and <code>std::equal_to&lt;Key&gt;</code>,
+respectively. <code>Allocator</code> must be an allocator
+of <code>Entry</code> objects
+satisfying the associated C++ requirements at <b>[lib.allocator.requirements]</b>.
+The default argument is <code>std::allocator&lt;Entry&gt;</code>.
+The internal
+hashed container upon which <code>hashed_factory_class</code>
+is based is
+constructed with default initialized objects of type <code>Hash</code>,
+<code>Pred</code> and <code>Allocator</code>.</p>
+
+
+
+<p><big><code>Hash</code></big>&#26159;&#19968;&#20010;<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>&#21487; +&#40664;&#35748;&#26500;&#36896;</a>&#30340;<a href="http://www.sgi.com/tech/stl/UnaryFunction.html";>&#19968;&#20803;&#20989;&#25968;</a>&#65292;
+&#24102;&#19968;&#20010;<big><code>Key</code></big>&#31867;&#22411;&#30340;&#21442;&#25968;&#36820;&#22238;&#19968;&#20010;<big><code>[0,
+std::numeric_limits&lt;std::size_t&gt;::max())</code></big>&#33539;&#22260;&#30340;<big><code>std::size_t</code></big>&#31867;
+&#22411;&#30340;&#20540;&#12290;<big><code>Pred</code></big>&#26159;&#19968;&#20010;&#21487;&#40664;&#35748;&#26500;&#36896;&#30340;&#20108;&#20803;&#35859;&#35789;&#21028;&#26029;<big><code>Key</code></big>&#20803;
+&#32032;&#30340;&#30456;&#31561;&#20851;&#31995;&#12290;&#35201;&#27714;&#23545;&#20110;&#20351;&#29992;<big><code>Pred</code></big>&#21028;&#26029;&#30456;&#31561;&#30340;&#23545;&#35937;<big><code>Hash</code></big>&#23545;
+&#35937;&#36820;&#22238;&#30456;&#21516;&#30340;&#20540;&#12290;&#19982;&#24037;&#21378;&#30456;&#20851;&#30340;<big><code>Key</code></big>&#19978;&#30340;&#30456;&#31561;&#20851;&#31995;&#26159;&#30001;<big><code>Pred</code></big>&#24471;
+&#20986;&#12290;<big><code>Hash</code></big>&#21644;<big><code>Pred</code></big>&#30340;&#40664;&#35748;&#21442;&#25968;&#20998;&#21035;&#26159;<big><a href="../../../functional/hash/index.html"><code>boost::hash&lt;Key&gt;</code></a></big> +&#21644; <code><big>std::equal_to&lt;Key&gt;</big></code>&#12290;<big><code>Allocator</code></big>&#24517;
+&#39035;&#26159;&#28385;&#36275;<b>[lib.allocator.requirements]</b>&#37324;&#30340;&#30456;&#20851;C++&#35201;&#27714;&#30340;<big><code>Entry</code></big>&#23545;
+&#35937;&#30340;&#20998;&#37197;&#22120;&#12290;&#40664;&#35748;&#30340;&#21442;&#25968;&#26159;<big><code>std::allocator&lt;Entry&gt;</code><code></code></big>&#12290;<big><code>hashed_factory_class</code></big>&#22522;
+&#20110;&#30340;&#20869;&#37096;&#21704;&#35199;&#23481;&#22120;&#26159;&#29992;<big><code>Hash</code></big>&#65292;<big><code>Pred</code></big> &#21644;
+<big><code>Allocator</code></big>&#31867;&#22411;&#30340;&#40664;&#35748;&#21021;&#22987;&#21270;&#23545;&#35937;&#21019;&#24314;&#30340;&#12290;
+</p>
+
+
+
+<h3><a name="hashed_factory">Class template <code>hashed_factory
+&nbsp;&#31867;&#27169;&#26495; &nbsp;hashed_factory</code></a></h3>
+
+
+
+<p>
+<a href="#factory"><code>Factory Specifier</code></a>
+for <a href="#hashed_factory_class"><code>hashed_factory_class</code></a>.</p>
+
+
+
+<p><big><a href="factories.html#hashed_factory_class"><code>hashed_factory_class</code></a></big>&#30340;<a href="#factory">&#24037;&#21378;&#25551;&#36848;&#31526;</a>
+</p>

-<span class=keyword>struct</span> <span class=identifier>factory_marker</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> -<span class=keyword>struct</span> <span class=identifier>is_factory</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> -<span class=keyword>struct</span> <span class=identifier>factory</span><span class=special>;</span>
+<blockquote>
+
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Hash</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Pred</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Allocator</span><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">hashed_factory</span><span class="special">;</span> </pre>

-<span class=special>}</span> <span class=comment>// namespace boost::flyweights</span>

-<span class=special>}</span> <span class=comment>// namespace boost</span>
-</pre></blockquote>

-<h3><a name="is_factory">Class template <code>is_factory</code></a></h3>
+</blockquote>

-<p>
-Unless specialized by the user, <code>is_factory&lt;T&gt;::type</code> is
-<a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::true_</code></a>
-if <code>T</code> is derived from <code>factory_marker</code>, and it is
-<a href="../../../mpl/doc/refmanual/bool.html"><code>boost::mpl::false_</code></a>
-otherwise.
-</p>

-<h3><a name="factory_construct">Class template <code>factory</code></a></h3>

 <p>
-<code>factory&lt;T&gt;</code> is a syntactic construct meant to indicate
-that <code>T</code> is a factory specifier without resorting to the
-mechanisms provided by the <code>is_factory</code> class template.
+<code>hashed_factory&lt;Hash,Pred,Allocator&gt;</code>
+is an
+<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code>MPL
+Metafunction
+Class</code></a> such that the type</p>
+
+
+
+<p><big><code>hashed_factory&lt;Hash,Pred,Allocator&gt;</code></big>&#26159;
+&#19968;&#20010;<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code>MPL
+<big>&#20803;&#20989;&#25968;&#31867;</big></code></a>&#65292;&#20110;&#26159;&#31867;&#22411;
 </p>

-<h2><a name="hashed_factory_fwd_synopsis">Header
-<a href="../../../../boost/flyweight/hashed_factory_fwd.hpp"><code>"boost/flyweight/hashed_factory_fwd.hpp"</code></a> synopsis</a></h2>

-<blockquote><pre>
-<span class=keyword>namespace</span> <span class=identifier>boost</span><span class=special>{</span>

-<span class=keyword>namespace</span> <span class=identifier>flyweights</span><span class=special>{</span>
+<blockquote>
+
+
+ <pre><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">apply</span><span class="special">&lt;</span><br><span class="identifier"> hashed_factory</span><span class="special">&lt;</span><span class="identifier">Hash</span><span class="special">,</span><span class="identifier">Pred</span><span class="special">,</span><span class="identifier">Allocator</span><span class="special">&gt;,</span><br><span class="identifier"> Entry</span><span class="special">,</span><span class="identifier">Key</span><br><span class="special">&gt;::</span><span class="identifier">type</span> </pre>

-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Entry</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Key</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Hash</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Pred</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>=</span><b>implementation defined</b>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>hashed_factory_class</span><span class=special>;</span>

-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Hash</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Pred</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>=</span><b>implementation defined</b>
-<span class=special>&gt;</span>
-<span class=keyword>struct</span> <span class=identifier>hashed_factory</span><span class=special>;</span>

-<span class=special>}</span> <span class=comment>// namespace boost::flyweights</span>
+</blockquote>
+

-<span class=special>}</span> <span class=comment>// namespace boost</span>
-</pre></blockquote>

 <p>
-<code>hashed_factory_fwd.hpp</code> forward declares the class templates
-<a href="#hashed_factory_class"><code>hashed_factory_class</code></a>
-and <a href="#hashed_factory"><code>hashed_factory</code></a>.
-</p>
+is the same as</p>

-<h2><a name="hashed_factory_synopsis">Header
-<a href="../../../../boost/flyweight/hashed_factory.hpp"><code>"boost/flyweight/hashed_factory.hpp"</code></a> synopsis</a></h2>

-<h3><a name="hashed_factory_class">Class template <code>hashed_factory_class</code></a></h3>

-<p>
-<code>hashed_factory_class</code> is a <a href="#factory"><code>Factory</code></a>
-implemented with a hashed container.
+<p>&#31561;&#21516;&#20110;
 </p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Entry</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Key</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Hash</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Pred</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Allocator</span>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>hashed_factory_class</span>
-<span class=special>{</span>
-<span class=keyword>public</span><span class=special>:</span>
- <span class=keyword>typedef</span> <b>implementation defined</b> <span class=identifier>handle_type</span><span class=special>;</span>
-
- <span class=identifier>handle_type</span> <span class=identifier>insert</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>Entry</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span> - <span class=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span> - <span class=keyword>const</span> <span class=identifier>Entry</span><span class=special>&amp;</span> <span class=identifier>entry</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span>
-<span class=special>};</span>
-</pre></blockquote>

-<p>
-<code>Hash</code> is a
-<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default
-Constructible</code></a>
-<a href="http://www.sgi.com/tech/stl/UnaryFunction.html";><code>Unary Function</code></a>
-taking a single argument of type <code>Key</code> and returning a
-value of type <code>std::size_t</code> in the range
-<code>[0, std::numeric_limits&lt;std::size_t&gt;::max())</code>.
-<code>Pred</code> is a
-<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default
-Constructible</code></a>
-<a href="http://www.sgi.com/tech/stl/BinaryPredicate.html";>
-<code>Binary Predicate</code></a> inducing an equivalence relation
-on elements of <code>Key</code>. It is required that
-a <code>Hash</code> object return the same value for objects
-equivalent under <code>Pred</code>.
-The equivalence relation on <code>Key</code> associated to the factory is
-that induced by <code>Pred</code>.
-The default arguments for <code>Hash</code> and <code>Pred</code> are
-<a href="../../../functional/hash/index.html"><code>boost::hash&lt;Key&gt;</code></a>
-and <code>std::equal_to&lt;Key&gt;</code>, respectively.
-<code>Allocator</code> must be an allocator of <code>Entry</code> objects
-satisfying the associated C++ requirements at <b>[lib.allocator.requirements]</b>. -The default argument is <code>std::allocator&lt;Entry&gt;</code>. The internal
-hashed container upon which <code>hashed_factory_class</code> is based is
-constructed with default initialized objects of type <code>Hash</code>,
-<code>Pred</code> and <code>Allocator</code>.
-</p>

-<h3><a name="hashed_factory">Class template <code>hashed_factory</code></a></h3>
+<blockquote>
+
+
+ <pre><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">apply</span><span class="special">&lt;</span><br><span class="identifier"> hashed_factory_class</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_1</span><span class="special">,</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_2</span><span class="special">,</span><span class="identifier">Hash</span><span class="special">,</span><span class="identifier">Pred</span><span class="special">,</span><span class="identifier">Allocator</span><span class="special">&gt;,</span><br><span class="identifier"> Entry</span><span class="special">,</span><span class="identifier">Key</span><br><span class="special">&gt;::</span><span class="identifier">type</span> </pre>

-<p>
-<a href="#factory"><code>Factory Specifier</code></a> for <a href="#hashed_factory_class"><code>hashed_factory_class</code></a>.
-</p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Hash</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Pred</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>&gt;</span> -<span class=keyword>struct</span> <span class=identifier>hashed_factory</span><span class=special>;</span>
-</pre></blockquote>

-<p>
-<code>hashed_factory&lt;Hash,Pred,Allocator&gt;</code> is an
-<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code>MPL Metafunction
-Class</code></a> such that the type
-</p>
+</blockquote>
+

-<blockquote><pre>
-<span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>apply</span><span class=special>&lt;</span> - <span class=identifier>hashed_factory</span><span class=special>&lt;</span><span class=identifier>Hash</span><span class=special>,</span><span class=identifier>Pred</span><span class=special>,</span><span class=identifier>Allocator</span><span class=special>&gt;,</span> - <span class=identifier>Entry</span><span class=special>,</span><span class=identifier>Key</span>
-<span class=special>&gt;::</span><span class=identifier>type</span>
-</pre></blockquote>

 <p>
-is the same as
-</p>
+This implies that <code>Hash</code>, <code>Pred</code>
+and <code>Allocator</code>
+can be <a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
+Placeholder Expressions</code></a> resolving to the actual
+types used by
+<code>hashed_factory_class</code>.</p>

-<blockquote><pre>
-<span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>apply</span><span class=special>&lt;</span> - <span class=identifier>hashed_factory_class</span><span class=special>&lt;</span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>_1</span><span class=special>,</span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>_2</span><span class=special>,</span><span class=identifier>Hash</span><span class=special>,</span><span class=identifier>Pred</span><span class=special>,</span><span class=identifier>Allocator</span><span class=special>&gt;,</span> - <span class=identifier>Entry</span><span class=special>,</span><span class=identifier>Key</span>
-<span class=special>&gt;::</span><span class=identifier>type</span>
-</pre></blockquote>

-<p>
-This implies that <code>Hash</code>, <code>Pred</code> and <code>Allocator</code>
-can be
-<a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
-Placeholder Expressions</code></a> resolving to the actual types used by
-<code>hashed_factory_class</code>.
+
+<p>&#36825;&#26263;&#31034;&#30528;<big><code>Hash</code></big>, <big><code>Pred</code></big> +&#21644; <big><code>Allocator</code></big>&#21487;&#20197;&#26159;<a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
+<big>&#21344;&#20301;&#31526;&#34920;&#36798;&#24335;</big></code></a><code><big>&#65292;&#29983;
+&#25104;</big></code><big><code>hashed_factory_class</code></big><code><big>&#29992;
+&#21040;&#30340;&#23454;&#38469;&#31867;&#22411;</big></code>
 </p>

+
+
 <h2><a name="set_factory_fwd_synopsis">Header
-<a href="../../../../boost/flyweight/set_factory_fwd.hpp"><code>"boost/flyweight/set_factory_fwd.hpp"</code></a> synopsis</a></h2> +</a><a href="../../../../boost/flyweight/set_factory_fwd.hpp"><code>"boost/flyweight/set_factory_fwd.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+

-<blockquote><pre>
-<span class=keyword>namespace</span> <span class=identifier>boost</span><span class=special>{</span> +<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/set_factory_fwd.hpp"><code>"boost/flyweight/set_factory_fwd.hpp"</code></a>&#22823;
+&#24847;</h2>

-<span class=keyword>namespace</span> <span class=identifier>flyweights</span><span class=special>{</span>

-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Entry</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Key</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Compare</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>=</span><b>implementation defined</b>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>set_factory_class</span><span class=special>;</span>

-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Compare</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>=</span><b>implementation defined</b>
-<span class=special>&gt;</span>
-<span class=keyword>struct</span> <span class=identifier>set_factory</span><span class=special>;</span>
+<blockquote>
+
+
+ <pre><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span><br><br><span class="keyword">namespace</span> <span class="identifier">flyweights</span><span class="special">{</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Entry</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Compare</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Allocator</span><span class="special">=</span><b>implementation defined</b><br><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">set_factory_class</span><span class="special">;</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Compare</span><span class="special">=</span><b>implementation defined</b><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Allocator</span><span class="special">=</span><b>implementation defined</b><br><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">set_factory</span><span class="special">;</span><br><br><span class="special">}</span> <span class="comment">// namespace boost::flyweights</span><br><br><span class="special">}</span> <span class="comment">// namespace boost</span> </pre>
+
+
+
+</blockquote>

-<span class=special>}</span> <span class=comment>// namespace boost::flyweights</span>

-<span class=special>}</span> <span class=comment>// namespace boost</span>
-</pre></blockquote>

 <p>
-<code>set_factory_fwd.hpp</code> forward declares the class templates
+<code>set_factory_fwd.hpp</code> forward declares the class
+templates
 <a href="#set_factory_class"><code>set_factory_class</code></a>
-and <a href="#set_factory"><code>set_factory</code></a>.
+and <a href="#set_factory"><code>set_factory</code></a>.</p>
+
+
+
+<p><big><code>set_factory_fwd.hpp</code></big>&#21069;&#32622;&#22768;&#26126;&#20102;&#31867;&#27169;&#26495;<big><a href="factories.html#set_factory_class"><code>set_factory_class</code></a></big> +&#21644; <big><a href="factories.html#set_factory"><code>set_factory</code></a></big>
 </p>

+
+
 <h2><a name="set_factory_synopsis">Header
-<a href="../../../../boost/flyweight/set_factory.hpp"><code>"boost/flyweight/set_factory.hpp"</code></a> synopsis</a></h2> +</a><a href="../../../../boost/flyweight/set_factory.hpp"><code>"boost/flyweight/set_factory.hpp"</code></a>
+synopsis &nbsp;</h2>
+<h2>&#22836;&#25991;&#20214;<a href="../../../../boost/flyweight/set_factory.hpp"><code>"boost/flyweight/set_factory.hpp"</code></a>&#22823;&#24847;</h2>
+
+
+
+<h3><a name="set_factory_class">Class template <code>set_factory_class &nbsp;&#31867;&#27169;&#26495; set_factory_class</code></a></h3>
+

-<h3><a name="set_factory_class">Class template <code>set_factory_class</code></a></h3>

 <p>
<code>set_factory_class</code> is a <a href="#factory"><code>Factory</code></a>
-implemented on top of an orderded associative container.
+implemented on top of an orderded associative container.</p>
+
+
+
+<p><big><code>set_factory_class</code></big>&#26159;&#19968;&#20010;&#22522;&#20110;&#26377;&#24207;&#20851;&#32852;&#23481;&#22120;&#23454;&#29616;&#30340;<a href="#factory">&#24037;&#21378;</a>
 </p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>Entry</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Key</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Compare</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Allocator</span>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>set_factory_class</span>
-<span class=special>{</span>
-<span class=keyword>public</span><span class=special>:</span>
- <span class=keyword>typedef</span> <b>implementation defined</b> <span class=identifier>handle_type</span><span class=special>;</span>
-
- <span class=identifier>handle_type</span> <span class=identifier>insert</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>Entry</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span> - <span class=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span> - <span class=keyword>const</span> <span class=identifier>Entry</span><span class=special>&amp;</span> <span class=identifier>entry</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span>
-<span class=special>};</span>
-</pre></blockquote>
+
+
+<blockquote>
+
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Entry</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span><br><span class="keyword">&nbsp; typename</span> <span class="identifier">Compare</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Allocator</span><br><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">set_factory_class</span><br><span class="special">{</span><br><span class="keyword">public</span><span class="special">:</span><br><span class="keyword">&nbsp; typedef</span> <b>implementation defined</b> <span class="identifier">handle_type</span><span class="special">;</span><br><br><span class="identifier">&nbsp; handle_type</span> <span class="identifier">insert</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Entry</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span><br><span class="keyword">&nbsp; void</span> <span class="identifier">erase</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="keyword">&nbsp; const</span> <span class="identifier">Entry</span><span class="special">&amp;</span> <span class="identifier">entry</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="special">};</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
-<code>Compare</code> is a
-<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default +<code>Compare</code> is a <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";><code>Default
 Constructible</code></a>
-<a href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html";>
-<code>Strict Weak Ordering</code></a> on <code>Key</code>. Two <code>Key</code>s
-<code>x</code> and <code>y</code> are considered equivalent if
-<code>!c(x,y)&amp;&amp;!c(y,x)</code> for <code>c</code> of type <code>Compare</code>. -The default argument of <code>Compare</code> is <code>std::less&lt;Key&gt;</code>
-<code>Allocator</code> must be an allocator of <code>Entry</code> objects
-satisfying the associated C++ requirements at <b>[lib.allocator.requirements]</b>. -The default argument is <code>std::allocator&lt;Entry&gt;</code>. The internal
-container upon which <code>set_factory_class</code> is based is
+<a href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html";><code>Strict
+Weak Ordering</code></a> on <code>Key</code>.
+Two <code>Key</code>s
+<code>x</code> and <code>y</code> are
+considered equivalent if
+<code>!c(x,y)&amp;&amp;!c(y,x)</code> for <code>c</code>
+of type <code>Compare</code>.
+The default argument of <code>Compare</code> is <code>std::less&lt;Key&gt;</code>.
+<code>Allocator</code> must be an allocator of <code>Entry</code>
+objects
+satisfying the associated C++ requirements at <b>[lib.allocator.requirements]</b>.
+The default argument is <code>std::allocator&lt;Entry&gt;</code>.
+The internal
+container upon which <code>set_factory_class</code> is
+based is
 constructed with default initialized objects of type <code>Compare</code>
-and <code>Allocator</code>.
+and <code>Allocator</code>.</p>
+
+
+
+<p><big><code>Compare</code></big>&#26159;&#19968;&#20010;<a href="http://www.sgi.com/tech/stl/DefaultConstructible.html";>&#21487; +&#40664;&#35748;&#26500;&#36896;</a>&#32780;&#19988;&#22312;<big><code>Key</code></big>&#19978;<a href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html";>&#20005;&#26684;
+&#24369;&#24207;</a>&#30340;&#31867;&#22411;&#12290;&#22914;&#26524;&#23545;<big><code>Compare</code></big>&#31867;
+&#22411;&#30340;<big><code>c</code></big>&#31867;&#26469;&#35828;<big><code>!c(x,y)&amp;&amp;!c(y,
+x)</code></big>&#65292;2&#20010;<big><code>Key</code>s
+<code>x</code></big> &#21644;<big><code>y</code></big>&#34987;&#30475;&#20316;&#30456;&#31561;<code>&#12290;</code><big><code>Compare</code></big>&#30340;&#40664;&#35748;&#21442;&#25968;&#26159;<big><code>std::less&lt;Key&gt;</code></big>&#12290;<big><code>Allocator</code></big>&#24517;&#39035;&#26159;&#28385;&#36275;<b>[lib.allocator.requirements]</b>&#37324;
+&#30340;&#30456;&#20851;C++&#35201;&#27714;&#30340;<big><code>Entry</code></big>&#23545;&#35937;&#30340;&#20998;&#37197;&#22120;&#12290;&#40664;&#35748;&#30340;&#21442;&#25968;&#26159;<big><code>std::allocator&lt;Entry&gt;</code></big><code>&#12290;</code><code></code><code></code><big><code>set_factory_class</code></big>&#22522;
+&#20110;&#30340;&#20869;&#37096;&#23481;&#22120;&#26159;&#29992;<big><code>Compare</code></big> &#21644; <big><code>Allocator</code></big>&#31867;
+&#22411;&#30340;&#40664;&#35748;&#21021;&#22987;&#21270;&#23545;&#35937;&#21019;&#24314;&#30340;&#12290;<code></code>
 </p>

-<h3><a name="set_factory">Class template <code>set_factory</code></a></h3>
+
+
+<h3><a name="set_factory">Class template <code>set_factory
+&nbsp;&#31867;&#27169;&#26495; set_factory</code></a></h3>
+
+

 <p>
-<a href="#factory"><code>Factory Specifier</code></a> for <a href="#set_factory_class"><code>set_factory_class</code></a>.
+<a href="#factory"><code>Factory Specifier</code></a>
+for <a href="#set_factory_class"><code>set_factory_class</code></a>.</p>
+
+
+
+<p><big><a href="factories.html#set_factory_class"><code>set_factory_class</code></a></big>&#30340;<a href="#factory">&#24037;&#21378;&#25551;&#36848;&#31526;</a>
 </p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Compare</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Allocator</span><span class=special>&gt;</span> -<span class=keyword>struct</span> <span class=identifier>set_factory</span><span class=special>;</span>
-</pre></blockquote>
+
+
+<blockquote>
+
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Compare</span><span class="special">,</span><span class="keyword">typename</span> <span class="identifier">Allocator</span><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">set_factory</span><span class="special">;</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
-<code>set_factory&lt;Compare,Allocator&gt;</code> is an
-<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code>MPL Metafunction
-Class</code></a> such that the type
+<code>set_factory&lt;Compare,Allocator&gt;</code>
+is an
+<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code>MPL
+Metafunction
+Class</code></a> such that the type</p>
+
+
+
+<p><big><code>set_factory&lt;Compare,Allocator&gt;</code></big>&#26159;
+&#19968;&#20010;<a href="../../../mpl/doc/refmanual/metafunction-class.html"><code><big>MPL</big>
+<big>&#20803;&#20989;&#25968;&#31867;</big></code></a>&#65292;&#20110;&#26159;&#31867;&#22411;<br>
+
+
+
 </p>

-<blockquote><pre>
-<span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>apply</span><span class=special>&lt;</span> - <span class=identifier>set_factory</span><span class=special>&lt;</span><span class=identifier>Compare</span><span class=special>,</span><span class=identifier>Allocator</span><span class=special>&gt;,</span> - <span class=identifier>Entry</span><span class=special>,</span><span class=identifier>Key</span>
-<span class=special>&gt;::</span><span class=identifier>type</span>
-</pre></blockquote>
+
+
+<blockquote>
+
+
+ <pre><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">apply</span><span class="special">&lt;</span><br><span class="identifier"> set_factory</span><span class="special">&lt;</span><span class="identifier">Compare</span><span class="special">,</span><span class="identifier">Allocator</span><span class="special">&gt;,</span><br><span class="identifier"> Entry</span><span class="special">,</span><span class="identifier">Key</span><br><span class="special">&gt;::</span><span class="identifier">type</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
-is the same as
+is the same as</p>
+
+
+
+<p>&#31561;&#21516;&#20110;
 </p>

-<blockquote><pre>
-<span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>apply</span><span class=special>&lt;</span> - <span class=identifier>set_factory_class</span><span class=special>&lt;</span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>_1</span><span class=special>,</span><span class=identifier>boost</span><span class=special>::</span><span class=identifier>mpl</span><span class=special>::</span><span class=identifier>_2</span><span class=special>,</span><span class=identifier>Compare</span><span class=special>,</span><span class=identifier>Allocator</span><span class=special>&gt;,</span> - <span class=identifier>Entry</span><span class=special>,</span><span class=identifier>Key</span>
-<span class=special>&gt;::</span><span class=identifier>type</span>
-</pre></blockquote>
+
+
+<blockquote>
+
+
+ <pre><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">apply</span><span class="special">&lt;</span><br><span class="identifier"> set_factory_class</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_1</span><span class="special">,</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_2</span><span class="special">,</span><span class="identifier">Compare</span><span class="special">,</span><span class="identifier">Allocator</span><span class="special">&gt;,</span><br><span class="identifier"> Entry</span><span class="special">,</span><span class="identifier">Key</span><br><span class="special">&gt;::</span><span class="identifier">type</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
 This implies that <code>Compare</code> and <code>Allocator</code>
-can be
-<a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
-Placeholder Expressions</code></a> resolving to the actual types used by
-<code>set_factory_class</code>.
+can be <a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
+Placeholder Expressions</code></a> resolving to the actual
+types used by
+<code>set_factory_class</code>.</p>
+
+
+
+<p>&#36825;&#26263;&#31034;&#30528;<big><code>Compare</code></big> &#21644; <big><code>Allocator</code></big>&#21487; +&#20197;&#26159;<a href="../../../mpl/doc/refmanual/placeholder-expression.html"><code>MPL
+<big>&#21344;&#20301;&#31526;&#34920;&#36798;&#24335;</big></code></a><code><big>&#65292;</big></code><code><big>&#29983;</big></code><code><big>&#25104;</big></code><big><code>set_factory_class</code></big><code><big>&#29992;
+&#21040;&#30340;&#23454;&#38469;&#31867;&#22411;</big></code>
 </p>

+
+
 <h2><a name="assoc_container_factory_fwd_synopsis">Header
-<a href="../../../../boost/flyweight/assoc_container_factory_fwd.hpp"><code>"boost/flyweight/assoc_container_factory_fwd.hpp"</code></a> synopsis</a></h2> +</a><a href="../../../../boost/flyweight/assoc_container_factory_fwd.hpp"><code>"boost/flyweight/assoc_container_factory_fwd.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+

-<blockquote><pre>
-<span class=keyword>namespace</span> <span class=identifier>boost</span><span class=special>{</span> +<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/assoc_container_factory_fwd.hpp"><code>"boost/flyweight/assoc_container_factory_fwd.hpp"</code></a>&#22823;
+&#24847;</h2>

-<span class=keyword>namespace</span> <span class=identifier>flyweights</span><span class=special>{</span>

-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Container</span><span class=special>&gt;</span> -<span class=keyword>class</span> <span class=identifier>assoc_container_factory_class</span><span class=special>;</span>

-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>ContainerSpecifier</span><span class=special>&gt;</span> -<span class=keyword>struct</span> <span class=identifier>assoc_container_factory</span><span class=special>;</span>
+<blockquote>
+
+
+ <pre><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span><br><br><span class="keyword">namespace</span> <span class="identifier">flyweights</span><span class="special">{</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">assoc_container_factory_class</span><span class="special">;</span><br><br><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ContainerSpecifier</span><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">assoc_container_factory</span><span class="special">;</span><br><br><span class="special">}</span> <span class="comment">// namespace boost::flyweights</span><br><br><span class="special">}</span> <span class="comment">// namespace boost</span> </pre>
+
+
+
+</blockquote>

-<span class=special>}</span> <span class=comment>// namespace boost::flyweights</span>

-<span class=special>}</span> <span class=comment>// namespace boost</span>
-</pre></blockquote>

 <p>
-<code>assoc_container_factory_fwd.hpp</code> forward declares the class templates
+<code>assoc_container_factory_fwd.hpp</code> forward
+declares the class templates
<a href="#assoc_container_factory_class"><code>assoc_container_factory_class</code></a> -and <a href="#assoc_container_factory"><code>assoc_container_factory</code></a>. +and <a href="#assoc_container_factory"><code>assoc_container_factory</code></a>.</p>
+
+
+
+<p><big><code>assoc_container_factory_fwd.hpp</code></big>&#21069;&#32622;&#22768;&#26126;&#20102;&#31867;&#27169;
+&#26495;<big><a href="factories.html#assoc_container_factory_class"><code>assoc_container_factory_class</code></a></big> +&#21644; <big><a href="factories.html#assoc_container_factory"><code>assoc_container_factory</code></a></big>
 </p>

+
+
 <h2><a name="assoc_container_factory_synopsis">Header
-<a href="../../../../boost/flyweight/assoc_container_factory.hpp"><code>"boost/flyweight/assoc_container_factory.hpp"</code></a> synopsis</a></h2> +</a><a href="../../../../boost/flyweight/assoc_container_factory.hpp"><code>"boost/flyweight/assoc_container_factory.hpp"</code></a>
+synopsis &nbsp;</h2>
+
+
+
+<h2>&#22836;&#25991;&#20214;<a href="file:///boost/flyweight/assoc_container_factory.hpp"><code>"boost/flyweight/assoc_container_factory.hpp"</code></a>&#22823;
+&#24847;</h2>
+
+
+
+<h3><a name="assoc_container_factory_class">Class
+template <code>assoc_container_factory_class &nbsp;&#31867;&#27169;&#26495;
+&nbsp;assoc_container_factory_class</code></a></h3>
+

-<h3><a name="assoc_container_factory_class">Class template <code>assoc_container_factory_class</code></a></h3>

 <p>
-<code>assoc_container_factory_class</code> wraps a suitable associative container
-to provide a <a href="#factory"><code>Factory</code></a> interface.
+<code>assoc_container_factory_class</code> wraps a suitable
+associative container
+to provide a <a href="#factory"><code>Factory</code></a>
+interface.</p>
+
+
+
+<p><big><code>assoc_container_factory_class</code></big>&#21253;&#35013;&#20102;&#19968;&#20010;&#21512;&#36866;&#30340;&#20851;
+&#32852;&#23481;&#22120;&#29992;&#26469;&#25552;&#20379;<a href="#factory">&#24037;&#21378;</a>&#30340;&#30028;&#38754;
 </p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>Container</span><span class=special>&gt;</span> -<span class=keyword>class</span> <span class=identifier>assoc_container_factory_class</span>
-<span class=special>{</span>
-<span class=keyword>public</span><span class=special>:</span>
- <span class=keyword>typedef</span> <span class=keyword>typename</span> <span class=identifier>Container</span><span class=special>::</span><span class=identifier>iterator</span> <span class=identifier>handle_type</span><span class=special>;</span>
+
+
+<blockquote>

- <span class=identifier>handle_type</span> <span class=identifier>insert</span><span class=special>(</span><span class=keyword>const</span> <span class=keyword>typename</span> <span class=identifier>Container</span><span class=special>::</span><span class=identifier>value_type</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span> - <span class=keyword>void</span> <span class=identifier>erase</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span> - <span class=keyword>const</span> <span class=keyword>typename</span> <span class=identifier>Container</span><span class=special>::</span><span class=identifier>value_type</span><span class=special>&amp;</span> <span class=identifier>entry</span><span class=special>(</span><span class=identifier>handle_type</span> <span class=identifier>h</span><span class=special>);</span>
-<span class=special>};</span>
-</pre></blockquote>
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">&gt;</span><br><span class="keyword">class</span> <span class="identifier">assoc_container_factory_class</span><br><span class="special">{</span><br><span class="keyword">public</span><span class="special">:</span><br><span class="keyword">&nbsp; typedef</span> <span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">handle_type</span><span class="special">;</span><br><br><span class="identifier">&nbsp; handle_type</span> <span class="identifier">insert</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">x</span><span class="special">);</span><br><span class="keyword">&nbsp; void</span> <span class="identifier">erase</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="keyword">&nbsp; const</span> <span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">entry</span><span class="special">(</span><span class="identifier">handle_type</span> <span class="identifier">h</span><span class="special">);</span><br><span class="special">};</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
-<code>Container</code> must be an (ordered or unordered) associative container
-such that
+<code>Container</code> must be an (ordered or unordered)
+associative container
+such that &nbsp;<code>Container</code>&#24517;&#39035;&#26159;&#19968;&#20010;&#65288;&#26377;&#24207;&#30340;&#25110;&#32773;&#26080;&#24207;&#30340;&#65289;&#20851;&#32852;&#23481;
+&#22120;&#65292;&#35813;&#23481;&#22120;&#28385;&#36275;
+</p>
+
+
+
 <ol>
+
+
+
   <li><code>Container::key_type</code> is the same as
- <code>Container::value_type</code> (which is the entry type associated to
-    the factory).
-  </li>
+    <code>Container::value_type</code> (which is the entry
+type associated to the factory). </li>
+
+
+
+
+
+ <p><big><code>Container::key_type</code></big>&#31561;&#21516;&#20110;<big><code>Container::value_type</code></big>&#65288;&#23427;&#26159;&#30456;&#20851;&#24037;&#21378;&#30340;entry&#31867;&#22411;&#65289;</p>
+
+
+
   <li>Unique keys (rather than equivalent keys) are supported.</li>
-  <li><code>Container</code> is <i>stable</i>, i.e. its iterators are not
-    invalidated upon insert or erase operations.</li>
+
+
+
+
+
+ <p>&#25903;&#25345;&#21807;&#19968;&#30340;keys&#65288;&#32780;&#38750;&#30456;&#31561;&#30340;key&#65289;</p>
+
+
+
+  <li><code>Container</code> is <i>stable</i>,
+i.e. its iterators are not invalidated upon insert or erase operations.</li>
+
+
+
+
+
+ <p>&#23481;&#22120;&#26159;<span style="font-style: italic;">&#31283;&#23450;&#30340;</span>&#65292;&#23601;&#26159;&#35828;&#65292;&#25554;&#20837;&#21644;&#21024;&#38500;&#25805;&#20316;&#20043;&#21518;&#23427;&#30340;&#36845;&#20195;&#22120;&#20381;&#28982;&#26377;&#25928;<code></code><br>
+
+
+  </p>
+
+
+
 </ol>
+
+
+
+
The equivalence relation associated to <code>assoc_container_factory_class</code>
-is the one induced by <code>Container</code>. If equivalence of elements
-of <code>Container::value_type</code> is determined solely on the basis of a
-type <code>value_type'</code> to which <code>value_type</code> is
-implicitly convertible, then <code>assoc_container_factory_class</code> is
-a factory of entries of type <code>value_type</code> implicitly associated to
-<code>value_type'</code>. For example, the instantiation
-</p>
+is the one induced by <code>Container</code>. If
+equivalence of elements
+of <code>Container::value_type</code> is determined solely
+on the basis of a
+type <code>value_type'</code> to which <code>value_type</code>
+is
+implicitly convertible, then <code>assoc_container_factory_class</code>
+is
+a factory of entries of type <code>value_type</code>
+implicitly associated to
+<code>value_type'</code>. For example, the instantiation<br>
+
+
+<code></code><br>
+
+
+<big><code>assoc_container_factory_class</code></big>&#19978;&#30340;&#30456;&#31561;&#20851;&#31995;&#30001;<big><code>Container</code></big>&#23548;&#20986;&#12290;&#22914;&#26524;<big><code>Container::value_type</code></big>&#20803;&#32032;&#30340;&#30456;&#31561;&#20851;&#31995;&#23436;&#20840;&#30001;&#31867;&#22411;<big><code>value_type'</code></big>&#20915;&#23450;&#65292;&#32780;&#19988;<big><code>value_type</code></big>&#21487;&#20197;&#38544;&#24335;&#36716;&#25442;&#25104;<code><big>value_type'</big>&#65292;</code>&#37027;&#20040;<big><code>assoc_container_factory_class</code></big>&#26159;&#19968;&#20010;&#38544;&#24335;&#20851;&#32852;&#21040;<big><code>value_type'</code></big>&#30340;<big><code>value_type</code></big>&#31867;&#22411;&#20803;&#32032;&#30340;&#24037;&#21378;&#12290;&#20363;&#22914;&#65292;&#36825;&#20010;&#23454;&#20363;
+<blockquote>
+
+
+ <pre><span class="identifier">assoc_container_factory_class</span><span class="special">&lt;</span><br><span class="identifier">&nbsp; std</span><span class="special">::</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">derived</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special">&lt;</span><span class="identifier">base</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="comment">// derived inherits from base</span><br><span class="special">&gt;</span> </pre>
+
+
+
+</blockquote>
+

-<blockquote><pre>
-<span class=identifier>assoc_container_factory_class</span><span class=special>&lt;</span> - <span class=identifier>std</span><span class=special>::</span><span class=identifier>set</span><span class=special>&lt;</span><span class=identifier>derived</span><span class=special>,</span><span class=identifier>std</span><span class=special>::</span><span class=identifier>less</span><span class=special>&lt;</span><span class=identifier>base</span><span class=special>&gt;</span> <span class=special>&gt;</span> <span class=comment>// derived inherits from base</span>
-<span class=special>&gt;</span>
-</pre></blockquote>

 <p>
-is a factory of <code>derived</code> elements implicitly associated to
-<code>base</code>.
+is a factory of <code>derived</code> elements implicitly
+associated to
+<code>base</code>.</p>
+
+
+<p>&#26159;&#19968;&#20010;&#38544;&#24335;&#20851;&#32852;&#21040;<big><code>base</code></big>&#30340;<big><code>derived</code></big>&#20803;&#32032;&#30340;&#24037;&#21378;
 </p>

-<h3><a name="assoc_container_factory">Class template <code>assoc_container_factory</code></a></h3>
+
+
+<h3><a name="assoc_container_factory">Class template
+<code>assoc_container_factory &nbsp;&#31867;&#27169;&#26495; &nbsp;assoc_container_factory</code></a></h3>
+
+

 <p>
-<a href="#factory"><code>Factory Specifier</code></a> for <a href="#assoc_container_factory_class"><code>assoc_container_factory_class</code></a>.
+<a href="#factory"><code>Factory Specifier</code></a>
+for <a href="#assoc_container_factory_class"><code>assoc_container_factory_class</code></a>.</p>
+
+
+<p><big><a href="factories.html#assoc_container_factory_class"><code>assoc_container_factory_class</code></a></big>&#30340;<a href="#factory">&#24037;&#21378;&#25551;&#36848;&#31526;</a>
 </p>

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>ContainerSpecifier</span><span class=special>&gt;</span> -<span class=keyword>struct</span> <span class=identifier>assoc_container_factory</span><span class=special>;</span>
-</pre></blockquote>
+
+
+<blockquote>
+
+
+ <pre><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ContainerSpecifier</span><span class="special">&gt;</span><br><span class="keyword">struct</span> <span class="identifier">assoc_container_factory</span><span class="special">;</span> </pre>
+
+
+
+</blockquote>
+
+

 <p>
-<code>ContainerSpecifier</code> must be an
-<a href="../../../mpl/doc/refmanual/lambda-expression.html"><code>MPL Lambda +<code>ContainerSpecifier</code> must be an <a href="../../../mpl/doc/refmanual/lambda-expression.html"><code>MPL
+Lambda
 Expression</code></a> resolving, when invoked with (<code>Entry</code>,
-<code>Key</code>), to a type <code>Container</code> such that
-<code>assoc_container_factory_class&lt;Container&gt;</code> is a factory
-of <code>Entry</code> elements implicitly associated to <code>Key</code>.
+<code>Key</code>), to a type <code>Container</code>
+such that
+<code>assoc_container_factory_class&lt;Container&gt;</code>
+is a factory
+of <code>Entry</code> elements implicitly associated to <code>Key</code>.</p>
+
+
+<p><big><code>ContainerSpecifier</code></big>&#24517;&#39035;&#26159;&#19968;&#20010;<a href="../../../mpl/doc/refmanual/lambda-expression.html"><code><big>MPL +Lambda</big> <big>&#34920;&#36798;&#24335;</big></code></a>&#65292;&#24403;&#29992;&#65288;<big><code>Entry</code>&#65292;<code>Key</code></big>&#65289;&#35843;&#29992;&#26102;&#65292;&#29983;&#25104;&#19968;&#20010;<code><big>Container</big>&#65292;</code>&#28982;&#21518;<big><code>assoc_container_factory_class&lt;Container&gt;</code></big>&#26159;&#19968;&#20010;<code></code>&#38544;&#24335;&#20851;&#32852;&#21040;<big><code>Key</code></big>&#30340;<big><code>Entry</code></big>&#20803;&#32032;&#30340;&#24037;&#21378;&#65292;
 </p>

-<hr>

+
+<hr>
<div class="prev_link"><a href="tags.html"><img src="../prev.gif" alt="tags" border="0"><br>
+
+
+
 Tags
 </a></div>
+
+
+
<div class="up_link"><a href="index.html"><img src="../up.gif" alt="Boost.Flyweight reference" border="0"><br>
+
+
+
 Boost.Flyweight reference
 </a></div>
+
+
+
<div class="next_link"><a href="holders.html"><img src="../next.gif" alt="holders" border="0"><br>
+
+
+
 Holders
-</a></div><br clear="all" style="clear: all;">
+</a></div>
+
+
+
+<br style="" clear="all">
+
+

 <br>

+
+
 <p>Revised August 13th 2008</p>

-<p>&copy; Copyright 2006-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
-Distributed under the Boost Software
-License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
+
+
+<p>&copy; Copyright 2006-2008 Joaqu&iacute;n M
+L&oacute;pez Mu&ntilde;oz.
+Distributed under the Boost Software License, Version 1.0. (See
+accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>
 http://www.boost.org/LICENSE_1_0.txt</a>)
 </p>
+
+

 </body>
 </html>

Modified: trunk/libs/flyweight/doc/reference/flyweight.html
==============================================================================
--- trunk/libs/flyweight/doc/reference/flyweight.html   (original)
+++ trunk/libs/flyweight/doc/reference/flyweight.html Wed Apr 8 04:43:38 2009
@@ -1,630 +1,2306 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 Transitional//EN">
-
 <html>
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Flyweight Documentation - flyweight reference</title>
-<link rel="stylesheet" href="../style.css" type="text/css">
-<link rel="start" href="../index.html">
-<link rel="prev" href="index.html">
-<link rel="up" href="index.html">
-<link rel="next" href="key_value.html">
+
+
+
+
+
+
+
+
+
+
+
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <title>Boost.Flyweight Documentation - flyweight reference</title>
+  <link rel="stylesheet" href="../style.css" type="text/css">
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="start" href="../index.html">
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="prev" href="index.html">
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="up" href="index.html">
+
+
+
+
+
+
+
+
+
+
+
+  <link rel="next" href="key_value.html">
 </head>

+
 <body>
-<h1><img src="../../../../boost.png" alt="Boost logo" align=
-"middle" width="277" height="86">Boost.Flyweight
+
+
+
+
+
+
+<h1><img src="../../../../boost.png" alt="Boost logo" align="middle" height="86" width="277">Boost.Flyweight
 <code>flyweight</code> reference</h1>

+
+
+
+
+
+
<div class="prev_link"><a href="index.html"><img src="../prev.gif" alt="Boost.Flyweight reference" border="0"><br>
+
+
+
+
+
+
 Boost.Flyweight reference
 </a></div>
+
+
+
+
+
+
<div class="up_link"><a href="index.html"><img src="../up.gif" alt="Boost.Flyweight reference" border="0"><br>
+
+
+
+
+
+
 Boost.Flyweight reference
 </a></div>
+
+
+
+
+
+
<div class="next_link"><a href="key_value.html"><img src="../next.gif" alt="key-value flyweights" border="0"><br>
+
+
+
+
+
+
 Key-value flyweights
-</a></div><br clear="all" style="clear: all;">
+</a></div>
+
+
+
+
+
+<br style="" clear="all">
+
+
+
+
+
+

 <hr>

-<h2>Contents</h2>
+<h2>Contents &nbsp;&#30446;&#24405;</h2>
+
+
+
+
+
+

 <ul>
+
+
+
+
+
+
   <li><a href="#flyweight_fwd_synopsis">Header
-    <code>"boost/flyweight/flyweight_fwd.hpp"</code> synopsis</a></li>
+ <code>"boost/flyweight/flyweight_fwd.hpp"</code> synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/flyweight_fwd.hpp"&#22823;&#24847;</a></li>
+
+
+
+
+
+
   <li><a href="#synopsis">Header
-    <code>"boost/flyweight/flyweight.hpp"</code> synopsis</a>
+ <code>"boost/flyweight/flyweight.hpp"</code> synopsis &nbsp;&#22836;&#25991;&#20214;"boost/flyweight/flyweight.hpp"&#22823;&#24847;</a>
+
+
+
+
+
+
     <ul>
-      <li><a href="#flyweight">Class template <code>flyweight</code></a>
+
+
+
+
+
+
+ <li><a href="#flyweight">Class template <code>flyweight &nbsp;flyweight&#31867;&#27169;&#26495;</code></a>
+
+
+
+
+
+
         <ul>
-          <li><a href="#instantiation_types">Instantiation types</a></li>
-          <li><a href="#static_init">Static data initialization</a></li>
- <li><a href="#constructors">Constructors, copy and assignment</a></li> - <li><a href="#convertibility">Convertibility to the underlying types</a></li>
-          <li><a href="#modifiers">Modifiers</a></li>
-          <li><a href="#comparison">Comparison operators</a></li>
-          <li><a href="#specialized">Specialized algorithms</a></li>
-          <li><a href="#config_macros">Configuration macros</a></li>
-        </ul>
-      </li>
-    </ul>
-  </li>
-</ul>

-<h2>
-<a name="flyweight_fwd_synopsis">Header
-<a href="../../../../boost/flyweight/flyweight_fwd.hpp"><code>"boost/flyweight/flyweight_fwd.hpp"</code></a>
-synopsis</a>
-</h2>

-<blockquote><pre>
-<span class=keyword>namespace</span> <span class=identifier>boost</span><span class=special>{</span>
-
-<span class=keyword>namespace</span> <span class=identifier>flyweights</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>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg1</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg2</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg3</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg4</span><span class=special>=</span><b>implementation defined</b><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg5</span><span class=special>=</span><b>implementation defined</b>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>flyweight</span><span class=special>;</span>
-
-<span class=comment>// comparison:
-
-// <b>OP</b> is any of ==,&lt;,!=,&gt;,&gt;=,&lt;=</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>T1</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg11</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg15</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>T2</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg21</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg25</span>
-<span class=special>&gt;</span>
-<span class=keyword>bool</span> <span class=keyword>operator</span> <span class=identifier><b><i>OP</i></b></span><span class=special>(</span> - <span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T1</span><span class=special>,</span><span class=identifier>Arg11</span><span class=special>,...,</span><span class=identifier>Arg15</span><span class=special>&gt;&amp;</span> <span class=identifier>x</span><span class=special>,</span> - <span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T2</span><span class=special>,</span><span class=identifier>Arg21</span><span class=special>,...,</span><span class=identifier>Arg25</span><span class=special>&gt;&amp;</span> <span class=identifier>y</span><span class=special>);</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>T1</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg11</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg15</span><span class=special>,</span>
-  <span class=keyword>typename</span> <span class=identifier>T2</span>
-<span class=special>&gt;</span>
-<span class=keyword>bool</span> <span class=keyword>operator</span> <span class=identifier><b><i>OP</i></b></span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T1</span><span class=special>,</span><span class=identifier>Arg11</span><span class=special>,...,</span><span class=identifier>Arg15</span><span class=special>&gt;&amp;</span> <span class=identifier>x</span><span class=special>,</span><span class=keyword>const</span> <span class=identifier>T2</span><span class=special>&amp;</span> <span class=identifier>y</span><span class=special>);</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>T1</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>T2</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg21</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg25</span>
-<span class=special>&gt;</span>
-<span class=keyword>bool</span> <span class=keyword>operator</span> <span class=identifier><b><i>OP</i></b></span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>T1</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>,</span><span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T2</span><span class=special>,</span><span class=identifier>Arg21</span><span class=special>,...,</span><span class=identifier>Arg25</span><span class=special>&gt;&amp;</span> <span class=identifier>y</span><span class=special>);</span>
-
-<span class=comment>// specialized algorithms:</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg1</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg5</span><span class=special>&gt;</span> -<span class=keyword>inline</span> <span class=keyword>void</span> <span class=identifier>swap</span><span class=special>(</span> - <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T</span><span class=special>,</span><span class=identifier>Arg1</span><span class=special>,...,</span><span class=identifier>Arg5</span><span class=special>&gt;&amp;</span> <span class=identifier>x</span><span class=special>,</span><span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T</span><span class=special>,</span><span class=identifier>Arg1</span><span class=special>,...,</span><span class=identifier>Arg5</span><span class=special>&gt;&amp;</span> <span class=identifier>y</span><span class=special>);</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>ElemType</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Traits</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg1</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg5</span>
-<span class=special>&gt;</span>
-<span class=keyword>inline</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>basic_ostream</span><span class=special>&lt;</span><span class=identifier>ElemType</span><span class=special>,</span><span class=identifier>Traits</span><span class=special>&gt;&amp;</span> <span class=keyword>operator</span><span class=special>&lt;&lt;(</span> - <span class=identifier>std</span><span class=special>::</span><span class=identifier>basic_ostream</span><span class=special>&lt;</span><span class=identifier>ElemType</span><span class=special>,</span><span class=identifier>Traits</span><span class=special>&gt;&amp;</span> <span class=identifier>out</span><span class=special>,</span> - <span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T</span><span class=special>,</span><span class=identifier>Arg1</span><span class=special>,...,</span><span class=identifier>Arg5</span><span class=special>&gt;&amp;</span> <span class=identifier>x</span><span class=special>);</span>
-
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>ElemType</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Traits</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg1</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Arg5</span>
-<span class=special>&gt;</span>
-<span class=keyword>inline</span> <span class=identifier>std</span><span class=special>::</span><span class=identifier>basic_ostream</span><span class=special>&lt;</span><span class=identifier>ElemType</span><span class=special>,</span><span class=identifier>Traits</span><span class=special>&gt;&amp;</span> <span class=keyword>operator</span><span class=special>&gt;&gt;(</span> - <span class=identifier>std</span><span class=special>::</span><span class=identifier>basic_istream</span><span class=special>&lt;</span><span class=identifier>ElemType</span><span class=special>,</span><span class=identifier>Traits</span><span class=special>&gt;&amp;</span> <span class=identifier>in</span><span class=special>,</span> - <span class=identifier>flyweight</span><span class=special>&lt;</span><span class=identifier>T</span><span class=special>,</span><span class=identifier>Arg1</span><span class=special>,...,</span><span class=identifier>Arg5</span><span class=special>&gt;&amp;</span> <span class=identifier>x</span><span class=special>);</span>

-<span class=special>}</span> <span class=comment>// namespace boost::flyweights</span>

-<span class=keyword>using</span> <span class=identifier>flyweights</span><span class=special>::</span><span class=identifier>flyweight</span><span class=special>;</span>

-<span class=special>}</span> <span class=comment>// namespace boost</span>
-</pre></blockquote>
+ <li><a href="#instantiation_types">Instantiation types &nbsp;&#23454;&#20363;&#31867;&#22411;&nbsp;</a></li>

-<p>
-<code>flyweight_fwd.hpp</code> forward declares the class template
-<a href="#flyweight"><code>flyweight</code></a> and its associated global functions.
-</p>

-<h2>
-<a name="synopsis">Header
-<a href="../../../../boost/flyweight/flyweight.hpp"><code>"boost/flyweight/flyweight.hpp"</code></a>
-synopsis</a>
-</h2>

-<h3><a name="flyweight">
-Class template <code>flyweight</code>
-</a></h3>

-<p>
-Objects of type <code>flyweight&lt;...&gt;</code> provide access to immutable -values of type <code>flyweight&lt;...&gt;::value_type</code>, with the following advantages over using
-plain <code>value_type</code> objects:
-<ul>
-  <li>Flyweight objects with equivalent value share the same representation
-    (the associated <code>value_type</code> object).
-  </li>
- <li>The size of flyweights is typically that of a pointer, which is in general
-    smaller than <code>sizeof(value_type)</code>.
-  </li>
-</ul>

-So, if the level of redundancy (ratio of total objects to different values)
-is high enough, substituting a suitable instantiation of <code>flyweight</code>
-for <code>value_type</code> results in a reduction in memory usage.
-</p>

-<p>
-<code>flyweight</code> is parameterized according to some aspects:
-<ul>
-  <li>Types <code>key_value</code> and <code>value_type</code>
-    (possibly equal), where <code>key_type</code> serves as a
-    key type to lookup and construct internal shared instances of
-    objects of <code>value_type</code>.
-  </li>
- <li>An optional <a href="tags.html#tag">tag</a> type meant to syntactically
-     differentiate between otherwise identical instantiations.
-  </li>
-  <li>The <a href="factories.html#factory">factory class</a> used to store
-    and retrieve the shared value objects.
-  </li>
-  <li>The type of <a href="holders.html#holder">holder</a> used to
-    instantiate the flyweight factory and a mutex object, both of
-    which are unique to each specialization of the <code>flyweight</code>
-    class template.
-  </li>
-  <li>A <a href="locking.html#locking">locking policy</a> determining
-    the synchronization mechanisms for internal access to shared resources.
-  </li>
-  <li>A <a href="tracking.html#tracking">tracking policy</a> which controls
-   how values are treated when all their associated flyweight objects are
-   destroyed.
-  </li>
-</ul>
-These aspects impact the internal structure and behavior
-of the <code>flyweight</code> instantiation in the following manner:
-<ul>
-  <li>Each instantation of <code>flyweight</code> internally owns
-    a unique factory object and a unique synchronization
-    <a href="locking.html#preliminary">mutex</a> object, both of which
-    are created through the use of an associated holder type.
-  </li>
-  <li>The flyweight factory stores elements of an undisclosed type
-    <code>Entry</code> that is implicitly convertible to
-    <code>const key_type&amp;</code> and also stores a subobject of
-    <code>value_type</code>. Every flyweight object is associated
-    to a <code>value_type</code> subobject of some <code>Entry</code>
-    stored in the factory.
-  </li>
-  <li>The associated mutex object is used to protect all invocations
-    to the insertion and deletion functions of the internal flyweight
-    factory.
-  </li>
-  <li>Each flyweight object internally stores a value of some
-    undisclosed type <code>Handle</code>. <code>Handle</code> and
-    the <code>Entry</code> type referred to above are obtained
-    from invocations to the associated tracking policy, in the
-    manner described for this concept.
-  </li>
-</ul>
-In what follows, we implicitly assume that <code>key_type</code> equivalence
-refers to the equivalence relationship induced by the factory class used.
-Also, two values of <code>value_type</code> are considered equivalent
-if they are constructed from equivalent keys, or are copies of
-objects constructed from equivalent keys.
-</p>
+ <li><a href="#static_init">Static data initialization &nbsp;&#38745;&#24577;&#25968;&#25454;&#21021;&#22987;&#21270;</a></li>
+
+
+
+
+
+
+ <li><a href="#constructors">Constructors, copy and assignment &nbsp;&#26500;&#36896;&#65292;&#25335;&#36125;&#21644;&#36171;&#20540;</a></li>
+
+
+
+
+
+
+ <li><a href="#convertibility">Convertibility to the underlying types &nbsp;&#36716;&#25442;&#21040;&#24213;&#23618;&#31867;&#22411;</a></li>
+
+
+
+
+
+
+ <li><a href="#modifiers">Modifiers &nbsp;&#20462;&#25913;&#22120;</a></li>
+
+
+
+
+
+
+ <li><a href="#comparison">Comparison operators &nbsp;&#27604;&#36739;&#25805;&#20316;&#31526;</a></li>
+
+
+
+
+
+
+ <li><a href="#specialized">Specialized algorithms &nbsp;&#19987;&#38376;&#21270;&#30340;&#31639;&#27861;</a></li>
+
+
+
+
+
+
+ <li><a href="#config_macros">Configuration macros &nbsp;&#37197;&#32622;&#23439;</a></li>
+
+
+
+
+
+
+
+
+
+
+
+
+        </ul>
+
+
+
+
+
+
+      </li>
+
+
+
+
+
+
+
+
+
+
+
+
+    </ul>
+
+
+
+
+
+
+  </li>
+
+

-<blockquote><pre>
-<span class=keyword>template</span><span class=special>&lt;</span>
- <span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span> - <span class=keyword>typename</span> <span class=identifier>Arg1</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg2</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg3</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg4</span><span class=special>,</span><span class=keyword>typename</span> <span class=identifier>Arg5</span>
-<span class=special>&gt;</span>
-<span class=keyword>class</span> <span class=identifier>flyweight</span>
-<span class=special>{</span>
-<span class=keyword>public</span><span class=special>:</span>
- <span class=keyword>typedef</span> <span class=identifier><b>dependent on T</b></span> <span class=identifier>key_type</span><span class=special>;</span> - <span class=keyword>typedef</span> <span class=identifier><b>dependent on T</b></span> <span class=identifier>value_type</span><span class=special>;</span>
-
-  <span class=comment>// static data initialization:</span>
-
- <span class=keyword>static</span> <span class=keyword>bool</span> <span class=identifier>init</span><span class=special>();</span> - <span class=keyword>class</span> <span class=identifier>initializer</span><span class=special>{</span><span class=keyword>public</span><span class=special>:</span><span class=identifier>initializer</span><span class=special>();</span><span class=special>};</span>
-
-  <span class=comment>// construct/copy/destroy:</span>
-
-  <span class=identifier>flyweight</span><span class=special>();</span>
- <span class=identifier>flyweight</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>flyweight</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span> - <span class=identifier>flyweight</span><span class=special>(</span><span class=identifier>flyweight</span><span class=special>&amp;</span> <span class=identifier>x</span><span class=special>);</span>
-
-  <span class=comment>// forwarding constructors:
-  // n is implementation defined. All combinations of constant
-  // and non constant reference arguments are provided.</span>
-
- <span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T0</span><span class=special>&gt;</span> - <span class=keyword>explicit</span> <span class=identifier>flyweight</span><span class=special>([</span><span class=keyword>const</span><span

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

Other related posts:

  • » [boost-doc-zh commit] r237 - no log message - codesite-noreply