Boost logo

Boost-Commit :

From: oryol_at_[hidden]
Date: 2007-09-15 12:24:03


Author: jeremypack
Date: 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
New Revision: 39300
URL: http://svn.boost.org/trac/boost/changeset/39300

Log:
Documentation work for new API

Text files modified:
   sandbox/libs/extension/doc/Jamfile.v2 | 4
   sandbox/libs/extension/doc/appendices.qbk | 1
   sandbox/libs/extension/doc/appendix_b.qbk | 26 +--
   sandbox/libs/extension/doc/extension.qbk | 3
   sandbox/libs/extension/doc/factories.qbk | 21 ++
   sandbox/libs/extension/doc/html/HTML.manifest | 1
   sandbox/libs/extension/doc/html/boost_extension/appendices.html | 16 +-
   sandbox/libs/extension/doc/html/boost_extension/appendices/appendix_a.html | 18 +-
   sandbox/libs/extension/doc/html/boost_extension/factories.html | 46 ++++++
   sandbox/libs/extension/doc/html/boost_extension/info.html | 145 ++++++++++++---------
   sandbox/libs/extension/doc/html/boost_extension/introduction.html | 27 +--
   sandbox/libs/extension/doc/html/boost_extension/performance_analysis.html | 21 +-
   sandbox/libs/extension/doc/html/boost_extension/shared_libraries.html | 81 +++++++++++
   sandbox/libs/extension/doc/html/boost_extension/tutorials.html | 6
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial01.html | 111 ++++++++-------
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial02.html | 65 ++++----
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial03.html | 93 +++++++-----
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial04.html | 132 +++++++++++--------
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial05.html | 268 ++++++++++++++++++++++++---------------
   sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial06.html | 6
   sandbox/libs/extension/doc/html/index.html | 15 +-
   sandbox/libs/extension/doc/info.qbk | 86 ++++++++----
   sandbox/libs/extension/doc/introduction.qbk | 20 +-
   sandbox/libs/extension/doc/shared_libraries.qbk | 45 ++++++
   sandbox/libs/extension/doc/tutorial1.qbk | 56 +++++--
   sandbox/libs/extension/doc/tutorial2.qbk | 47 +++---
   sandbox/libs/extension/doc/tutorial3.qbk | 72 ++++++---
   sandbox/libs/extension/doc/tutorial4.qbk | 114 ++++++++++------
   sandbox/libs/extension/doc/tutorial5.qbk | 208 ++++++++++++++++++++-----------
   sandbox/libs/extension/doc/tutorials.qbk | 11
   sandbox/libs/extension/examples/info/im/network_parameters.hpp | 10 +
   sandbox/libs/extension/examples/info/im/plugins.cpp | 8 -
   sandbox/libs/extension/examples/info/im/protocol.hpp | 2
   sandbox/libs/extension/examples/info/multilanguage_main.cpp | 4
   34 files changed, 1104 insertions(+), 685 deletions(-)

Modified: sandbox/libs/extension/doc/Jamfile.v2
==============================================================================
--- sandbox/libs/extension/doc/Jamfile.v2 (original)
+++ sandbox/libs/extension/doc/Jamfile.v2 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -23,5 +23,5 @@
 
     ;
 
-install html : ../../../doc/html/boostbook.css ;
-install ../ : ../../../boost.png ;
+install html : $(BOOST_ROOT)/doc/html/boostbook.css ;
+install ../ : $(BOOST_ROOT)/boost.png ;

Modified: sandbox/libs/extension/doc/appendices.qbk
==============================================================================
--- sandbox/libs/extension/doc/appendices.qbk (original)
+++ sandbox/libs/extension/doc/appendices.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -8,4 +8,5 @@
 [section:appendices Appendices]
 [include appendix_a.qbk]
 [include appendix_b.qbk]
+[include appendix_c.qbk]
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/appendix_b.qbk
==============================================================================
--- sandbox/libs/extension/doc/appendix_b.qbk (original)
+++ sandbox/libs/extension/doc/appendix_b.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -7,19 +7,17 @@
 
 [section:appendix_b Appendix B - Optional Dependencies]
 
-As suggested by Boost guidelines and our thoughts, we tried to keep the number of dependencies of Boost.Extension
-at the minimum. But we also wanted to take advantage of several boost libraries that have additional features
-and are easy to use.
-
-Then, we give the option to the user. Currently we have two different flags that change the implementation
-of the library:
-
-# BOOST_EXTENSION_USE_PP: enables the use of Boost.Preprocessor to implement some repetitive code.
-
-# BOOST_EXTENSION_USE_BOOST_FUNCTION: enables the use of Boost.Function to implement the functors pointing
-to the plugin implementations.
-
-You should define the variables at your convenience with any value to enable the use of each library.
-
+As suggested by Boost guidelines and our thoughts, we tried to keep the number
+of dependencies of Boost.Extension at the minimum. But we also wanted to take
+advantage of several boost libraries that have additional features and are easy
+to use.
+
+For basic use of the library, currently only Boost.Preprocessor is required.
+There are certain convenience headers that rely on other libraries, such
+as Boost.Filesystem.
+
+Also, the `shared_library` class has been designed to be easy to use with
+Boost.Function. It returns function pointers that can be loaded directly
+into Boost.Function objects.
 
 [endsect]

Modified: sandbox/libs/extension/doc/extension.qbk
==============================================================================
--- sandbox/libs/extension/doc/extension.qbk (original)
+++ sandbox/libs/extension/doc/extension.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -16,7 +16,7 @@
         [@http://www.boost.org/LICENSE_1_0.txt http://www.boost.org/LICENSE_1_0.txt])
     ]
     [category Programming Interfaces]
- [last-revision $Date: 2007/4/30 12:00:00 $]
+ [last-revision $Date: 2007/9/15 9:05:00 $]
 ]
 
 
@@ -31,4 +31,3 @@
 [include info.qbk]
 [include performance_analysis.qbk]
 [include appendices.qbk]
-

Modified: sandbox/libs/extension/doc/factories.qbk
==============================================================================
--- sandbox/libs/extension/doc/factories.qbk (original)
+++ sandbox/libs/extension/doc/factories.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -7,7 +7,24 @@
 
 [section:factories Factories]
 
-Factories are generated automatically. In the future, this section will contain
-more information about methods.
+In normal usage, a `factory` is initialized in a shared library, then returned
+to an application with a reference to a function that can be used to create
+the given implementation of the `factory` interface.
 
+A factory has the following template options:
+
+`factory<class T, ARGS>`
+
+Where `T` is the interface that it returns, and `ARGS` is a variable length
+list of the argument types to the factory function. The maximum possible
+length of the arglist is set by `BOOST_EXTENSION_MAX_FUNCTOR_PARAMS`, which
+defaults to six.
+
+The functions available in `factory` are:
+[h3 void set<D>()]
+The `set` function takes a template argument describing the class that will
+be created by this factory, and that implements the `T` interface. This
+function may be called multiple times, to change the factory function.
+[h3 bool is_valid()]
+If set has been called, this returns true. Otherwise, it returns false.
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/html/HTML.manifest
==============================================================================
--- sandbox/libs/extension/doc/html/HTML.manifest (original)
+++ sandbox/libs/extension/doc/html/HTML.manifest 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -14,3 +14,4 @@
 boost_extension/appendices.html
 boost_extension/appendices/appendix_a.html
 boost_extension/appendices/appendix_b.html
+boost_extension/appendices/appendix_c.html

Modified: sandbox/libs/extension/doc/html/boost_extension/appendices.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/appendices.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/appendices.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,12 +3,11 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Appendices</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="performance_analysis.html" title=" Performance Analysis">
-<link rel="next" href="appendices/appendix_a.html" title=" Appendix A -
- Windows Export and Import Declarations">
+<link rel="next" href="appendices/appendix_a.html" title=" Appendix A - Windows Export and Import Declarations">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -25,15 +24,14 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.appendices"></a> Appendices</h2></div></div></div>
+<a name="boost_extension.appendices"></a> Appendices</h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="appendices/appendix_a.html"> Appendix A -
- Windows Export and Import Declarations</a></span></dt>
-<dt><span class="section"><a href="appendices/appendix_b.html"> Appendix B -
- Optional Dependencies</a></span></dt>
+<dt><span class="section"> Appendix A - Windows Export and Import Declarations</span></dt>
+<dt><span class="section"> Appendix B - Optional Dependencies</span></dt>
+<dt><span class="section"> Appendix C - OS X Shared Libraries</span></dt>
 </dl></div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/appendices/appendix_a.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/appendices/appendix_a.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/appendices/appendix_a.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -1,15 +1,13 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Appendix A -
- Windows Export and Import Declarations</title>
+<title> Appendix A - Windows Export and Import Declarations</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../appendices.html" title=" Appendices">
 <link rel="prev" href="../appendices.html" title=" Appendices">
-<link rel="next" href="appendix_b.html" title=" Appendix B -
- Optional Dependencies">
+<link rel="next" href="appendix_b.html" title=" Appendix B - Optional Dependencies">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -26,9 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.appendices.appendix_a"></a><a href="appendix_a.html" title=" Appendix A -
- Windows Export and Import Declarations"> Appendix A -
- Windows Export and Import Declarations</a></h3></div></div></div>
+<a name="boost_extension.appendices.appendix_a"></a> Appendix A - Windows Export and Import Declarations</h3></div></div></div>
 <p>
         On the Windows platform, special export declarations are required to make
         functions or classes in a .dll file accessible to the outside world. For
@@ -45,8 +41,8 @@
         how this is done.
       </p>
 <a name="boost_extension.appendices.appendix_a.warning"></a><h3>
-<a name="id2579210"></a>
- Warning
+<a name="id937980"></a>
+ Warning
       </h3>
 <p>
         Now for a word of warning that many of you will ignore: In the great majority
@@ -68,7 +64,7 @@
         </li>
 </ul></div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/factories.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/factories.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/factories.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Factories</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="tutorials/tutorial06.html" title=" Tutorial 6">
@@ -24,13 +24,49 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.factories"></a> Factories</h2></div></div></div>
+<a name="boost_extension.factories"></a> Factories</h2></div></div></div>
 <p>
- Factories are generated automatically. In the future, this section will contain
- more information about methods.
+ In normal usage, a <code class="computeroutput"><span class="identifier">factory</span></code>
+ is initialized in a shared library, then returned to an application with a
+ reference to a function that can be used to create the given implementation
+ of the <code class="computeroutput"><span class="identifier">factory</span></code> interface.
+ </p>
+<p>
+ A factory has the following template options:
+ </p>
+<p>
+ <code class="computeroutput"><span class="identifier">factory</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">ARGS</span><span class="special">&gt;</span></code>
+ </p>
+<p>
+ Where <code class="computeroutput"><span class="identifier">T</span></code> is the interface that
+ it returns, and <code class="computeroutput"><span class="identifier">ARGS</span></code> is a variable
+ length list of the argument types to the factory function. The maximum possible
+ length of the arglist is set by <code class="computeroutput"><span class="identifier">BOOST_EXTENSION_MAX_FUNCTOR_PARAMS</span></code>,
+ which defaults to six.
+ </p>
+<p>
+ The functions available in <code class="computeroutput"><span class="identifier">factory</span></code>
+ are:
+ </p>
+<a name="boost_extension.factories.void_set_lt_d_gt___"></a><h3>
+<a name="id934360"></a>
+ void set&lt;D&gt;()
+ </h3>
+<p>
+ The <code class="computeroutput"><span class="identifier">set</span></code> function takes a template
+ argument describing the class that will be created by this factory, and that
+ implements the <code class="computeroutput"><span class="identifier">T</span></code> interface.
+ This function may be called multiple times, to change the factory function.
+ </p>
+<a name="boost_extension.factories.bool_is_valid__"></a><h3>
+<a name="id934400"></a>
+ bool is_valid()
+ </h3>
+<p>
+ If set has been called, this returns true. Otherwise, it returns false.
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/info.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/info.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/info.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Info Classes</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="shared_libraries.html" title=" Shared Libraries">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.info"></a> Info Classes</h2></div></div></div>
+<a name="boost_extension.info"></a> Info Classes</h2></div></div></div>
 <p>
       In this section we explain how to use Info classes in Boost.Extension.
     </p>
@@ -48,8 +48,8 @@
 <p>
       First, we define an implementation of the <code class="literal">word</code> interface
       for each combination of word and language. Then we have for example the class
- <code class="literal">monde</code> that implements the <code class="literal">word</code> interface
- for the french language in this case.
+ <code class="literal">monde</code> that implements the <code class="computeroutput"><span class="identifier">word</span></code>
+ interface for the french language in this case.
     </p>
 <p>
       Let's see the code:
@@ -58,53 +58,53 @@
       
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">mundo</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">mundo</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"mundo!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"mundo!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">monde</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">monde</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"monde!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"monde!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">mondo</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">mondo</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"mondo!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"mondo!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
 
-<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">hola</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">hola</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hola"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hola"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">bonjour</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">bonjour</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"bonjour"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"bonjour"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">buonasera</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">buonasera</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"buonasera"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"buonasera"</span><span class="special">;}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -126,16 +126,28 @@
       
 </p>
 <pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">word_description</span>
+<span class="keyword">struct</span> <span class="identifier">word_description</span>
 <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">language</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">english_translation</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">language</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">english_translation</span><span class="special">;</span>
 
