|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59458 - trunk/libs/serialization/doc
From: ramey_at_[hidden]
Date: 2010-02-03 16:43:27
Author: ramey
Date: 2010-02-03 16:43:26 EST (Wed, 03 Feb 2010)
New Revision: 59458
URL: http://svn.boost.org/trac/boost/changeset/59458
Log:
Miscelleaneous documentation corrections
Text files modified:
trunk/libs/serialization/doc/derivation.html | 4 +-
trunk/libs/serialization/doc/extended_type_info.html | 62 ++++++++++++++++++++++++++++++++++++++-
trunk/libs/serialization/doc/implementation.html | 2
trunk/libs/serialization/doc/overview.html | 3 -
4 files changed, 63 insertions(+), 8 deletions(-)
Modified: trunk/libs/serialization/doc/derivation.html
==============================================================================
--- trunk/libs/serialization/doc/derivation.html (original)
+++ trunk/libs/serialization/doc/derivation.html 2010-02-03 16:43:26 EST (Wed, 03 Feb 2010)
@@ -26,8 +26,8 @@
</table>
<hr>
<dl class="page-index">
- <dt><a target="detail" href="#portable_archives">Portable Binary Archives</a>
- <dt><a target="detail" href="#fast_archives">Fast Binary Archives</a>
+ <dt>Portable Binary Archives
+ <dt>Fast Binary Archives
</dl>
<a name=portable_archives>
Modified: trunk/libs/serialization/doc/extended_type_info.html
==============================================================================
--- trunk/libs/serialization/doc/extended_type_info.html (original)
+++ trunk/libs/serialization/doc/extended_type_info.html 2010-02-03 16:43:26 EST (Wed, 03 Feb 2010)
@@ -245,7 +245,7 @@
</dl>
-<h3><a name="requirements">Requirements</a></h3>
+<h3><a name="requirements">Requirements for and Implementation</a></h3>
In order to be used by the serialization library, an implementation of
<code style="white-space: normal">extended_type_info</code>,
(referred to as ETI here), must be derived from
@@ -351,8 +351,66 @@
inter-operability with between two different implementations of
<code style="white-space: normal">extended_type_info</code>.
+<h3><a name="type_requirements">Requirements for Each Type</a></h3>
+Each type to be managed by the system must be
+"registered" individually. This is accomplished by instantiating
+templates. For example, if the type T is to use the type_info system
+one would include the following code:
+
+<code style="white-space: normal"><pre>
+namespace boost {
+namespace serialization {
+template
+struct extended_type_info_typeid>T>;
+template
+struct extended_type_info_typeid>const T>;
+} // serialization
+} // boost
+</pre></code>
+
+For those using the serialization library, this step can be skipped
+as it is done automatically. The serialization library includes
+the macro:
+
+<code style="white-space: normal"><pre>
+BOOST_CLASS_TYPE_INFO(
+ my_type,
+ extended_type_info_typeid>my_class>
+)
+</pre></code>
+
+which is used to specify which <code>extended_type_info</code> system is to
+be used for a given type.
+<p>
+<code>extended_type_info</code> includes a facility for constructing
+instances of types without knowing what the exact types are. This is done
+with the function
+<code>
+virtual void * extended_type_info::construct(unsigned int count = 0, ...) const;
+</code>
+. For example:
+<br>
+<code><pre>
+struct base {
+...
+};
+struct derived : public base {
+...
+};
+...
+extended_type_info *eti = extended_type_info::find("my_class")
+base * b = eti->construct(...);
+</pre></code>
+<br>
+The <code>construct</code> takes an argument count and up to
+four parameters of any type. The arguments are passed to the
+constructor of "my_class".
+
+
+A complete example of this can be found
+<a target="test_plugin.cpp" href="test_plugin.cpp">here</a>
<hr>
-<p><i>© Copyright Robert Ramey 2005.
+<p><i>© Copyright Robert Ramey 2005-2009.
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)
</i></p>
Modified: trunk/libs/serialization/doc/implementation.html
==============================================================================
--- trunk/libs/serialization/doc/implementation.html (original)
+++ trunk/libs/serialization/doc/implementation.html 2010-02-03 16:43:26 EST (Wed, 03 Feb 2010)
@@ -231,7 +231,7 @@
and use this library with this compiler, one must use version 1.6x rather than the
latest version shipped with boost. See Release Notes.
</ul>
-<h4><a name="Intel80">Intel C++ 8.0</a></h4>
+<h4><a name="intel80">Intel C++ 8.0</a></h4>
No known issues. All tests compile and run in debug and release modes.
<h4><a name="vc80">Visual C++ 8.0</a></h4>
Modified: trunk/libs/serialization/doc/overview.html
==============================================================================
--- trunk/libs/serialization/doc/overview.html (original)
+++ trunk/libs/serialization/doc/overview.html 2010-02-03 16:43:26 EST (Wed, 03 Feb 2010)
@@ -28,9 +28,6 @@
<dl class="index">
<dt>Requirements</dt>
<dt>Other Implementations</dt>
- <!--
- <dt>Footnotes</dt>
- -->
</dl>
<p>Here, we use the term <strong>"serialization"</strong> to mean
the reversible deconstruction of an arbitrary set of C++ data structures
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