- <span class="identifier">word_description</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">language</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">english_translation</span><span class="special">)</span>
- <span class="special">:</span> <span class="identifier">language</span><span class="special">(</span><span class="identifier">language</span><span class="special">),</span> <span class="identifier">english_translation</span><span class="special">(</span><span class="identifier">english_translation</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="identifier">word_description</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">language</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">english_translation</span><span class="special">)</span>
+ <span class="special">:</span> <span class="identifier">language</span><span class="special">(</span><span class="identifier">language</span><span class="special">),</span> <span class="identifier">english_translation</span><span class="special">(</span><span class="identifier">english_translation</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
+ We also need a less-than operator for this class, so it can be used as a map
+ key.
+</p>
+<pre class="programlisting">
+<span class="keyword">inline</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span><span class="keyword">const</span> <span class="identifier">word_description</span> <span class="special">&amp;</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">word_description</span> <span class="special">&amp;</span> <span class="identifier">second</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">first</span><span class="special">.</span><span class="identifier">language</span> <span class="special">&lt;</span> <span class="identifier">second</span><span class="special">.</span><span class="identifier">language</span> <span class="special">||</span>
+ <span class="special">(</span><span class="identifier">first</span><span class="special">.</span><span class="identifier">language</span> <span class="special">==</span> <span class="identifier">second</span><span class="special">.</span><span class="identifier">language</span> <span class="special">&amp;&amp;</span>
+ <span class="identifier">first</span><span class="special">.</span><span class="identifier">english_translation</span> <span class="special">&lt;</span> <span class="identifier">second</span><span class="special">.</span><span class="identifier">english_translation</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
     </p>
 <p>
       Finally, just store a <code class="literal">word_description</code> instance when adding
@@ -145,32 +157,36 @@
       
 </p>
 <pre class="programlisting">
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_multilanguage_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_multilanguage_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hola</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"spanish"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">));</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">mundo</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"spanish"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">));</span>
-
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">bonjour</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"french"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">));</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">monde</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"french"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">));</span>
-
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">buonasera</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"italian"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">));</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">mondo</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"italian"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">));</span>
-
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"english"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">));</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;(</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"english"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">));</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"spanish"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hola</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"spanish"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">mundo</span><span class="special">&gt;();</span>
+
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"french"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">bonjour</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"french"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">monde</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"italian"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">buonasera</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"italian"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">mondo</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"english"</span><span class="special">,</span> <span class="string">"hello"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;()[</span><span class="identifier">word_description</span><span class="special">(</span><span class="string">"english"</span><span class="special">,</span> <span class="string">"world!"</span><span class="special">)]</span>
+ <span class="special">.</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">&gt;();</span>
 <span class="special">}</span>
+
 </pre>
 <p>
     </p>
 <p>
- In the code we could see that add argument is a Info class instance. In this
- case is <code class="literal">word_description</code> which receives the language and
- word as arguments.
- </p>
-<p>
- Now we could start using that information in the main code. Retrieving Info
- class is easy, you should just call <code class="literal">get_info()</code> method of
- the factory.
+ Now we could start using that information in the main code. Retrieving the
+ <code class="computeroutput"><span class="identifier">Info</span></code> instance for a factory
+ is simple, since it is part of the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code> in
+ the map of factories.
     </p>
 <p>
       Let's see some code using the multilanguage hello world words:
@@ -179,31 +195,34 @@
       
 </p>
 <pre class="programlisting">
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="identifier">word_description</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
- <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" is "</span> <span class="special">&lt;&lt;</span> <span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">get_info</span><span class="special">().</span><span class="identifier">english_translation</span>
- <span class="special">&lt;&lt;</span> <span class="string">" in "</span> <span class="special">&lt;&lt;</span> <span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">get_info</span><span class="special">().</span><span class="identifier">language</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">word_description</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span>
+ <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+ <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">.</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" is "</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">first</span><span class="special">.</span><span class="identifier">english_translation</span>
+ <span class="special">&lt;&lt;</span> <span class="string">" in "</span> <span class="special">&lt;&lt;</span> <span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">first</span><span class="special">.</span><span class="identifier">language</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 <span class="special">}</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 </pre>
 <p>
     </p>
 <p>
       And we get the following output:
     </p>
-<div class="informaltable"><table class="table">
+<div class="informaltable">
+<h4>
+<a name="id937578"></a>
+ </h4>
+<table class="table">
 <colgroup><col></colgroup>
-<tbody><tr><td>
- <p>
- <code class="literal">hola is hello in spanish<br> mundo! is world! in spanish<br>
- bonjour is hello in french<br> monde! is world! in french<br> buonasera
- is hello in italian<br> mondo! is world! in italian<br> hello is
- hello in english<br> world! is world! in english<br> </code>
- </p>
- </td></tr></tbody>
-</table></div>
+<tbody><tr><td><code class="literal">hola is hello in spanish<br> mundo! is world! in spanish<br>
+ bonjour is hello in french<br> monde! is world! in french<br> buonasera
+ is hello in italian<br> mondo! is world! in italian<br> hello is
+ hello in english<br> world! is world! in english<br> </code></td></tr></tbody>
+</table>
+</div>
 <p>
       Now that we have described our example the major parts could be summarized:
     </p>
@@ -227,7 +246,7 @@
       Tutorial 5 describes a more complex example of the use of the Info class.
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/introduction.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/introduction.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/introduction.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Introduction</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
@@ -24,43 +24,38 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.introduction"></a> Introduction</h2></div></div></div>
-<p>
- Wrappers for loading classes from linked libraries to extend the functionality
- of a program. Created to ease the creation of plugins.
- </p>
+<a name="boost_extension.introduction"></a> Introduction</h2></div></div></div>
 <p>
       The Boost.Extension library has been developed to ease the development of plugins
- and similar extensions to software. Classes can be made available from linked
- libraries and loaded automatically by the application.
+ and similar extensions to software. Classes can be made available from shared
+ libraries and loaded by the application.
     </p>
 <p>
- The documentation is completely incomplete. Sorry. Look at tutorial #1 for
- examples of basic usage, and tutorial #2 for examples of advanced usage.
+ The documentation is mostly complete.
     </p>
 <p>
       Note the following:
     </p>
-<div class="orderedlist"><ol type="1">
+<div class="itemizedlist"><ul type="disc">
 <li>
         Multiple and virtual inheritance are supported
       </li>
 <li>
- No macros are currently used (besides those required by Windows for exported
- functions)
+ Library users do not need to use any macros (besides those required by Windows
+ for exported functions)
       </li>
 <li>
         Only one external function required per shared library to export classes
       </li>
 <li>
- RTTI is used by default, but it is possible to use user-defined type identifications.
+ RTTI is used by default, but it is possible to use user-defined type identification
       </li>
 <li>
         Classes do not need to be modified to be loadable
       </li>
-</ol></div>
+</ul></div>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/performance_analysis.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/performance_analysis.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/performance_analysis.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Performance Analysis</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="info.html" title=" Info Classes">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.performance_analysis"></a> Performance Analysis</h2></div></div></div>
+<a name="boost_extension.performance_analysis"></a> Performance Analysis</h2></div></div></div>
 <p>
       In this section we will discuss the performance of the library. We'll focus
       on the overhead added in comparison with <code class="literal">dlopen/dlclose</code>
@@ -36,9 +36,8 @@
       using the optional boost::function.
     </p>
 <a name="boost_extension.performance_analysis.first_comparison"></a><h1>
-<a name="id2578892"></a>
- <a href="performance_analysis.html#boost_extension.performance_analysis.first_comparison">First
- comparison</a>
+<a name="id937711"></a>
+ First comparison
     </h1>
 <p>
       The first benchmarks show how much overhead is incurred by using Boost.Extension
@@ -69,9 +68,8 @@
       So Boost.Extension is (aprox.) three times slower.
     </p>
 <a name="boost_extension.performance_analysis.multiple_calls_and_libraries"></a><h1>
-<a name="id2578976"></a>
- <a href="performance_analysis.html#boost_extension.performance_analysis.multiple_calls_and_libraries">Multiple
- calls and libraries</a>
+<a name="id937788"></a>
+ Multiple calls and libraries
     </h1>
 <p>
       Having a first idea about the comparison we advanced with two new benchmarks.
@@ -119,9 +117,8 @@
       RTTI works across shared libraries.
     </p>
 <a name="boost_extension.performance_analysis.boost__function_overhead"></a><h1>
-<a name="id2579090"></a>
- <a href="performance_analysis.html#boost_extension.performance_analysis.boost__function_overhead">boost::function
- overhead</a>
+<a name="id937782"></a>
+ boost::function overhead
     </h1>
 <p>
       Besides the comparison of Boost.Extension vs. direct system calls we evaluated
@@ -141,7 +138,7 @@
       how much of the rest of Boost would then be required for using Boost.Extension.
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/shared_libraries.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/shared_libraries.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/shared_libraries.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Shared Libraries</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="factories.html" title=" Factories">
@@ -24,12 +24,85 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.shared_libraries"></a> Shared Libraries</h2></div></div></div>
+<a name="boost_extension.shared_libraries"></a> Shared Libraries</h2></div></div></div>
 <p>
- Content not yet created.
+ A <code class="computeroutput"><span class="identifier">shared_library</span></code> refers to
+ a loadable module, the type of which depends on the platform:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Windows: .dll
+ </li>
+<li>
+ Most Linux or Unix: .so
+ </li>
+<li>
+ Mac OS X: .dylib or .bundle (See Appendix C)
+ </li>
+</ul></div>
+<a name="boost_extension.shared_libraries._code__phrase_role__identifier__shared_library__phrase__phrase_role__special_____phrase__phrase_role__keyword__const__phrase__nbsp__phrase_role__keyword__char__phrase__nbsp__phrase_role__special_____phrase__nbsp__phrase_role__identifier__location__phrase__phrase_role__special_____phrase__nbsp__phrase_role__keyword__bool__phrase__nbsp__phrase_role__identifier__auto_close__phrase__nbsp__phrase_role__special_____phrase__nbsp__phrase_role__keyword__false__phrase__phrase_role__special_____phrase___code_"></a><h4>
+<a name="id934465"></a>
+ <code class="computeroutput"><span class="identifier">shared_library</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">location</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">auto_close</span> <span class="special">=</span> <span class="keyword">false</span><span class="special">)</span></code>
+ </h4>
+<p>
+ <code class="computeroutput"><span class="identifier">location</span></code> is the relative path
+ of the shared library to laod, and <code class="computeroutput"><span class="identifier">auto_close</span></code>
+ sets whether or not the library will be automatically closed when the <code class="computeroutput"><span class="identifier">shared_library</span></code> is destroyed. This function
+ does not open the library.
+ </p>
+<a name="boost_extension.shared_libraries._code__phrase_role__keyword__bool__phrase__nbsp__phrase_role__identifier__open__phrase__phrase_role__special______phrase___code_"></a><h4>
+<a name="id934592"></a>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">open</span><span class="special">()</span></code>
+ </h4>
+<p>
+ Returns true if the library is opened successfully.
+ </p>
+<a name="boost_extension.shared_libraries._code__phrase_role__keyword__bool__phrase__nbsp__phrase_role__identifier__is_open__phrase__phrase_role__special______phrase___code_"></a><h4>
+<a name="id934636"></a>
+ <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">is_open</span><span class="special">()</span></code>
+ </h4>
+<p>
+ Returns true if the library is open.
+ </p>
+<a name="boost_extension.shared_libraries._code__phrase_role__keyword__void__phrase__nbsp__phrase_role__identifier__close__phrase__phrase_role__special______phrase___code_"></a><h4>
+<a name="id934679"></a>
+ <code class="computeroutput"><span class="keyword">void</span> <span class="identifier">close</span><span class="special">()</span></code>
+ </h4>
+<p>
+ Close the library. Note that an OS specific shared library usually keeps a
+ reference count, meaning that calling this function will just decrease the
+ reference count. If the reference count drops to 0, the library will be ready
+ to actually closed - though the platform is not required to actually close
+ the library even then. As such, this function can sometimes give a performance
+ boost, by freeing up RAM, but will often do nothing.
+ </p>
+<a name="boost_extension.shared_libraries._code__phrase_role__identifier__returnvalue__phrase__nbsp__phrase_role__special______phrase__phrase_role__identifier__get__phrase__phrase_role__special_____phrase__phrase_role__keyword__const__phrase__nbsp__phrase_role__keyword__char__phrase__nbsp__phrase_role__special_____phrase__nbsp__phrase_role__identifier__name__phrase__phrase_role__special_______phrase__phrase_role__identifier__args__phrase__phrase_role__special_____phrase___code_"></a><h4>
+<a name="id934725"></a>
+ <code class="computeroutput"><span class="identifier">ReturnValue</span> <span class="special">(*</span><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">name</span><span class="special">))(</span><span class="identifier">ARGS</span><span class="special">)</span></code>
+ </h4>
+<p>
+ This function returns a pointer to a function in a dll with <code class="computeroutput"><span class="identifier">name</span></code>.
+ Note that a C++ function needs to have <code class="computeroutput"><span class="keyword">extern</span> <span class="string">"C"</span></code> before it in order for this to
+ work. To get a function like this:
+</p>
+<pre class="programlisting">
+<span class="keyword">extern</span> <span class="string">"C"</span>
+<span class="keyword">int</span> <span class="identifier">get_value</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">name</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ You would call:
+</p>
+<pre class="programlisting">
+<span class="identifier">mySharedLibrary</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*&gt;(</span><span class="string">"get_value"</span><span class="special">);</span>
+</pre>
+<p>
+ [note It is recommended that you use Boost.Function to capture the return values
+ of <code class="computeroutput"><span class="identifier">get</span></code>, but not required.]
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Tutorials</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="prev" href="introduction.html" title=" Introduction">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_extension.tutorials"></a>Tutorials</h2></div></div></div>
+<a name="boost_extension.tutorials"></a>Tutorials</h2></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section"> Tutorial 1</span></dt>
 <dt><span class="section"> Tutorial 2</span></dt>
@@ -59,7 +59,7 @@
       Jamfile, but the Jamfile contents are separated out for each tutorial.
     </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial01.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial01.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial01.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 1</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="../tutorials.html" title="Tutorials">
@@ -24,17 +24,17 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial01"></a> Tutorial 1</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial01"></a> Tutorial 1</h3></div></div></div>
 <p>
         Create a class that we will later subclass and put it into a header file
         called word.hpp.
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">word</span><span class="special">(){}</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">""</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">word</span><span class="special">(){}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">""</span><span class="special">;}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -51,18 +51,18 @@
         
 </p>
 <pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="string">"word.hpp"</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">factory_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="string">"word.hpp"</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">factory_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
-<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
 <span class="special">};</span>
-<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -72,24 +72,30 @@
         all exportable classes in the library.
 </p>
 <pre class="programlisting">
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">1</span><span class="special">);</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">);</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">1</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">2</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">&gt;();</span>
 <span class="special">}</span>
 </pre>
 <p>
- <code class="computeroutput"><span class="keyword">extern</span> <span class="string">"C"</span></code>
+ <code class="computeroutput"><span class="keyword">extern</span> <span class="string">"C"</span></code>
         is required to keep the function name from being mangled. <code class="computeroutput"><span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span></code>
         is only necessary on Windows - on other platforms it does nothing. On Windows,
         it declares that the function should be exported. This is the default in
         shared libraries on other platforms.
       </p>
 <p>
- The <code class="computeroutput"><span class="identifier">factory_map</span><span class="special">::</span><span class="identifier">add</span></code> function takes three template arguments:
- the class to export, the interface that it is being exported as, and what
- type of info is used to identify it (which can be an arbitrary type). The
- argument is the value for that identification info.
+ The <code class="computeroutput"><span class="identifier">factory_map</span><span class="special">::</span><span class="identifier">get</span></code> function takes two template arguments:
+ the type of factory to get (the interface returned by it), and what type
+ of info is used to identify it (which can be an arbitrary type).
+ </p>
+<p>
+ This returns a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span></code>, in this case, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>. We then index the map to find (and perhaps
+ create) the appropriate factory, and set the type of class it instantiates
+ to the template argument of the <code class="computeroutput"><span class="identifier">set</span></code>
+ function. The argument is the value for that identification info.
       </p>
 <p>
         Now we can write the executable.
@@ -98,34 +104,35 @@
         
 </p>
 <pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">factory_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">shared_library</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">convenience</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="string">"word.hpp"</span>
-<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">factory_map</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">shared_library</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">extension</span><span class="special">/</span><span class="identifier">convenience</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="string">"word.hpp"</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>
- <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">;</span>
   <span class="comment">// Create the factory_map object - it will hold all of the available
-</span> <span class="comment">// constructors. Multiple factory_maps can be constructed.
-</span> <span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
+</span> <span class="comment">// constructors. Multiple factory_maps can be constructed.
+</span> <span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
   <span class="comment">// load the shared library with
-</span> <span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLib.extension"</span><span class="special">,</span> <span class="string">"extension_export_word"</span><span class="special">);</span>
+</span> <span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLib.extension"</span><span class="special">,</span>
+ <span class="string">"extension_export_word"</span><span class="special">);</span>
   <span class="comment">// Get a reference to the list of constructors for words.
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">factory_list</span> <span class="special">=</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;();</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">)</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error - the classes were not found."</span><span class="special">;</span>
- <span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
- <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span>
- <span class="special">{</span>
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">factory_list</span> <span class="special">=</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;();</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error - the classes were not found."</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span>
+ <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+ <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span> <span class="special">{</span>
     <span class="comment">// Using auto_ptr to avoid needing delete. Using smart_ptrs is recommended.
-</span> <span class="comment">// Note that this has a zero argument constructor - currently constructors
-</span> <span class="comment">// with up to six arguments can be used.
-</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
+</span> <span class="comment">// Note that this has a zero argument constructor - currently constructors
+</span> <span class="comment">// with up to six arguments can be used.
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
   <span class="special">}</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -138,30 +145,30 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="special">;</span>
-<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="special">;</span>
-<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">extension</span> <span class="special">;</span>
-<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">lib</span> <span class="special">;</span>
-<span class="identifier">import</span> <span class="identifier">os</span> <span class="special">;</span>
+<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="special">;</span>
+<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="special">;</span>
+<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">extension</span> <span class="special">;</span>
+<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">lib</span> <span class="special">;</span>
+<span class="identifier">import</span> <span class="identifier">os</span> <span class="special">;</span>
 
-<span class="identifier">local</span> <span class="identifier">BOOST_ROOT</span> <span class="special">=</span> <span class="special">[</span> <span class="identifier">os</span><span class="special">.</span><span class="identifier">environ</span> <span class="identifier">BOOST_ROOT</span> <span class="special">]</span> <span class="special">;</span>
+<span class="identifier">local</span> <span class="identifier">BOOST_ROOT</span> <span class="special">=</span> <span class="special">[</span> <span class="identifier">os</span><span class="special">.</span><span class="identifier">environ</span> <span class="identifier">BOOST_ROOT</span> <span class="special">]</span> <span class="special">;</span>
 <span class="identifier">project</span>
- <span class="special">:</span> <span class="identifier">requirements</span>
+ <span class="special">:</span> <span class="identifier">requirements</span>
       <span class="special">&lt;</span><span class="identifier">include</span><span class="special">&gt;../../../</span>
       <span class="special">&lt;</span><span class="identifier">include</span><span class="special">&gt;</span>#<span class="special">(</span><span class="identifier">BOOST_ROOT</span><span class="special">)</span>
     <span class="special">:</span>
     <span class="special">;</span>
 
-<span class="identifier">exe</span> <span class="identifier">HelloWorld</span> <span class="special">:</span> <span class="identifier">main</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">HelloWorldLib</span> <span class="special">:</span> <span class="identifier">hello_world</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">install</span> <span class="special">../</span><span class="identifier">bin</span> <span class="special">:</span> <span class="identifier">HelloWorld</span> <span class="identifier">HelloWorldLib</span> <span class="special">;</span>
+<span class="identifier">exe</span> <span class="identifier">HelloWorld</span> <span class="special">:</span> <span class="identifier">main</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">HelloWorldLib</span> <span class="special">:</span> <span class="identifier">hello_world</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">install</span> <span class="special">../</span><span class="identifier">bin</span> <span class="special">:</span> <span class="identifier">HelloWorld</span> <span class="identifier">HelloWorldLib</span> <span class="special">;</span>
 </pre>
 <p>
         If you use another build system, you'll need to make sure that the output
         shared library (dll, so, dylib etc.) is renamed correctly.
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial02.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial02.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial02.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 2</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="tutorial01.html" title=" Tutorial 1">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial02"></a> Tutorial 2</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial02"></a> Tutorial 2</h3></div></div></div>
 <p>
         This tutorial shows more advanced class loading. The example described here
         is contrived, and such a convoluted design is not used as an example of good
@@ -76,10 +76,10 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="special">;</span>
-<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="special">;</span>
-<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">extension</span> <span class="special">;</span>
-<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">lib</span> <span class="special">;</span>
+<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="special">;</span>
+<span class="identifier">import</span> <span class="identifier">type</span> <span class="special">:</span> <span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="special">;</span>
+<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">suffix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">extension</span> <span class="special">;</span>
+<span class="identifier">type</span><span class="special">.</span><span class="identifier">change</span><span class="special">-</span><span class="identifier">generated</span><span class="special">-</span><span class="identifier">target</span><span class="special">-</span><span class="identifier">prefix</span> <span class="identifier">SHARED_LIB</span> <span class="special">:</span> <span class="special">:</span> <span class="identifier">lib</span> <span class="special">;</span>
 </pre>
 <p>
       </p>
@@ -91,8 +91,8 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">lib</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">vehicle</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">Car</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">car</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">vehicle</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">Car</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">car</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
 </pre>
 <p>
       </p>
@@ -107,21 +107,22 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">lib</span> <span class="identifier">Plane</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">plane</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">Boat</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">boat</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">Computer</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">computer</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">FlyingCar</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">flying_car</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Plane</span> <span class="identifier">Car</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
-<span class="identifier">lib</span> <span class="identifier">CarOfTheFuture</span> <span class="special">:</span>
+<span class="identifier">lib</span> <span class="identifier">Plane</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">plane</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">Boat</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">boat</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Vehicle</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">Computer</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">computer</span><span class="special">.</span><span class="identifier">cpp</span> <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">FlyingCar</span> <span class="special">:</span> <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">flying_car</span><span class="special">.</span><span class="identifier">cpp</span> <span class="identifier">Plane</span> <span class="identifier">Car</span> <span class="identifier">Vehicle</span>
+ <span class="special">:</span> <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span> <span class="special">;</span>
+<span class="identifier">lib</span> <span class="identifier">CarOfTheFuture</span> <span class="special">:</span>
   <span class="identifier">multiple_inheritance</span><span class="special">/</span><span class="identifier">car_of_the_future</span><span class="special">.</span><span class="identifier">cpp</span>
- <span class="identifier">Plane</span> <span class="identifier">Car</span> <span class="identifier">Vehicle</span>
- <span class="identifier">FlyingCar</span> <span class="identifier">Computer</span> <span class="identifier">Boat</span>
+ <span class="identifier">Plane</span> <span class="identifier">Car</span> <span class="identifier">Vehicle</span>
+ <span class="identifier">FlyingCar</span> <span class="identifier">Computer</span> <span class="identifier">Boat</span>
   <span class="special">:</span>
   <span class="special">&lt;</span><span class="identifier">link</span><span class="special">&gt;</span><span class="identifier">shared</span>
 <span class="special">;</span>
 
-<span class="identifier">install</span> <span class="special">../</span><span class="identifier">bin</span> <span class="special">:</span>
- <span class="identifier">HelloWorld</span> <span class="identifier">HelloWorldLib</span> <span class="identifier">Vehicle</span> <span class="identifier">Boat</span> <span class="identifier">FlyingCar</span>
- <span class="identifier">CarOfTheFuture</span> <span class="identifier">MultipleInheritance</span>
+<span class="identifier">install</span> <span class="special">../</span><span class="identifier">bin</span> <span class="special">:</span>
+ <span class="identifier">HelloWorld</span> <span class="identifier">HelloWorldLib</span> <span class="identifier">Vehicle</span> <span class="identifier">Boat</span> <span class="identifier">FlyingCar</span>
+ <span class="identifier">CarOfTheFuture</span> <span class="identifier">MultipleInheritance</span>
   <span class="special">:</span>
   <span class="special">;</span>
 </pre>
@@ -143,27 +144,27 @@
         
 </p>
 <pre class="programlisting">
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_FLYING_CAR_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_BOAT_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
-<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_COMPUTER_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
-<span class="preprocessor">#include</span> <span class="string">"flying_car.hpp"</span>
-<span class="preprocessor">#include</span> <span class="string">"boat.hpp"</span>
-<span class="preprocessor">#include</span> <span class="string">"computer.hpp"</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">typeinfo</span><span class="special">&gt;</span>
-<span class="keyword">class</span> <span class="identifier">BOOST_EXTENSION_CAR_OF_THE_FUTURE_DECL</span>
- <span class="identifier">car_of_the_future</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">flying_car</span><span class="special">,</span> <span class="keyword">public</span> <span class="identifier">boat</span><span class="special">,</span> <span class="keyword">public</span> <span class="identifier">computer</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_FLYING_CAR_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_BOAT_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_EXTENSION_COMPUTER_DECL</span> <span class="identifier">BOOST_EXTENSION_IMPORT_DECL</span>
+<span class="preprocessor">#include</span> <span class="string">"flying_car.hpp"</span>
+<span class="preprocessor">#include</span> <span class="string">"boat.hpp"</span>
+<span class="preprocessor">#include</span> <span class="string">"computer.hpp"</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">typeinfo</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">BOOST_EXTENSION_CAR_OF_THE_FUTURE_DECL</span>
+ <span class="identifier">car_of_the_future</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">flying_car</span><span class="special">,</span> <span class="keyword">public</span> <span class="identifier">boat</span><span class="special">,</span> <span class="keyword">public</span> <span class="identifier">computer</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">car_of_the_future</span><span class="special">(</span><span class="keyword">void</span><span class="special">){</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nCreated a Car of the Future"</span><span class="special">;}</span>
- <span class="special">~</span><span class="identifier">car_of_the_future</span><span class="special">(</span><span class="keyword">void</span><span class="special">){</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nDestroyed a Car of the Future"</span><span class="special">;}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">list_capabilities</span><span class="special">(</span><span class="keyword">void</span><span class="special">);</span>
+ <span class="identifier">car_of_the_future</span><span class="special">(</span><span class="keyword">void</span><span class="special">){</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nCreated a Car of the Future"</span><span class="special">;}</span>
+ <span class="special">~</span><span class="identifier">car_of_the_future</span><span class="special">(</span><span class="keyword">void</span><span class="special">){</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nDestroyed a Car of the Future"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">list_capabilities</span><span class="special">(</span><span class="keyword">void</span><span class="special">);</span>
 <span class="special">};</span>
 </pre>
 <p>
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial03.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial03.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial03.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 3</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="tutorial02.html" title=" Tutorial 2">
@@ -24,9 +24,9 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial03"></a> Tutorial 3</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial03"></a> Tutorial 3</h3></div></div></div>
 <p>
- This tutorial shows how to register and instance classes that have multi-argument
+ This tutorial shows how to register and instantiate classes that have multi-argument
         constructors (not default constructors) in Boost.Extension. In the example
         that we will describe in this tutorial (examples/parameters) we create a
         dummy class with a constructor that have six arguments. We'll register this
@@ -34,11 +34,11 @@
       </p>
 <p>
         It is expected that before following this tutorial you have gone trough the
- first tutorial at least, and you are familiar with the basic use of Boost.Extension
+ first tutorial at least, and you are familiar with the basic use of Boost.Extension.
       </p>
 <p>
         Let's start defining our class. Its constructor receives six parameters (we
- chose that number because it's the current argument limit of the library),
+ chose that number because it's the default argument limit of the library),
         each one of a different type including a class defined in the interface (class
         A) and a smart pointer to this class. It shows via stdout the received parameters
         at construction.
@@ -47,24 +47,25 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">six_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lots_of_parameters_interface</span>
+<span class="keyword">class</span> <span class="identifier">six_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">lots_of_parameters_interface</span>
 <span class="special">{</span>
   <span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">six_parameters</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="identifier">ptr_a</span><span class="special">)</span>
- <span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">ptr_a</span><span class="special">)</span>
+ <span class="identifier">six_parameters</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="identifier">ptr_a</span><span class="special">)</span>
+ <span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">ptr_a</span><span class="special">)</span>
     <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Constructor called."</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Parameters:"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tbool: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tunsigned int: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tchar: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">c</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tstring: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">s</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tA.i: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">a</span><span class="special">.</span><span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tptr_a-&gt;i: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">ptr_a</span><span class="special">-&gt;</span><span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Constructor called."</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Parameters:"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tbool: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">b</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tunsigned int: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tchar: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">c</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tstring: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">s</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tA.i: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">a</span><span class="special">.</span><span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\tptr_a-&gt;i: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">ptr_a</span><span class="special">-&gt;</span><span class="identifier">i</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
     <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">six_parameters</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">six_parameters</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -75,19 +76,21 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">A</span>
+<span class="keyword">class</span> <span class="identifier">A</span>
 <span class="special">{</span>
   <span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">A</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">i</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{}</span>
- <span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
+ <span class="identifier">A</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">i</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
 <span class="special">};</span>
 
 
-<span class="keyword">class</span> <span class="identifier">lots_of_parameters_interface</span>
+<span class="keyword">class</span> <span class="identifier">lots_of_parameters_interface</span>
 <span class="special">{</span>
   <span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="identifier">ptr_a</span><span class="special">)</span> <span class="special">{}</span>
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="keyword">bool</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">,</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">A</span> <span class="identifier">a</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="identifier">ptr_a</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">lots_of_parameters_interface</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -100,9 +103,12 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span> <span class="identifier">six_parameters</span><span class="special">,</span> <span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="speci
al">&gt;(</span><span class="number">6</span><span class="special">);</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">&gt;()[</span><span class="number">6</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">six_parameters</span><span class="special">&gt;();</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -112,28 +118,35 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">;</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">;</span>
 
   <span class="comment">// Create the factory_map object - it will hold all of the available
-</span> <span class="comment">// constructors. Multiple factory_maps can be constructed.
-</span> <span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
+</span> <span class="comment">// constructors. Multiple factory_maps can be constructed.
+</span> <span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
 
   <span class="comment">// load the shared library with
-</span> <span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libParametersLib.extension"</span><span class="special">,</span> <span class="string">"extension_export"</span><span class="special">);</span>
+</span> <span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libParametersLib.extension"</span><span class="special">,</span> <span class="string">"extension_export"</span><span class="special">);</span>
 
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special"
>&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">factory_list</span> <span class="special">=</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
- <span class="keyword">if</span> <span class="special">(</span><span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">!=</span> <span class="number">1</span><span class="special">)</span> <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error - the class was not found."</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span>
+ <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span>
+ <span class="identifier">factory_list</span> <span class="special">=</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">!=</span> <span class="number">1</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error - the class was not found."</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
   <span class="special">}</span>
 
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special
">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">par</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span> <span class="identifier">lots_of_parameters_interface</span> <span class="special">&gt;</span> <span class="identifier">par_ptr</span><span class="special">(</span><span class="identifier">par</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">(</span><span class="keyword">true</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="char">'c'</span><span class="special">,</span> <span class="string">"test"</span><span class="special">,</span> <span class="identifier">A</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;(</s
pan><span class="keyword">new</span> <span class="identifier">A</span><span class="special">(</span><span class="number">15</span><span class="special">))));</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span>
+ <span class="keyword">char</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">par</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">lots_of_parameters_interface</span><span class="special">&gt;</span>
+ <span class="identifier">par_ptr</span><span class="special">(</span><span class="identifier">par</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">(</span><span class="keyword">true</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="char">'c'</span><span class="special">,</span> <span class="string">"test"</span><span class="special">,</span> <span class="identifier">A</span><span class="special">(</span><span class="number">2</span><span class="special">),</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="identifier">A</span><span class="special">(</span><span class="number">15</span><span class="special">))));</span>
 
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -162,7 +175,7 @@
         constructors and use them via Boost.extensions without problems.
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial04.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial04.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial04.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 4</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="tutorial03.html" title=" Tutorial 3">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial04"></a> Tutorial 4</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial04"></a> Tutorial 4</h3></div></div></div>
 <p>
         In this tutorial we will see different features of the library related to
         multiple loading of the same library, instance or interface.
@@ -47,22 +47,23 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">1</span><span class="special">);</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">);</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">1</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">2</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">&gt;();</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -79,22 +80,25 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">world</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world! v2"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"world! v2"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
+<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">word</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"| v2 hello"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">get_val</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">"| v2 hello"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_word</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">22</span><span class="special">);</span> <span class="comment">// int could be used as version (v2 word 2)
-</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">,</span> <span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">21</span><span class="special">);</span> <span class="comment">// int could be used as version (v2 word 1)
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">22</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">world</span><span class="special">&gt;();</span>
+ <span class="comment">// int could be used as version (v2 word 2)
+</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">21</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">&gt;();</span>
+ <span class="comment">// int could be used as version (v2 word 1)
 </span><span class="special">}</span>
 </pre>
 <p>
@@ -108,16 +112,19 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
+<span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
 
 <span class="comment">// load hello world first version
-</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLib.extension"</span><span class="special">,</span> <span class="string">"extension_export_word"</span><span class="special">);</span>
+</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLib.extension"</span><span class="special">,</span>
+ <span class="string">"extension_export_word"</span><span class="special">);</span>
 
 <span class="comment">// load hello world second version
-</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLibv2.extension"</span><span class="special">,</span> <span class="string">"extension_export_word"</span><span class="special">);</span>
+</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLibv2.extension"</span><span class="special">,</span>
+ <span class="string">"extension_export_word"</span><span class="special">);</span>
 
 <span class="comment">// load hello world second version again
-</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLibv2.extension"</span><span class="special">,</span> <span class="string">"extension_export_word"</span><span class="special">);</span>
+</span><span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libHelloWorldLibv2.extension"</span><span class="special">,</span>
+ <span class="string">"extension_export_word"</span><span class="special">);</span>
 </pre>
 <p>
       </p>
@@ -132,28 +139,31 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">for</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
- <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
+<span class="keyword">for</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_word</span> <span class="special">=</span>
+ <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span> <span class="identifier">current_word</span> <span class="special">!=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+ <span class="special">++</span><span class="identifier">current_word</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">word</span><span class="special">&gt;</span> <span class="identifier">word_ptr</span><span class="special">(</span><span class="identifier">current_word</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">word_ptr</span><span class="special">-&gt;</span><span class="identifier">get_val</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
 <span class="special">}</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 </pre>
 <p>
       </p>
 <p>
         We get the following output:
       </p>
-<div class="informaltable"><table class="table">
+<div class="informaltable">
+<h4>
+<a name="id928076"></a>
+ </h4>
+<table class="table">
 <colgroup><col></colgroup>
 <tbody><tr><td>
- <p>
- <code class="literal">words:</code><br> <code class="literal">hello world! | v2 hello
- world! v2 | v2 hello world! v2</code>
- </p>
- </td></tr></tbody>
-</table></div>
+<code class="literal">words:</code><br> <code class="literal">hello world! | v2 hello
+ world! v2 | v2 hello world! v2</code>
+</td></tr></tbody>
+</table>
+</div>
 <p>
         The first "hello world" is returned by the first version of the
         library, and the second and third returned by the second version.
@@ -170,11 +180,11 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">salute</span>
+<span class="keyword">class</span> <span class="identifier">salute</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">salute</span><span class="special">(){}</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">say</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">""</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">salute</span><span class="special">(){}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">say</span><span class="special">(){</span><span class="keyword">return</span> <span class="string">""</span><span class="special">;}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -186,23 +196,24 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">salute</span>
+<span class="keyword">class</span> <span class="identifier">hello</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">salute</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">say</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">say</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="string">"hello"</span><span class="special">;}</span>
 <span class="special">};</span>
 
-<span class="keyword">class</span> <span class="identifier">bye</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">salute</span>
+<span class="keyword">class</span> <span class="identifier">bye</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">salute</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">say</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="string">"bye!"</span><span class="special">;}</span>
+ <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">say</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="string">"bye!"</span><span class="special">;}</span>
 <span class="special">};</span>
 
 
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_salute</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_salute</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">,</span> <span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">1</span><span class="special">);</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span><span class="identifier">bye</span><span class="special">,</span> <span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">);</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">1</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">hello</span><span class="special">&gt;();</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;()[</span><span class="number">2</span><span class="special">].</span><span class="identifier">set</span><span class="special">&lt;</span><span class="identifier">bye</span><span class="special">&gt;();</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -223,37 +234,42 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">salute_factory_list</span> <span class="special">=</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;();</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">salute_factory_list</span> <span class="special">=</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;();</span>
 
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"salutes: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_salute</span> <span class="special">=</span> <span class="identifier">salute_factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
- <span class="identifier">current_salute</span> <span class="special">!=</span> <span class="identifier">salute_factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">current_salute</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">&gt;</span> <span class="identifier">salute_ptr</span><span class="special">(</span><span class="identifier">current_salute</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">salute_ptr</span><span class="special">-&gt;</span><span class="identifier">say</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"salutes: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_salute</span> <span class="special">=</span>
+ <span class="identifier">salute_factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">current_salute</span> <span class="special">!=</span> <span class="identifier">salute_factory_list</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+ <span class="special">++</span><span class="identifier">current_salute</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">salute</span><span class="special">&gt;</span> <span class="identifier">salute_ptr</span><span class="special">(</span><span class="identifier">current_salute</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">.</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">salute_ptr</span><span class="special">-&gt;</span><span class="identifier">say</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">" "</span><span class="special">;</span>
 <span class="special">}</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 </pre>
 <p>
       </p>
 <p>
         The output is:
       </p>
-<div class="informaltable"><table class="table">
+<div class="informaltable">
+<h4>
+<a name="id929180"></a>
+ </h4>
+<table class="table">
 <colgroup><col></colgroup>
 <tbody><tr><td>
- <p>
- <code class="literal">salutes:</code> <br> <code class="literal">hello bye!</code>
- </p>
- </td></tr></tbody>
-</table></div>
+<code class="literal">salutes:</code> <br> <code class="literal">hello bye!</code>
+</td></tr></tbody>
+</table>
+</div>
 <p>
         In conclusion, with Boost.Extension we can implement the same class in different
         libraries, the same class for different interfaces and load multiple libraries
         into the same factory.
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial05.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial05.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial05.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 5</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="tutorial04.html" title=" Tutorial 4">
@@ -24,7 +24,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial05"></a> Tutorial 5</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial05"></a> Tutorial 5</h3></div></div></div>
 <p>
         In this tutorial we will describe an advanced example using the Info class.
         The basics of Info classes are explained in the specific section. We expect
@@ -43,16 +43,16 @@
         
 </p>
 <pre class="programlisting">
-<span class="keyword">class</span> <span class="identifier">protocol</span>
+<span class="keyword">class</span> <span class="identifier">protocol</span>
 <span class="special">{</span>
  <span class="keyword">public</span><span class="special">:</span>
 
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">);</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">""</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span> <span class="special">{}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">protocol</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">protocol</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -65,33 +65,45 @@
 </p>
 <pre class="programlisting">
 <span class="comment">// MSN protocol implementation
-</span><span class="keyword">class</span> <span class="identifier">MSN</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">protocol</span>
+</span><span class="keyword">class</span> <span class="identifier">MSN</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">protocol</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: Logged In"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="
special">}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: message ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">msg</span> <span class="special">&lt;&lt;</span> <span class="string">"] sent"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"MSN: hello! msg received"</span><span class="special">);</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: Status changed to ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">new_status</span> <span class="special">&lt;&lt;</span> <span class="string">"]"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: Logged In"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: message ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">msg</span> <span class="special">&lt;&lt;</span> <span class="string">"] sent"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"MSN: hello! msg received"</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: Status changed to ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">new_status</span> <span class="special">&lt;&lt;</span> <span class="string">"]"</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">MSN</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">MSN</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 
 <span class="comment">// Jabber protocol implementation
-</span><span class="keyword">class</span> <span class="identifier">Jabber</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">protocol</span>
+</span><span class="keyword">class</span> <span class="identifier">Jabber</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">protocol</span>
 <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: Logged In"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span clas
s="special">}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: message ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">msg</span> <span class="special">&lt;&lt;</span> <span class="string">"] sent"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"Jabber: hello! msg received"</span><span class="special">);</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: Status changed to ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">new_status</span> <span class="special">&lt;&lt;</span> <span class="string">"]"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
- <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">login</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">user</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">pass</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: Logged In"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">send</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">msg</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: message ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">msg</span> <span class="special">&lt;&lt;</span> <span class="string">"] sent"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">receive</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"Jabber: hello! msg received"</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">change_status</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span><span class="identifier">new_status</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: Status changed to ["</span> <span class="special">&lt;&lt;</span> <span class="identifier">new_status</span> <span class="special">&lt;&lt;</span> <span class="string">"]"</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">Jabber</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">Jabber</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -115,14 +127,14 @@
 </p>
 <pre class="programlisting">
 <span class="comment">// interface for the parameters of each plugin
-</span><span class="keyword">class</span> <span class="identifier">network_parameters</span>
+</span><span class="keyword">class</span> <span class="identifier">network_parameters</span>
 <span class="special">{</span>
  <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)=</span> <span class="number">0</span><span class="special">;</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">network_parameters</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{};</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">network_parameters</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{};</span>
 <span class="special">};</span>
 </pre>
 <p>
@@ -135,46 +147,61 @@
 </p>
 <pre class="programlisting">
 <span class="comment">// MSN implementation
-</span><span class="keyword">class</span> <span class="identifier">MSN_network_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">network_parameters</span>
+</span><span class="keyword">class</span> <span class="identifier">MSN_network_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">network_parameters</span>
 <span class="special">{</span>
  <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"msn.messenger.com"</span><span class="special">;</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"1863"</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"msn.messenger.com"</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"1863"</span><span class="special">;</span> <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"http mode set"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"http mode set"</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">MSN_network_parameters</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">MSN_network_parameters</span><span class="special">()</span> <span class="special">{}</span>
 <span class="special">};</span>
 
 
 <span class="comment">// Jabber implementation
-</span><span class="keyword">class</span> <span class="identifier">Jabber_network_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">network_parameters</span>
+</span><span class="keyword">class</span> <span class="identifier">Jabber_network_parameters</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">network_parameters</span>
 <span class="special">{</span>
  <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"jabber.org"</span><span class="special">;</span> <span class="special">}</span>
- <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"7063"</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">hostname</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"jabber.org"</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">port</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="string">"7063"</span><span class="special">;</span> <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"http mode not supported"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">set_http_mode</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"http mode not supported"</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="special">}</span>
 
- <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">Jabber_network_parameters</span><span class="special">()</span> <span class="special">{}</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">Jabber_network_parameters</span><span class="special">()</span> <span class="special">{}</span>
 <span class="special">};</span>
 </pre>
 <p>
- </p>
+ We want to be able to compare smart pointers to <code class="computeroutput"><span class="identifier">network_parameters</span></code>:
+
+</p>
+<pre class="programlisting">
+<span class="keyword">inline</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">&lt;(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">first</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">second</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">comp</span> <span class="special">=</span> <span class="identifier">strcmp</span><span class="special">(</span><span class="identifier">first</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">(),</span> <span class="identifier">second</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">());</span>
+ <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">comp</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">strcmp</span><span class="special">(</span><span class="identifier">first</span><span class="special">-&gt;</span><span class="identifier">port</span><span class="special">(),</span> <span class="identifier">second</span><span class="special">-&gt;</span><span class="identifier">port</span><span class="special">())</span> <span class="special">&lt;</span> <span class="number">0</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="keyword">else</span> <span class="keyword">return</span> <span class="identifier">comp</span> <span class="special">&lt;</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
 <p>
- Now we can define our Info class as a smart pointer to the <code class="literal">network_parameters</code>
- class and register it in the factory map:
+ Now we can define our Info class as a smart pointer to the <code class="computeroutput"><span class="identifier">network_parameters</span></code> class and register it
+ in the factory map:
       </p>
 <p>
         
 </p>
 <pre class="programlisting">
-<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span> <span class="identifier">extension_export_plugins</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
+<span class="keyword">extern</span> <span class="string">"C"</span> <span class="keyword">void</span> <span class="identifier">BOOST_EXTENSION_EXPORT_DECL</span>
+<span class="identifier">extension_export_plugins</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">::</span><span class="identifier">factory_map</span> <span class="special">&amp;</span> <span class="identifier">fm</span><span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span> <span class="identifier">MSN</span><span class="special">,</span> <span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;</span>
- <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="identifier">MSN_network_parameters</span><span class="special">));</span>
- <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span> <span class="identifier">Jabber</span><span class="special">,</span> <span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;</span>
- <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="identifier">Jabber_network_parameters</span><span class="special">));</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span> <span class="identifier">MSN</span><span class="special">,</span> <span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="identifier">MSN_network_parameters</span><span class="special">));</span>
+ <span class="identifier">fm</span><span class="special">.</span><span class="identifier">add</span><span class="special">&lt;</span> <span class="identifier">Jabber</span><span class="special">,</span> <span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;(</span><span class="keyword">new</span> <span class="identifier">Jabber_network_parameters</span><span class="special">));</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -186,74 +213,105 @@
         
 </p>
 <pre class="programlisting">
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">factory</span><span class="special">&lt;</span> <span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">current_plugin</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">extensions</span><span class="special">;</span>
+
+ <span class="comment">// create the factory_map object - it will hold all of the available
+</span> <span class="comment">// constructors. Multiple factory_maps can be constructed.
+</span> <span class="identifier">factory_map</span> <span class="identifier">fm</span><span class="special">;</span>
+
+ <span class="comment">// load the shared library with
+</span> <span class="identifier">load_single_library</span><span class="special">(</span><span class="identifier">fm</span><span class="special">,</span> <span class="string">"libIMPlugins.extension"</span><span class="special">,</span>
+ <span class="string">"extension_export_plugins"</span><span class="special">);</span>
+
+ <span class="comment">// get a reference to the list of constructors for protocols
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&amp;</span>
+ <span class="identifier">factory_list</span> <span class="special">=</span> <span class="identifier">fm</span><span class="special">.</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Error - the classes were not found."</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;,</span> <span class="identifier">factory</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">current_plugin</span> <span class="special">=</span> <span class="identifier">factory_list</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+
+ <span class="comment">// MSN plugin
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="identifier">MSN_ptr</span><span class="special">(</span><span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">.</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="identifier">msn_parameters</span> <span class="special">=</span>
+ <span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">first</span><span class="special">;</span>
+ <span class="identifier">current_plugin</span><span class="special">++;</span>
+
+ <span class="comment">// Jabber plugin
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="identifier">Jabber_ptr</span><span class="special">(</span><span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">.</span><span class="identifier">create</span><span class="special">());</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="identifier">jabber_parameters</span> <span class="special">=</span>
+ <span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">first</span><span class="special">;</span>
+
+ <span class="comment">// server
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN hostname: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">msn_parameters</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber hostname: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">jabber_parameters</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">()</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// http_mode: note that one of the implementations doesn't support it,
+</span> <span class="comment">// having a base class
+</span> <span class="comment">// and different specific concrete network parameters allow us to handle this
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: "</span><span class="special">;</span>
+ <span class="identifier">msn_parameters</span><span class="special">-&gt;</span><span class="identifier">set_http_mode</span><span class="special">();</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: "</span><span class="special">;</span>
+ <span class="identifier">jabber_parameters</span><span class="special">-&gt;</span><span class="identifier">set_http_mode</span><span class="special">();</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// login
+</span> <span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">login</span><span class="special">(</span><span class="string">"testuser"</span><span class="special">,</span> <span class="string">"testpass"</span><span class="special">);</span>
+ <span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">login</span><span class="special">(</span><span class="string">"testuser"</span><span class="special">,</span> <span class="string">"testpass"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// send message
+</span> <span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">send</span><span class="special">(</span><span class="string">"hi"</span><span class="special">);</span>
+ <span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">send</span><span class="special">(</span><span class="string">"hi"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// change status
+</span> <span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">change_status</span><span class="special">(</span><span class="string">"away"</span><span class="special">);</span>
+ <span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">change_status</span><span class="special">(</span><span class="string">"away"</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="comment">// wait for message
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">receive</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">receive</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
 
-<span class="comment">// MSN plugin
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="identifier">MSN_ptr</span><span class="special">(</span><span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
-<span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="identifier">msn_parameters</span> <span class="special">=</span> <span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">get_info</span><span class="special">();</span>
-<span class="identifier">current_plugin</span><span class="special">++;</span>
-
-<span class="comment">// Jabber plugin
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span><span class="special">&lt;</span><span class="identifier">protocol</span><span class="special">&gt;</span> <span class="identifier">Jabber_ptr</span><span class="special">(</span><span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">create</span><span class="special">());</span>
-<span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span><span class="special">&lt;</span><span class="identifier">network_parameters</span><span class="special">&gt;</span> <span class="identifier">jabber_parameters</span> <span class="special">=</span> <span class="identifier">current_plugin</span><span class="special">-&gt;</span><span class="identifier">get_info</span><span class="special">();</span>
-
-<span class="comment">// server
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN hostname: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">msn_parameters</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber hostname: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">jabber_parameters</span><span class="special">-&gt;</span><span class="identifier">hostname</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// http_mode: note that one of the implementations doesn't support it, having a base class
-</span><span class="comment">// and different specific concrete network parameters allow us to handle this
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"MSN: "</span><span class="special">;</span>
-<span class="identifier">msn_parameters</span><span class="special">-&gt;</span><span class="identifier">set_http_mode</span><span class="special">();</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Jabber: "</span><span class="special">;</span>
-<span class="identifier">jabber_parameters</span><span class="special">-&gt;</span><span class="identifier">set_http_mode</span><span class="special">();</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// login
-</span><span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">login</span><span class="special">(</span><span class="string">"testuser"</span><span class="special">,</span> <span class="string">"testpass"</span><span class="special">);</span>
-<span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">login</span><span class="special">(</span><span class="string">"testuser"</span><span class="special">,</span> <span class="string">"testpass"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// send message
-</span><span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">send</span><span class="special">(</span><span class="string">"hi"</span><span class="special">);</span>
-<span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">send</span><span class="special">(</span><span class="string">"hi"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// change status
-</span><span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">change_status</span><span class="special">(</span><span class="string">"away"</span><span class="special">);</span>
-<span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">change_status</span><span class="special">(</span><span class="string">"away"</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-
-<span class="comment">// wait for message
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">MSN_ptr</span><span class="special">-&gt;</span><span class="identifier">receive</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">Jabber_ptr</span><span class="special">-&gt;</span><span class="identifier">receive</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
 </pre>
 <p>
       </p>
 <p>
         And we get the following output:
       </p>
-<div class="informaltable"><table class="table">
+<div class="informaltable">
+<h4>
+<a name="id934080"></a>
+ </h4>
+<table class="table">
 <colgroup><col></colgroup>
-<tbody><tr><td>
- <p>
- <code class="literal">MSN hostname: msn.messenger.com<br> Jabber hostname: jabber.org<br>
- <br> MSN: http mode set<br> Jabber: http mode not supported<br>
- <br> MSN: Logged In<br> Jabber: Logged In<br> <br> MSN: message
- [hi] sent<br> Jabber: message [hi] sent<br> <br> MSN: Status
- changed to [away]<br> Jabber: Status changed to [away]<br> <br>
- MSN: hello! msg received<br> Jabber: hello! msg received<br>
- </code>
- </p>
- </td></tr></tbody>
-</table></div>
+<tbody><tr><td><code class="literal">MSN hostname: msn.messenger.com<br> Jabber hostname:
+ jabber.org<br> <br> MSN: http mode set<br> Jabber: http mode
+ not supported<br> <br> MSN: Logged In<br> Jabber: Logged In<br>
+ <br> MSN: message [hi] sent<br> Jabber: message [hi] sent<br>
+ <br> MSN: Status changed to [away]<br> Jabber: Status changed to
+ [away]<br> <br> MSN: hello! msg received<br> Jabber: hello! msg
+ received<br> </code></td></tr></tbody>
+</table>
+</div>
 <p>
         The complete code is in the <code class="literal">examples/info/im</code> directory.
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial06.html
==============================================================================
--- sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial06.html (original)
+++ sandbox/libs/extension/doc/html/boost_extension/tutorials/tutorial06.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title> Tutorial 6</title>
 <link rel="stylesheet" href="../../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="../../index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="up" href="../tutorials.html" title="Tutorials">
 <link rel="prev" href="tutorial05.html" title=" Tutorial 5">
@@ -24,12 +24,12 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_extension.tutorials.tutorial06"></a> Tutorial 6</h3></div></div></div>
+<a name="boost_extension.tutorials.tutorial06"></a> Tutorial 6</h3></div></div></div>
 <p>
         Insert content here.
       </p>
 </div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
 <td align="right"><small>Copyright © 2007 Jeremy Pack, Mariano G. Consoni</small></td>
 </tr></table>

Modified: sandbox/libs/extension/doc/html/index.html
==============================================================================
--- sandbox/libs/extension/doc/html/index.html (original)
+++ sandbox/libs/extension/doc/html/index.html 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <title>Chapter 1. Boost.Extension 1.0</title>
 <link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.67.2">
 <link rel="start" href="index.html" title="Chapter 1. Boost.Extension 1.0">
 <link rel="next" href="boost_extension/introduction.html" title=" Introduction">
 </head>
@@ -24,7 +24,7 @@
 <a name="boost_extension"></a>Chapter 1. Boost.Extension 1.0</h2></div>
 <div><p class="copyright">Copyright © 2007 Jeremy Pack, Mariano G. Consoni</p></div>
 <div><div class="legalnotice">
-<a name="id2555061"></a><p>
+<a name="id903092"></a><p>
         Distributed under the Boost Software License, Version 1.0. (See accompanying
         file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       </p>
@@ -49,16 +49,15 @@
 <dt><span class="section"> Performance Analysis</span></dt>
 <dt><span class="section"> Appendices</span></dt>
 <dd><dl>
-<dt><span class="section"><a href="boost_extension/appendices/appendix_a.html"> Appendix A -
- Windows Export and Import Declarations</a></span></dt>
-<dt><span class="section"><a href="boost_extension/appendices/appendix_b.html"> Appendix B -
- Optional Dependencies</a></span></dt>
+<dt><span class="section"> Appendix A - Windows Export and Import Declarations</span></dt>
+<dt><span class="section"> Appendix B - Optional Dependencies</span></dt>
+<dt><span class="section"> Appendix C - OS X Shared Libraries</span></dt>
 </dl></dd>
 </dl>
 </div>
 </div>
-<table width="100%"><tr>
-<td align="left"><p><small>Last revised: April 30, 2007 at 12:00:00 GMT</small></p></td>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: September 15, 2007 at 9:05:00 GMT</small></p></td>
 <td align="right"><small></small></td>
 </tr></table>
 <hr>

Modified: sandbox/libs/extension/doc/info.qbk
==============================================================================
--- sandbox/libs/extension/doc/info.qbk (original)
+++ sandbox/libs/extension/doc/info.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -9,18 +9,23 @@
 
 In this section we explain how to use Info classes in Boost.Extension.
 
-Info classes is a mechanism that allows you to store important information of each implementation. The
-type and utility of this information is arbitrary as the Info class is a template argument of the factories where
-the user registers its own implementations, and for that reason any kind of information could be stored.
+Info classes is a mechanism that allows you to store important information of
+each implementation. The type and utility of this information is arbitrary as
+the Info class is a template argument of the factories where the user registers
+its own implementations, and for that reason any kind of information could be
+stored.
 
-Let's see how can we use it with an example first and then we will be able to summarize the concepts.
+Let's see how can we use it with an example first and then we will be able to
+summarize the concepts.
 
 Surely you remember our very first example, that of course it's called
-HelloWorld. Well, let's imagine that we now want a multi-language Hello World. Of course there are better ways of
-designing it, but as we want to picture how the Info class could be used we'll take this approach.
-
-First, we define an implementation of the =word= interface for each combination of word and language. Then we
-have for example the class =monde= that implements the =word= interface for the french language in this case.
+HelloWorld. Well, let's imagine that we now want a multi-language Hello World.
+Of course there are better ways of designing it, but as we want to picture how
+the Info class could be used we'll take this approach.
+
+First, we define an implementation of the =word= interface for each combination
+of word and language. Then we have for example the class =monde= that implements
+the `word` interface for the french language in this case.
 
 Let's see the code:
 
@@ -95,42 +100,59 @@
                 : language(language), english_translation(english_translation) {}
 };
 ``
+We also need a less-than operator for this class, so it can be used as a map key.
+``
+inline bool operator<(const word_description & first,
+ const word_description & second) {
+ return first.language < second.language ||
+ (first.language == second.language &&
+ first.english_translation < second.english_translation);
+}
+``
 
 Finally, just store a =word_description= instance when adding the words to the factory map, describing the original
 word and the language:
 
 ``
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_multilanguage_word(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_multilanguage_word(boost::extensions::factory_map & fm)
 {
- fm.add<hola, word, word_description>(word_description("spanish", "hello"));
- fm.add<mundo, word, word_description>(word_description("spanish", "world!"));
-
- fm.add<bonjour, word, word_description>(word_description("french", "hello"));
- fm.add<monde, word, word_description>(word_description("french", "world!"));
-
- fm.add<buonasera, word, word_description>(word_description("italian", "hello"));
- fm.add<mondo, word, word_description>(word_description("italian", "world!"));
-
- fm.add<hello, word, word_description>(word_description("english", "hello"));
- fm.add<world, word, word_description>(word_description("english", "world!"));
+ fm.get<word, word_description>()[word_description("spanish", "hello")]
+ .set<hola>();
+ fm.get<word, word_description>()[word_description("spanish", "world!")]
+ .set<mundo>();
+
+ fm.get<word, word_description>()[word_description("french", "hello")]
+ .set<bonjour>();
+ fm.get<word, word_description>()[word_description("french", "world!")]
+ .set<monde>();
+ fm.get<word, word_description>()[word_description("italian", "hello")]
+ .set<buonasera>();
+ fm.get<word, word_description>()[word_description("italian", "world!")]
+ .set<mondo>();
+ fm.get<word, word_description>()[word_description("english", "hello")]
+ .set<hello>();
+ fm.get<word, word_description>()[word_description("english", "world!")]
+ .set<world>();
 }
-``
 
-In the code we could see that add argument is a Info class instance. In this case is =word_description=
-which receives the language and word as arguments.
+``
 
-Now we could start using that information in the main code. Retrieving Info class is easy, you should just call
-=get_info()= method of the factory.
+Now we could start using that information in the main code. Retrieving the `Info`
+instance for a factory is simple, since it is part of the `std::pair` in the
+map of factories.
 
 Let's see some code using the multilanguage hello world words:
 
 ``
- for (std::list<factory<word, word_description> >::iterator current_word = factory_list.begin();
- current_word != factory_list.end(); ++current_word)
- {
- std::auto_ptr<word> word_ptr(current_word->create());
- std::cout << word_ptr->get_val() << " is " << current_word->get_info().english_translation
- << " in " << current_word->get_info().language << std::endl;
+ for (std::map<word_description, factory<word> >::iterator current_word =
+ factory_list.begin(); current_word != factory_list.end();
+ ++current_word) {
+ std::auto_ptr<word> word_ptr(current_word->second.create());
+ std::cout << word_ptr->get_val() << " is "
+ << current_word->first.english_translation
+ << " in " << current_word->first.language
+ << std::endl;
   }
   std::cout << std::endl;
 ``

Modified: sandbox/libs/extension/doc/introduction.qbk
==============================================================================
--- sandbox/libs/extension/doc/introduction.qbk (original)
+++ sandbox/libs/extension/doc/introduction.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -6,25 +6,19 @@
 [/ See http://www.boost.org/ for latest version. ]
 
 [section:introduction Introduction]
-Wrappers for loading classes from linked libraries to extend the functionality
-of a program. Created to ease the creation of plugins.
 
 The Boost.Extension library has been developed to ease the development of
 plugins and similar extensions to software. Classes can be made available from
-linked libraries and loaded automatically by the application.
+shared libraries and loaded by the application.
         
-The documentation is completely incomplete. Sorry. Look at tutorial #1 for
-examples of basic usage, and tutorial #2 for examples of advanced usage.
+The documentation is mostly complete.
   
 Note the following:
 
-
-
-# Multiple and virtual inheritance are supported
-# No macros are currently used (besides those required by Windows for exported functions)
-# Only one external function required per shared library to export classes
-# RTTI is used by default, but it is possible to use user-defined type identifications.
-# Classes do not need to be modified to be loadable
-
+* Multiple and virtual inheritance are supported
+* Library users do not need to use any macros (besides those required by Windows for exported functions)
+* Only one external function required per shared library to export classes
+* RTTI is used by default, but it is possible to use user-defined type identification
+* Classes do not need to be modified to be loadable
 
 [endsect]

Modified: sandbox/libs/extension/doc/shared_libraries.qbk
==============================================================================
--- sandbox/libs/extension/doc/shared_libraries.qbk (original)
+++ sandbox/libs/extension/doc/shared_libraries.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -7,6 +7,49 @@
 
 [section:shared_libraries Shared Libraries]
 
-Content not yet created.
+A `shared_library` refers to a loadable module, the type of which depends
+on the platform:
+
+* Windows: .dll
+* Most Linux or Unix: .so
+* Mac OS X: .dylib or .bundle (See [link appendix_c Appendix C])
+
+
+[h4 `shared_library(const char * location, bool auto_close = false)`]
+`location` is the relative path of the shared library to laod, and
+`auto_close` sets whether or not the library will be automatically
+closed when the `shared_library` is destroyed. This function does
+not open the library.
+
+[h4 `bool open()`]
+Returns true if the library is opened successfully.
+
+[h4 `bool is_open()`]
+Returns true if the library is open.
+
+[h4 `void close()`]
+Close the library. Note that an OS specific shared library usually keeps a
+reference count, meaning that calling this function will just decrease the
+reference count. If the reference count drops to 0, the library will be
+ready to actually closed - though the platform is not required to actually
+close the library even then. As such, this function can sometimes give a
+performance boost, by freeing up RAM, but will often do nothing.
+[h4 `ReturnValue (*get(const char * name))(ARGS)`]
+This function returns a pointer to a function in a dll with `name`. Note
+that a C++ function needs to have `extern "C"` before it in order for this
+to work. To get a function like this:
+``
+extern "C"
+int get_value(const char * name) {
+ return 0;
+}
+``
+You would call:
+``
+mySharedLibrary.get<int, const char *>("get_value");
+``
+[note
+It is recommended that you use Boost.Function to capture the return values
+of `get`, but not required.]
 
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/tutorial1.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorial1.qbk (original)
+++ sandbox/libs/extension/doc/tutorial1.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -8,7 +8,8 @@
 
 [section:tutorial01 Tutorial 1]
 
-Create a class that we will later subclass and put it into a header file called word.hpp.
+Create a class that we will later subclass and put it into a header file called
+word.hpp.
 ``
 class word
 {
@@ -17,9 +18,13 @@
   virtual const char * get_val(){return "";}
 };
 ``
-This file will be included by both the shared library in which classes implement this interface, and in the executable that will load these implementations. The destructor ought to be virtual, just to ensure proper deletion. We create one virtual function. We could actually add data to this class as well.
+This file will be included by both the shared library in which classes implement
+this interface, and in the executable that will load these implementations. The
+destructor ought to be virtual, just to ensure proper deletion. We create one
+virtual function. We could actually add data to this class as well.
 
-Now create a file called hello_world.cpp. This will be compiled into a shared library:
+Now create a file called hello_world.cpp. This will be compiled into a shared
+library:
 
 ``
 #include "word.hpp"
@@ -36,17 +41,31 @@
   virtual const char * get_val(){return "hello";}
 };
 ``
-Now we have two classes that are derived from word, and that both implement the virtual function get_val. All that's left is to declare them for exporting. Normally, we just put one function in the entire shared library that exports all exportable classes in the library.
+Now we have two classes that are derived from word, and that both implement the
+virtual function get_val. All that's left is to declare them for exporting.
+Normally, we just put one function in the entire shared library that exports
+all exportable classes in the library.
 ``
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_word(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_word(boost::extensions::factory_map & fm)
 {
- fm.add<hello, word, int>(1);
- fm.add<world, word, int>(2);
+ fm.get<word, int>()[1].set<hello>();
+ fm.get<word, int>()[2].set<world>();
 }
 ``
-`extern "C"` is required to keep the function name from being mangled. `BOOST_EXTENSION_EXPORT_DECL` is only necessary on Windows - on other platforms it does nothing. On Windows, it declares that the function should be exported. This is the default in shared libraries on other platforms.
-
-The `factory_map::add` function takes three template arguments: the class to export, the interface that it is being exported as, and what type of info is used to identify it (which can be an arbitrary type). The argument is the value for that identification info.
+`extern "C"` is required to keep the function name from being mangled.
+`BOOST_EXTENSION_EXPORT_DECL` is only necessary on Windows - on other platforms
+it does nothing. On Windows, it declares that the function should be exported.
+This is the default in shared libraries on other platforms.
+
+The `factory_map::get` function takes two template arguments: the type of
+factory to get (the interface returned by it), and what type of info is used
+to identify it (which can be an arbitrary type).
+
+This returns a `std::map`, in this case, `std::map<int, factory<word> >`.
+We then index the map to find (and perhaps create) the appropriate factory,
+and set the type of class it instantiates to the template argument of the
+`set` function. The argument is the value for that identification info.
 
 Now we can write the executable.
 
@@ -63,14 +82,15 @@
   // constructors. Multiple factory_maps can be constructed.
   factory_map fm;
   // load the shared library with
- load_single_library(fm, "libHelloWorldLib.extension", "extension_export_word");
+ load_single_library(fm, "libHelloWorldLib.extension",
+ "extension_export_word");
   // Get a reference to the list of constructors for words.
   std::list<factory<word, int> > & factory_list = fm.get<word, int>();
   if (factory_list.size() < 2)
     std::cout << "Error - the classes were not found.";
- for (std::list<factory<word, int> >::iterator current_word = factory_list.begin();
- current_word != factory_list.end(); ++current_word)
- {
+ for (std::list<factory<word, int> >::iterator current_word =
+ factory_list.begin(); current_word != factory_list.end();
+ ++current_word) {
     // Using auto_ptr to avoid needing delete. Using smart_ptrs is recommended.
     // Note that this has a zero argument constructor - currently constructors
     // with up to six arguments can be used.
@@ -81,7 +101,10 @@
   return 0;
 }
 ``
-Now we just need to write the build file. You may have noticed above that the name of the library is assumed to be libHelloWorld.extension - we'll need to rename whatever shared library is compiled to that. Boost.Build can do this automatically.
+Now we just need to write the build file. You may have noticed above that the
+name of the library is assumed to be libHelloWorld.extension - we'll need to
+rename whatever shared library is compiled to that. Boost.Build can do this
+automatically.
 
 ``
 import type : change-generated-target-suffix ;
@@ -102,5 +125,6 @@
 lib HelloWorldLib : hello_world.cpp : <link>shared ;
 install ../bin : HelloWorld HelloWorldLib ;
 ``
-If you use another build system, you'll need to make sure that the output shared library (dll, so, dylib etc.) is renamed correctly.
+If you use another build system, you'll need to make sure that the output
+shared library (dll, so, dylib etc.) is renamed correctly.
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/tutorial2.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorial2.qbk (original)
+++ sandbox/libs/extension/doc/tutorial2.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -8,8 +8,9 @@
 [section:tutorial02 Tutorial 2]
 
 This tutorial shows more advanced class loading. The example described here is
-contrived, and such a convoluted design is not used as an example of good object-oriented
-program, but as a way to illustrate some of the possibilities with this library.
+contrived, and such a convoluted design is not used as an example of good
+object-oriented program, but as a way to illustrate some of the possibilities
+with this library.
 
 Let's design a class hierarchy based on the following:
 
@@ -23,15 +24,16 @@
 * A car_of_the_future is a flying_car, a boat, and a computer.
 
 
-In addition, we are not going to have any of these classes be interfaces. They will each
-have an implementation in a .cpp file. This will require multiple inheritance, as well
-as virtual inheritance (because otherwise a car_of_the_future would consist of three
-separate vehicle base classes!).
+In addition, we are not going to have any of these classes be interfaces. They
+will each have an implementation in a .cpp file. This will require multiple
+inheritance, as well as virtual inheritance (because otherwise a
+car_of_the_future would consist of three separate vehicle base classes!).
 
 
-In addition, each class will be compiled into a separate shared library. This is not
-necessary, certainly, but will serve to illustrate some of the more advanced capabilities
-of the library, as well as some of the techniques necessary in this situation.
+In addition, each class will be compiled into a separate shared library. This
+is not necessary, certainly, but will serve to illustrate some of the more
+advanced capabilities of the library, as well as some of the techniques
+necessary in this situation.
 
 
 To begin with, let's look at the Jamfile:
@@ -45,8 +47,8 @@
 ``
 
 
-First we must rename the generated libraries (this is required for cross-platform use -
-but the prefix and suffix are arbitrary).
+First we must rename the generated libraries (this is required for
+cross-platform use - but the prefix and suffix are arbitrary).
 
 
 ``
@@ -55,17 +57,19 @@
 ``
 
 
-Notice here that the Car library is linked to the Vehicle library - this is necessary
-because the Car class needs the implementation of the Vehicle class. This is unrelated
-to the Boost.Extension library, but just a standard requirement when inheriting from
-shared library classes. The same will be done with the other shared libraries.
+Notice here that the Car library is linked to the Vehicle library - this is
+necessary because the Car class needs the implementation of the Vehicle class.
+This is unrelated to the Boost.Extension library, but just a standard
+requirement when inheriting from shared library classes. The same will be done
+with the other shared libraries.
 
 
 ``
 lib Plane : multiple_inheritance/plane.cpp Vehicle : <link>shared ;
 lib Boat : multiple_inheritance/boat.cpp Vehicle : <link>shared ;
 lib Computer : multiple_inheritance/computer.cpp : <link>shared ;
-lib FlyingCar : multiple_inheritance/flying_car.cpp Plane Car Vehicle : <link>shared ;
+lib FlyingCar : multiple_inheritance/flying_car.cpp Plane Car Vehicle
+ : <link>shared ;
 lib CarOfTheFuture :
   multiple_inheritance/car_of_the_future.cpp
   Plane Car Vehicle
@@ -82,13 +86,14 @@
 ``
 
 
-Refer to the examples/multiple_inheritance folder for the source code of these classes. Only
-the most complex will be described here - the rest are similar.
+Refer to the examples/multiple_inheritance folder for the source code of these
+classes. Only the most complex will be described here - the rest are similar.
 
 
-On the Windows platform, there are special declarations that are required when a dll must use a class
-that is defined in another dll. For interface only classes this is unnecessary, and is not needed on
-other platforms. The macros BOOST_EXTENSION_IMPORT_DECL and BOOST_EXTENSION_EXPORT_DECL can be used
+On the Windows platform, there are special declarations that are required when
+a dll must use a class that is defined in another dll. For interface only
+classes this is unnecessary, and is not needed on other platforms. The macros
+BOOST_EXTENSION_IMPORT_DECL and BOOST_EXTENSION_EXPORT_DECL can be used
 to insert the proper declaration. This is detailed in the appendix.
 
 

Modified: sandbox/libs/extension/doc/tutorial3.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorial3.qbk (original)
+++ sandbox/libs/extension/doc/tutorial3.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -8,25 +8,31 @@
 
 [section:tutorial03 Tutorial 3]
 
-This tutorial shows how to register and instance classes that have multi-argument constructors (not default constructors)
-in Boost.Extension. In the example that we will describe in this tutorial (examples/parameters) we create a dummy class
-with a constructor that have six arguments. We'll register this class in a factory map and then get it from the main file.
-
-It is expected that before following this tutorial you have gone trough the first tutorial at least, and you are
-familiar with the basic use of Boost.Extension
-
-
-Let's start defining our class. Its constructor receives six parameters (we chose that number because it's the current argument limit of
-the library), each one of a different type including a class defined in the interface (class A) and a smart pointer to this class. It
-shows via stdout the received parameters at construction.
+This tutorial shows how to register and instantiate classes that have
+multi-argument constructors (not default constructors) in Boost.Extension.
+In the example that we will describe in this tutorial (examples/parameters)
+we create a dummy class with a constructor that have six arguments. We'll
+register this class in a factory map and then get it from the main file.
+
+It is expected that before following this tutorial you have gone trough the
+first tutorial at least, and you are familiar with the basic use of
+Boost.Extension.
+
+
+Let's start defining our class. Its constructor receives six parameters (we
+chose that number because it's the default argument limit of the library),
+each one of a different type including a class defined in the interface
+(class A) and a smart pointer to this class. It shows via stdout the received
+parameters at construction.
 
 
 ``
 class six_parameters : public lots_of_parameters_interface
 {
   public:
- six_parameters(bool b, unsigned int i, char c, std::string s, A a, boost::shared_ptr<A> ptr_a)
- lots_of_parameters_interface(b, i, c, s, a, ptr_a)
+ six_parameters(bool b, unsigned int i, char c, std::string s, A a,
+ boost::shared_ptr<A> ptr_a)
+ lots_of_parameters_interface(b, i, c, s, a, ptr_a)
     {
       std::cout << "Constructor called." << std::endl << std::endl;
       std::cout << "Parameters:" << std::endl;
@@ -43,7 +49,8 @@
 };
 ``
 \n
-The interface that we are inheriting is just the bare minimum needed to make it compile:
+The interface that we are inheriting is just the bare minimum needed to make it
+compile:
 
 ``
 class A
@@ -57,19 +64,25 @@
 class lots_of_parameters_interface
 {
   public:
- lots_of_parameters_interface(bool b, unsigned int i, char c, std::string s, A a, boost::shared_ptr<A> ptr_a) {}
+ lots_of_parameters_interface(bool b, unsigned int i, char c,
+ std::string s, A a,
+ boost::shared_ptr<A> ptr_a) {}
     virtual ~lots_of_parameters_interface(void) {}
 };
 ``
 \n
-Having the class defined, we should write the export function to register the class in the passed factory map. The point here
-is that the factory_map::add method must be set with the first type as the third argument, and with the second type as the fourth argument
-and so on.
+Having the class defined, we should write the export function to register the
+class in the passed factory map. The point here is that the factory_map::add
+method must be set with the first type as the third argument, and with the
+second type as the fourth argument and so on.
 
 ``
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export(boost::extensions::factory_map & fm)
 {
- fm.add< six_parameters, lots_of_parameters_interface, int, bool, unsigned int, char, std::string, A, boost::shared_ptr<A> >(6);
+ fm.get<lots_of_parameters_interface, int, bool,
+ unsigned int, char, std::string, A,
+ boost::shared_ptr<A> >()[6].set<six_parameters>();
 }
 ``
 \n
@@ -87,15 +100,22 @@
   // load the shared library with
   load_single_library(fm, "libParametersLib.extension", "extension_export");
 
- std::list<factory<lots_of_parameters_interface, int, bool, unsigned int, char, std::string, A, boost::shared_ptr<A> > > & factory_list =
- fm.get<lots_of_parameters_interface, int, bool, unsigned int, char, std::string, A, boost::shared_ptr<A> >();
+ std::map<int, factory<lots_of_parameters_interface, bool, unsigned int,
+ char, std::string, A, boost::shared_ptr<A> > > &
+ factory_list =
+ fm.get<lots_of_parameters_interface, int, bool, unsigned int, char,
+ std::string, A, boost::shared_ptr<A> >();
   if (factory_list.size() != 1) {
     std::cout << "Error - the class was not found.";
     return 1;
   }
 
- std::list< factory<lots_of_parameters_interface, int, bool, unsigned int, char, std::string, A, boost::shared_ptr<A> > >::iterator par = factory_list.begin();
- std::auto_ptr< lots_of_parameters_interface > par_ptr(par->create(true, 4, 'c', "test", A(2), boost::shared_ptr<A>(new A(15))));
+ std::map<int, factory<lots_of_parameters_interface, bool, unsigned int,
+ char, std::string, A, boost::shared_ptr<A> > >
+ ::iterator par = factory_list.begin();
+ std::auto_ptr<lots_of_parameters_interface>
+ par_ptr(par->create(true, 4, 'c', "test", A(2),
+ boost::shared_ptr<A>(new A(15))));
 
   return 0;
 }
@@ -109,7 +129,7 @@
 
 \n
 
-It is expected that at this point you can create your own classes with multi-argument constructors and use them via
-Boost.extensions without problems.
+It is expected that at this point you can create your own classes with
+multi-argument constructors and use them via Boost.extensions without problems.
 
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/tutorial4.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorial4.qbk (original)
+++ sandbox/libs/extension/doc/tutorial4.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -8,15 +8,19 @@
 [section:tutorial04 Tutorial 4]
 
 
-In this tutorial we will see different features of the library related to multiple loading of the same library, instance or interface.
+In this tutorial we will see different features of the library related to
+multiple loading of the same library, instance or interface.
 
-We will follow some parts of versions example ([^examples\/versioning]). As we expect that at this point you've gone through
-the first tutorials we will not enter into specific details of the use of the library.
+We will follow some parts of versions example ([^examples\/versioning]).
+As we expect that at this point you've gone through the first tutorials we
+will not enter into specific details of the use of the library.
+
+First, we want to show that it is possible to load several libraries into one
+factory map. We'll create a new HelloWorld library very similar to the one
+that we have described in the first tutorial.
 
-First, we want to show that it is possible to load several libraries into one factory map. We'll create a new HelloWorld library
-very similar to the one that we have described in the first tutorial.
-
-Let's remember the classes that we have implemented (in [^hello_world.cpp]) for the "hello world" example:
+Let's remember the classes that we have implemented (in [^hello_world.cpp])
+for the "hello world" example:
 
 ``
 class world : public word
@@ -31,16 +35,19 @@
   virtual const char * get_val(){return "hello";}
 };
 
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_word(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_word(boost::extensions::factory_map & fm)
 {
- fm.add<hello, word, int>(1);
- fm.add<world, word, int>(2);
+ fm.get<word, int>()[1].set<hello>();
+ fm.get<word, int>()[2].set<world>();
 }
 ``
 
-And now let's see the new version that we've implemented for this example (as defined in [^hello_world_versions.cpp]). The
-classes have the same name and methods, both implement the same interface, but the `get_val()` methods differ in the
-returned string (to be able to recognize each one after loading them).
+And now let's see the new version that we've implemented for this example
+(as defined in [^hello_world_versions.cpp]). The classes have the same name
+and methods, both implement the same interface, but the `get_val()` methods
+differ in the returned string (to be able to recognize each one after loading
+them).
 
 ``
 class world : public word
@@ -55,39 +62,46 @@
   virtual const char * get_val(){return "| v2 hello";}
 };
 
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_word(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_word(boost::extensions::factory_map & fm)
 {
- fm.add<world, word, int>(22); // int could be used as version (v2 word 2)
- fm.add<hello, word, int>(21); // int could be used as version (v2 word 1)
+ fm.get<word, int>()[22].set<world>();
+ // int could be used as version (v2 word 2)
+ fm.get<word, int>()[21].set<hello>();
+ // int could be used as version (v2 word 1)
 }
 ``
 
 
-Also note that we are using the Info int to store some kind of "version", and then we could differentiate the classes
-by its int (see Info class tutorial for more information on this).
+Also note that we are using the Info int to store some kind of "version",
+and then we could differentiate the classes by its int (see Info class
+tutorial for more information on this).
 
 ``
         factory_map fm;
 
         // load hello world first version
- load_single_library(fm, "libHelloWorldLib.extension", "extension_export_word");
+ load_single_library(fm, "libHelloWorldLib.extension",
+ "extension_export_word");
 
         // load hello world second version
- load_single_library(fm, "libHelloWorldLibv2.extension", "extension_export_word");
+ load_single_library(fm, "libHelloWorldLibv2.extension",
+ "extension_export_word");
 
         // load hello world second version again
- load_single_library(fm, "libHelloWorldLibv2.extension", "extension_export_word");
+ load_single_library(fm, "libHelloWorldLibv2.extension",
+ "extension_export_word");
 ``
 
-We can see here that loading multiple libraries is as easy as calling `load_single_library` for each one and
-using the same factory map.
+We can see here that loading multiple libraries is as easy as calling
+`load_single_library` for each one and using the same factory map.
 
 Then you can access them as any other factory_map:
 
 ``
- for(std::list<factory<word, int> >::iterator current_word = factory_list.begin();
- current_word != factory_list.end(); ++current_word)
- {
+ for(std::list<factory<word, int> >::iterator current_word =
+ factory_list.begin(); current_word != factory_list.end();
+ ++current_word) {
     std::auto_ptr<word> word_ptr(current_word->create());
     std::cout << word_ptr->get_val() << " ";
   }
@@ -100,10 +114,12 @@
 [^hello world! | v2 hello world! v2 | v2 hello world! v2]]]]
 
 
-The first "hello world" is returned by the first version of the library, and the second and third returned by the second version.
+The first "hello world" is returned by the first version of the library,
+and the second and third returned by the second version.
 
-Finally, we will show another example similar to the former but in this case we implement a different interface, same class
-name ('hello') but with different interface ('salute').
+Finally, we will show another example similar to the former but in this case
+we implement a different interface, same class name ('hello') but with
+different interface ('salute').
 
 Let's see the interface:
 
@@ -132,31 +148,36 @@
 };
 
 
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_salute(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_salute(boost::extensions::factory_map & fm)
 {
- fm.add<hello, salute, int>(1);
- fm.add<bye, salute, int>(2);
+ fm.get<salute, int>()[1].set<hello>();
+ fm.get<salute, int>()[2].set<bye>();
 }
 ``
 
-Note that we are adding a new class called 'hello' too but that implements 'salute' interface.
+Note that we are adding a new class called 'hello' too but that implements
+'salute' interface.
 
 \n
 
-Finally in the main function we get the factory list specifying that we want the 'salute' factory. We
-iterate it getting each of the salutes, including hello.
+Finally in the main function we get the factory list specifying that we want
+the 'salute' factory. We iterate it getting each of the salutes, including
+hello.
 
 ``
- std::list<factory<salute, int> > & salute_factory_list = fm.get<salute, int>();
-
- std::cout << "salutes: " << std::endl;
- for (std::list<factory<salute, int> >::iterator current_salute = salute_factory_list.begin();
- current_salute != salute_factory_list.end(); ++current_salute)
- {
- std::auto_ptr<salute> salute_ptr(current_salute->create());
- std::cout << salute_ptr->say() << " ";
- }
- std::cout << std::endl;
+std::map<int, factory<salute> > & salute_factory_list =
+ fm.get<salute, int>();
+
+std::cout << "salutes: " << std::endl;
+for (std::map<int, factory<salute> >::iterator current_salute =
+ salute_factory_list.begin();
+ current_salute != salute_factory_list.end();
+ ++current_salute) {
+ std::auto_ptr<salute> salute_ptr(current_salute->second.create());
+ std::cout << salute_ptr->say() << " ";
+}
+std::cout << std::endl;
 ``
 
 The output is:
@@ -166,7 +187,8 @@
 =hello bye!=]]]
 
 
-In conclusion, with Boost.Extension we can implement the same class in different libraries, the same class for different interfaces and
+In conclusion, with Boost.Extension we can implement the same class in
+different libraries, the same class for different interfaces and
 load multiple libraries into the same factory.
 
 [endsect]
\ No newline at end of file

Modified: sandbox/libs/extension/doc/tutorial5.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorial5.qbk (original)
+++ sandbox/libs/extension/doc/tutorial5.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -7,11 +7,13 @@
 
 [section:tutorial05 Tutorial 5]
 
-In this tutorial we will describe an advanced example using the Info class. The basics of Info classes are explained
-in the specific section. We expect that you've gone through that section before following this example.
-
-Let's imagine that we are implementing an multi-protocol instant messaging client. Of course we want to support the
-maximum quantity of protocols, and it would be great if 3rd party programmers can implement new protocols and can add
+In this tutorial we will describe an advanced example using the Info class. The
+basics of Info classes are explained in the specific section. We expect that
+you've gone through that section before following this example.
+
+Let's imagine that we are implementing an multi-protocol instant messaging
+client. Of course we want to support the maximum quantity of protocols, and it
+would be great if 3rd party programmers can implement new protocols and can add
 them dynamically.
 
 So let's define an interface for the protocols, with the expected operations:
@@ -37,38 +39,53 @@
 class MSN : public protocol
 {
 public:
- virtual void login(const std::string &user, const std::string &pass) { std::cout << "MSN: Logged In" << std::endl; }
- virtual void send(const std::string &msg) { std::cout << "MSN: message [" << msg << "] sent" << std::endl; }
- virtual std::string receive(void) { return std::string("MSN: hello! msg received"); }
- virtual void change_status(const std::string &new_status)
- {
- std::cout << "MSN: Status changed to [" << new_status << "]" << std::endl;
- }
+ virtual void login(const std::string &user, const std::string &pass) {
+ std::cout << "MSN: Logged In" << std::endl;
+ }
+ virtual void send(const std::string &msg) {
+ std::cout << "MSN: message [" << msg << "] sent" << std::endl;
+ }
+ virtual std::string receive(void) {
+ return std::string("MSN: hello! msg received");
+ }
+ virtual void change_status(const std::string &new_status) {
+ std::cout << "MSN: Status changed to [" << new_status << "]"
+ << std::endl;
+ }
 
- virtual ~MSN(void) {}
+ virtual ~MSN(void) {}
 };
 
 // Jabber protocol implementation
 class Jabber : public protocol
 {
 public:
- virtual void login(const std::string &user, const std::string &pass) { std::cout << "Jabber: Logged In" << std::endl; }
- virtual void send(const std::string &msg) { std::cout << "Jabber: message [" << msg << "] sent" << std::endl; }
- virtual std::string receive(void) { return std::string("Jabber: hello! msg received"); }
- virtual void change_status(const std::string &new_status)
- {
- std::cout << "Jabber: Status changed to [" << new_status << "]" << std::endl;
- }
+ virtual void login(const std::string &user, const std::string &pass) {
+ std::cout << "Jabber: Logged In" << std::endl;
+ }
+ virtual void send(const std::string &msg) {
+ std::cout << "Jabber: message [" << msg << "] sent" << std::endl;
+ }
+ virtual std::string receive(void) {
+ return std::string("Jabber: hello! msg received");
+ }
+ virtual void change_status(const std::string &new_status) {
+ std::cout << "Jabber: Status changed to [" << new_status << "]"
+ << std::endl;
+ }
 
- virtual ~Jabber(void) {}
+ virtual ~Jabber(void) {}
 };
 ``
 
-Apart from that we need some protocol information like the server address, port or modes. This data is needed for each protocol and
-each protocol maybe could have different implementations with different servers or ports.
-
-Of course our Info class is a perfect solution to store this data. But in this case as the information is needed for each protocol we could
-define a base class as the info class and then implement specific versions for each protocol (at least one, could be more for each protocol).
+Apart from that we need some protocol information like the server address, port
+or modes. This data is needed for each protocol and each protocol maybe could
+have different implementations with different servers or ports.
+
+Of course our Info class is a perfect solution to store this data. But in this
+case as the information is needed for each protocol we could define a base
+class as the info class and then implement specific versions for each protocol
+(at least one, could be more for each protocol).
 
 So let's define the base class:
 
@@ -95,7 +112,8 @@
   virtual std::string hostname(void) { return "msn.messenger.com"; }
   virtual std::string port(void) { return "1863"; }
 
- virtual void set_http_mode(void) { std::cout << "http mode set" << std::endl; }
+ virtual void set_http_mode(void) { std::cout << "http mode set"
+ << std::endl; }
 
   virtual ~MSN_network_parameters() {}
 };
@@ -108,17 +126,29 @@
   virtual std::string hostname(void) { return "jabber.org"; }
   virtual std::string port(void) { return "7063"; }
 
- virtual void set_http_mode(void) { std::cout << "http mode not supported" << std::endl; }
+ virtual void set_http_mode(void) { std::cout << "http mode not supported"
+ << std::endl; }
 
   virtual ~Jabber_network_parameters() {}
 };
 ``
-
-Now we can define our Info class as a smart pointer to the =network_parameters= class and
-register it in the factory map:
+We want to be able to compare smart pointers to `network_parameters`:
+``
+inline bool operator<(const boost::shared_ptr<network_parameters> & first,
+ const boost::shared_ptr<network_parameters> & second) {
+ int comp = strcmp(first->hostname(), second->hostname());
+ if (!comp) {
+ return strcmp(first->port(), second->port()) < 0;
+ }
+ else return comp < 0;
+}
+``
+Now we can define our Info class as a smart pointer to the `network_parameters`
+class and register it in the factory map:
 
 ``
-extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_plugins(boost::extensions::factory_map & fm)
+extern "C" void BOOST_EXTENSION_EXPORT_DECL
+extension_export_plugins(boost::extensions::factory_map & fm)
 {
         fm.add< MSN, protocol, boost::shared_ptr<network_parameters> >
                 (boost::shared_ptr<network_parameters>(new MSN_network_parameters));
@@ -130,49 +160,79 @@
 Finally let's use our implementation for an hypothetical connection:
 
 ``
- std::list<factory< protocol, boost::shared_ptr<network_parameters> > >::iterator current_plugin = factory_list.begin();
+int main(void)
+{
+ using namespace boost::extensions;
+
+ // create the factory_map object - it will hold all of the available
+ // constructors. Multiple factory_maps can be constructed.
+ factory_map fm;
+
+ // load the shared library with
+ load_single_library(fm, "libIMPlugins.extension",
+ "extension_export_plugins");
+
+ // get a reference to the list of constructors for protocols
+ std::map<boost::shared_ptr<network_parameters>, factory<protocol> > &
+ factory_list = fm.get<protocol, boost::shared_ptr<network_parameters> >();
+
+ if (factory_list.size() < 2) {
+ std::cout << "Error - the classes were not found.";
+ return 1;
+ }
+
+ std::map<boost::shared_ptr<network_parameters>, factory<protocol> >
+ ::iterator current_plugin = factory_list.begin();
+
+ // MSN plugin
+ std::auto_ptr<protocol> MSN_ptr(current_plugin->second.create());
+ boost::shared_ptr<network_parameters> msn_parameters =
+ current_plugin->first;
+ current_plugin++;
+
+ // Jabber plugin
+ std::auto_ptr<protocol> Jabber_ptr(current_plugin->second.create());
+ boost::shared_ptr<network_parameters> jabber_parameters =
+ current_plugin->first;
+
+ // server
+ std::cout << "MSN hostname: " << msn_parameters->hostname() << std::endl;
+ std::cout << "Jabber hostname: " << jabber_parameters->hostname()
+ << std::endl;
+ std::cout << std::endl;
+
+ // http_mode: note that one of the implementations doesn't support it,
+ // having a base class
+ // and different specific concrete network parameters allow us to handle this
+ std::cout << "MSN: ";
+ msn_parameters->set_http_mode();
+ std::cout << "Jabber: ";
+ jabber_parameters->set_http_mode();
+ std::cout << std::endl;
+
+ // login
+ MSN_ptr->login("testuser", "testpass");
+ Jabber_ptr->login("testuser", "testpass");
+ std::cout << std::endl;
+
+ // send message
+ MSN_ptr->send("hi");
+ Jabber_ptr->send("hi");
+ std::cout << std::endl;
+
+ // change status
+ MSN_ptr->change_status("away");
+ Jabber_ptr->change_status("away");
+ std::cout << std::endl;
+
+ // wait for message
+ std::cout << MSN_ptr->receive() << std::endl;
+ std::cout << Jabber_ptr->receive() << std::endl;
+ std::cout << std::endl;
+
+ return 0;
+}
 
- // MSN plugin
- std::auto_ptr<protocol> MSN_ptr(current_plugin->create());
- boost::shared_ptr<network_parameters> msn_parameters = current_plugin->get_info();
- current_plugin++;
-
- // Jabber plugin
- std::auto_ptr<protocol> Jabber_ptr(current_plugin->create());
- boost::shared_ptr<network_parameters> jabber_parameters = current_plugin->get_info();
-
- // server
- std::cout << "MSN hostname: " << msn_parameters->hostname() << std::endl;
- std::cout << "Jabber hostname: " << jabber_parameters->hostname() << std::endl;
- std::cout << std::endl;
-
- // http_mode: note that one of the implementations doesn't support it, having a base class
- // and different specific concrete network parameters allow us to handle this
- std::cout << "MSN: ";
- msn_parameters->set_http_mode();
- std::cout << "Jabber: ";
- jabber_parameters->set_http_mode();
- std::cout << std::endl;
-
- // login
- MSN_ptr->login("testuser", "testpass");
- Jabber_ptr->login("testuser", "testpass");
- std::cout << std::endl;
-
- // send message
- MSN_ptr->send("hi");
- Jabber_ptr->send("hi");
- std::cout << std::endl;
-
- // change status
- MSN_ptr->change_status("away");
- Jabber_ptr->change_status("away");
- std::cout << std::endl;
-
- // wait for message
- std::cout << MSN_ptr->receive() << std::endl;
- std::cout << Jabber_ptr->receive() << std::endl;
- std::cout << std::endl;
 ``
 
 And we get the following output:

Modified: sandbox/libs/extension/doc/tutorials.qbk
==============================================================================
--- sandbox/libs/extension/doc/tutorials.qbk (original)
+++ sandbox/libs/extension/doc/tutorials.qbk 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -17,16 +17,17 @@
 
 The first tutorial is a basic hello world example.
 
-The second tutorial is a more complex example involving multiple inheritance, virtual inheritance, and inheritance
-across shared libraries.
+The second tutorial is a more complex example involving multiple inheritance,
+virtual inheritance, and inheritance across shared libraries.
 
-The third tutorial shows how to register classes with multi parameter constructors.
+The third tutorial shows how to register classes with multi parameter
+constructors.
 
 The fourth tutorial is a about multiple library loading, with some strange cases
 like loading the same library many times and loading very similar classes.
 
-The fifth tutorial is an advanced example of using the Info template parameter. There is a simpler
-usage of this parameter in the examples/info folder as well.
+The fifth tutorial is an advanced example of using the Info template parameter.
+There is a simpler usage of this parameter in the examples/info folder as well.
 
 The tutorial code can be found in the examples folder. They all share the same
 Jamfile, but the Jamfile contents are separated out for each tutorial.

Modified: sandbox/libs/extension/examples/info/im/network_parameters.hpp
==============================================================================
--- sandbox/libs/extension/examples/info/im/network_parameters.hpp (original)
+++ sandbox/libs/extension/examples/info/im/network_parameters.hpp 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -11,6 +11,7 @@
 
 #include <string>
 #include <iostream>
+#include <boost/shared_ptr.hpp>
 
 // interface for the parameters of each plugin
 class network_parameters
@@ -53,3 +54,12 @@
 
   virtual ~Jabber_network_parameters() {}
 };
+
+inline bool operator<(const boost::shared_ptr<network_parameters> & first,
+ const boost::shared_ptr<network_parameters> & second) {
+ int comp = strcmp(first->hostname(), second->hostname());
+ if (!comp) {
+ return strcmp(first->port(), second->port()) < 0;
+ }
+ else return comp < 0;
+}

Modified: sandbox/libs/extension/examples/info/im/plugins.cpp
==============================================================================
--- sandbox/libs/extension/examples/info/im/plugins.cpp (original)
+++ sandbox/libs/extension/examples/info/im/plugins.cpp 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -60,14 +60,6 @@
         virtual ~Jabber(void) {}
 };
 
-inline bool operator<(const boost::shared_ptr<network_parameters> & first,
- const boost::shared_ptr<network_parameters> & second) {
- int comp = strcmp(first->hostname(), second->hostname());
- if (!comp) {
- return strcmp(first->port(), second->port()) < 0;
- }
- else return comp < 0;
-}
 
 extern "C" void BOOST_EXTENSION_EXPORT_DECL
 extension_export_plugins(boost::extensions::factory_map & fm)

Modified: sandbox/libs/extension/examples/info/im/protocol.hpp
==============================================================================
--- sandbox/libs/extension/examples/info/im/protocol.hpp (original)
+++ sandbox/libs/extension/examples/info/im/protocol.hpp 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -10,7 +10,6 @@
  */
 
 #include <string>
-
 // protocol for instant message communication
 class protocol
 {
@@ -23,3 +22,4 @@
 
   virtual ~protocol(void) {}
 };
+

Modified: sandbox/libs/extension/examples/info/multilanguage_main.cpp
==============================================================================
--- sandbox/libs/extension/examples/info/multilanguage_main.cpp (original)
+++ sandbox/libs/extension/examples/info/multilanguage_main.cpp 2007-09-15 12:23:59 EDT (Sat, 15 Sep 2007)
@@ -43,7 +43,9 @@
       // Using auto_ptr to avoid needing delete. Using smart_ptrs
       // is recommended.
       // Note that this has a zero argument constructor - currently
- // constructors with up to six arguments can be used.
+ // constructors with up to six arguments can be used by
+ // default - define BOOST_EXTENSION_MAX_FUNCTOR_PARAMS to a
+ // a larger value if needed.
       std::auto_ptr<word> word_ptr(current_word->second.create());
       std::cout << word_ptr->get_val() << " is "
                 << current_word->first.english_translation


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk