Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-10-29 16:21:49


Author: ramey
Date: 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
New Revision: 40564
URL: http://svn.boost.org/trac/boost/changeset/40564

Log:
First implementation of thread safe lock free serialization
Text files modified:
   branches/serialization_next_release/boost/libs/serialization/doc/acknowledgments.html | 2
   branches/serialization_next_release/boost/libs/serialization/doc/archive_reference.html | 4 +-
   branches/serialization_next_release/boost/libs/serialization/doc/class_diagram.html | 12 +++++-----
   branches/serialization_next_release/boost/libs/serialization/doc/exceptions.html | 5 ++-
   branches/serialization_next_release/boost/libs/serialization/doc/extended_type_info.html | 45 ++++++++++++++++-----------------------
   branches/serialization_next_release/boost/libs/serialization/doc/implementation.html | 24 ++++++++++----------
   branches/serialization_next_release/boost/libs/serialization/doc/release.html | 19 ++++++++--------
   branches/serialization_next_release/boost/libs/serialization/doc/shared_ptr2.html | 12 +++++-----
   branches/serialization_next_release/boost/libs/serialization/doc/special.html | 8 +++++++
   9 files changed, 66 insertions(+), 65 deletions(-)

Modified: branches/serialization_next_release/boost/libs/serialization/doc/acknowledgments.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/acknowledgments.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/acknowledgments.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -30,7 +30,7 @@
   <li>David Abrahams improved implementation of "export" functionality. This not
   only eliminated an annoying header sequencing requirement, but also the need to maintain
   a list of "known archives".
- <li>Mattias Troyer ehnanced the implementation of native binary archives. This includes
+ <li>Mattias Troyer enhanced the implementation of native binary archives. This includes
   enhancement and generalization of the library itself including generalization of
   the wrapper concept.
   <li>Markus Schöpflin tracked down issues with TRU64 compiler resulting in 100% passing.

Modified: branches/serialization_next_release/boost/libs/serialization/doc/archive_reference.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/archive_reference.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/archive_reference.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -367,9 +367,9 @@
 and the header files, this implementation is just a composition of the polymorphic
 interface and the standard template driven implementation. This composition is
 accomplished by the templates
-<a target=polymorphic_iarchive_dispatch_hpp href="../../../boost/archive/detail/polymorphic_iarchive_dispatch.hpp"><code style="white-space: normal">polymorphic_iarchive_dispatch.hpp</code></a>
+<a target=polymorphic_iarchive_route_hpp href="../../../boost/archive/detail/polymorphic_iarchive_route.hpp"><code style="white-space: normal">polymorphic_iarchive_route.hpp</code></a>
 and
-<a target=polymorphic_oarchive_dispatch_hpp href="../../../boost/archive/detail/polymorphic_oarchive_dispatch.hpp"><code style="white-space: normal">polymorphic_oarchive_dispatch.hpp</code></a>.
+<a target=polymorphic_oarchive_route_hpp href="../../../boost/archive/detail/polymorphic_oarchive_route.hpp"><code style="white-space: normal">polymorphic_oarchive_route.hpp</code></a>.
 As these contain no code specific to the particular implementation archive, they can be used to create
 a polymorphic archive implementation from any functioning templated archive implementation.
 <p>

Modified: branches/serialization_next_release/boost/libs/serialization/doc/class_diagram.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/class_diagram.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/class_diagram.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -52,14 +52,14 @@
       | / |
       | / |
       | / |
-<font color="blue">text_iarchive_impl&lt;text_iarchive&gt;</font> -> <font color="red">polymorphic_iarchive</font> ->
+<font color="blue">text_iarchive_impl&lt;text_iarchive&gt;</font> -> polymorphic_iarchive_impl ->
       | \ |
       | \ |
- | \_____________________________________ |
+ | \_____________________________________ <font color="red">polymorphic_iarchive</font> ->
       | \ /
       | \ /
       | \ /
-<font color="red">text_iarchive</font> -> polymorphic_iarchive_dispatch&lt;text_iarchive_impl&lt;text_iarchive&gt; &gt; ->
+<font color="red">text_iarchive</font> -> polymorphic_iarchive_route&lt;text_iarchive_impl&lt;text_iarchive&gt; &gt; ->
                                                        |
                                                        |
                                                        |
@@ -68,7 +68,7 @@
 
 </code></pre>
 This diagram shows the relationship between the various classes that implement loading (input
-serialization) for text files. The hierachy and organization is identical for saving and for
+serialization) for text files. The hierachy and organization is similar for saving and for
 other types of archives as well. In the diagram, classes written in <font color="blue">blue</font>
 implement loading for a given archive type. (in this case its text archives).
 Users include classes in <font color="red">red</font> to load their data from a partcular
@@ -146,7 +146,7 @@
   for all archives present and future.
   
   <p><dt><code>
- polymorphic_iarchive_dispatch<text_iarchive_impl<text_iarchive> >
+ polymorphic_iarchive_route<text_iarchive_impl<text_iarchive> >
   </code></dt>
   <dd><p>
   This class implements the <code style="white-space: normal">polymorphic_iarchive</code> in terms of a specific
@@ -158,7 +158,7 @@
   </code></dt>
   <dd>
   this is just a typedef so we can write polymorphic_text_archive rather than
- <code style="white-space: normal">polymorphic_iarchive_dispatch&lt;text_iarchive_impl&lt;text_iarchive&gt; &gt;</code>
+ <code style="white-space: normal">polymorphic_iarchive_route&lt;text_iarchive_impl&lt;text_iarchive&gt; &gt;</code>
   
 </dl>
 <hr>

Modified: branches/serialization_next_release/boost/libs/serialization/doc/exceptions.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/exceptions.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/exceptions.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -43,8 +43,9 @@
 Archive operators can throw a <code style="white-space: normal">boost::archive_exception</code>
 object which can be caught by an application program. These exceptions are defined
 in the files <a target="archive_exception_hpp" href="../../../boost/archive/archive_exception.hpp">
-boost/archive/archive_exception.hpp</a> and <a target="archive_xml_exception_hpp" href="../../../boost/archive/archive_exception.hpp">
-boost/archive/archive_xml_exception.hpp</a>.
+archive_exception.hpp</a>
+and <a target="basic_xml_archive_hpp" href="../../../boost/archive/basic_xml_archive.hpp">
+basic_xml_archive.hpp</a>.
 <pre><code>
 namespace boost {
 namespace archive {

Modified: branches/serialization_next_release/boost/libs/serialization/doc/extended_type_info.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/extended_type_info.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/extended_type_info.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -210,24 +210,10 @@
 
 <dt><h4><code style="white-space: normal"><pre>
 template&lt;class ETI&gt;
-static const extended_type_info *
-ETI::get_derived_extended_type_info(const T & t);
-</pre></code></h4></dt>
-<dd>
-Return a pointer to the
-<code style="white-space: normal">extended_type_info</code>
-instance that corresponds to
-the "true type" of the type T. The "true type" is the lowest type in the
-hierarchy of classes. The type T can always be cast to the "true type" with
-a static cast. Implemention of this function will vary among type id systems
-and sometimes will make presumptions about the type T than can be identified
-with a particular <code style="white-space: normal">extended_type_info implementation</code>.
-</dd>
-
-<dt><h4><code style="white-space: normal"><pre>
-template&lt;class ETI&gt;
-static extended_type_info *
-ETI::find();
+static extended_type_info &
+ETI::get_mutable_instance();
+static const extended_type_info &
+ETI::get_const:instance();
 </pre></code></h4></dt>
 <dd>
 Return a pointer to the instance of
@@ -238,13 +224,18 @@
 
 <dt><h4><code style="white-space: normal"><pre>
 template&lt;class ETI&gt;
-static void
-ETI::key_register(const char * key);
+static const extended_type_info *
+ETI::get_derived_extended_type_info(const T & t);
 </pre></code></h4></dt>
 <dd>
-The main function is to invoke key_register to add the GUID to the
-global table. Depending on the type id system being used, it might
-perform other initializaition functions as well.
+Return a pointer to the
+<code style="white-space: normal">extended_type_info</code>
+instance that corresponds to
+the "true type" of the type T. The "true type" is the lowest type in the
+hierarchy of classes. The type T can always be cast to the "true type" with
+a static cast. Implemention of this function will vary among type id systems
+and sometimes will make presumptions about the type T than can be identified
+with a particular <code style="white-space: normal">extended_type_info implementation</code>.
 </dd>
 </dl>
 
@@ -273,9 +264,11 @@
 <p>
 <code style="white-space: normal"><h4><a target="extended_type_info_no_rtti.hpp" href="../../../boost/serialization/extended_type_info_no_rtti.hpp">
 extended_type_info_no_rtti</a></h4></code>
-is implemented in a way that doesn't rely on the existence RTTI.
-However, it does require that all classes for which type id is to be used implement
-a virtual function of the signiture:
+is implemented in a way that doesn't rely on the existence RTTI.
+However, if the export facility is to be used to serialize types
+through base class pointers, those types are required to implement
+a virtual function with the signature:
+
 <code><pre>
 virtual const char * get_key();
 </pre></code>

Modified: branches/serialization_next_release/boost/libs/serialization/doc/implementation.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/implementation.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/implementation.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -207,10 +207,10 @@
     is added with STLPort, all tests complete successfully.
     <li>This compiler generates long warning messages related to the usage of
     non virtual destructors in polymorphic classes. These warnings have been
- carfully considered and the code that generates these warning has been
+ carefully considered and the code that generates these warning has been
     unchanged. In this case the warning should should be ignored as in certain
     usages of the library, making the destructors virtual could lead to problems.
- As an alternative, base class destructors have been make "protected" to
+ As an alternative, base class destructors have been made "protected" to
     address the concerns that motivate these warning messages. When building
     the serialization library and tests with bjam, these warnings are suppressed.
     When building one's own applications, these warnings can be suppressed by
@@ -223,7 +223,8 @@
 <h4><a name="gcc295">GCC 2.95</a></h4>
 All of the above plus:<br>
 <ul>
- <li>The serialization library depends on the templeted stream implemention
+ <li>The serialization library depends on the templated stream
+ implementation to function properly.
     to function properly. So STLPort must be used to build the library.
     <li>Polymorphic archive tests fail.
     <li>XML serialization only works with version 1.6x of spirit. In order to build
@@ -245,7 +246,7 @@
 
 <h4><a name="vc71">Visual C++ 7.1</a></h4>
 Derivation from an archive class defined in a DLL as described in ... will not work.
-This is due to the way that VC++ handles templeted code with __decl(dllexport) and
+This is due to the way that VC++ handles templated code with __decl(dllexport) and
 __decl(dllimport) specifications. Basically, this compiler requires that all the
 instantiations have the same specification - even though they have different
 template arguments. The example <code style="white-space: normal">
@@ -255,15 +256,14 @@
 This compiler does not have RTTI or exception handling turned on by default. Although
 they are not strictly necessary to use the serialization package, the example and test
 program presume that they are enabled. So be sure your command line or IDE settings
-enable these features if you want
-these switches are enabled if you want to build and run these programs.
+enable these features if you want to build and run these programs.
 <p>
 This compiler can treat <code style="white-space: normal">wchar_t</code> as either
 a short integer or an intrinsic type.
 If <code style="white-space: normal">/Zc:wchar_t</code> is specified on the
 compile command line, <code style="white-space: normal">wchar_t</code> will be
 considered an intrinsic type - otherwise
-it will be treated as a synonym for a 16 bit integer. The libary can be used
+it will be treated as a synonym for a 16 bit integer. The library can be used
 either way - <strong>BUT</strong> - both the libray <strong>AND</strong> the application
 must be compiled with the same switch settings. Note that <code style="white-space: normal">BJAM</code>
 includes this switch by default. So if want to use the libraries that
@@ -356,11 +356,11 @@
         without a base class.)
     </ul>
     Working around this in the implementation of the library for this compiler
- entailed a ridiculous amount of effort. Even so, the effort wasn't entirely succesful.
+ entailed a ridiculous amount of effort. Even so, the effort wasn't entirely successful.
     With this compiler, this message will still appear under the following conditions:
     <ul>
         <li>When serializing a class with multiple base classes. This problem causes two
- failure in the test suite. I have been unable to divise a way to work around this.
+ failure in the test suite. I have been unable to devise a way to work around this.
         <li>Using more than one kind of archive in the same code module. This should be easy
         to work around in practice.
     </ul>
@@ -372,11 +372,11 @@
 <ul>
     <li><code style="white-space: normal">enum</code> data members cannot be serialized.
     Conversion to/from integers will work around the problem.
- <li>If class serialize functions are not accessable either by making them public or by
+ <li>If class serialize functions are not accessible either by making them public or by
     including <code style="white-space: normal">friend</code> declarations as described in
     <a href="serialization.html#member">Class Serialization - Member Function</a>, the
     will compile but fail at runtime.
- <li>Tests using custom extended type which doesn't use rtti fails. (5.64 only !).
+ <li>Tests using custom extended type which doesn't use RTTI fails. (5.64 only !).
     <li>Tests built in release mode fail. This seems to be an issue with the boost test system
     with this compiler.
     <li>XML serialization only works with version 1.6x of spirit. In order to build
@@ -428,7 +428,7 @@
     <li>when built to use dynamic linking versions of C++ runtime code (<runtime-link>dynamic)
     all tests fail to link. This is due to a missing symbol in the stlport library related
     to custom codecvt facets.
- <li>the test_set fails to run correctly. It seems the hashed set interator doesn't
+ <li>the test_set fails to run correctly. It seems the hashed set iterator doesn't
     implement the ++ operator correctly. This causes the test to fail by consuming all available
     memory. Given this, this test is commented out.
 </ul>

Modified: branches/serialization_next_release/boost/libs/serialization/doc/release.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/release.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/release.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -32,15 +32,14 @@
   <dt>Differences from version 1.34</dt>
   <dt>Pending Issues</dt>
 </dl>
-This is the Boost 1.33 Serialization Library.
 There are currently no known bugs. However, due to compiler/library quirks and or
 bugs, some tests fail with some combinations of compilers and libraries.
 <h2><a name="requirements"></a>Requirements</h2>
-This library requires Boost version 1.33 or later.
+This library has been tested on Boost version 1.34 and 1.35.
 <p>
 The serialization library uses the boost spirit package to load XML archives.
 We have found that all tests pass using spirit 1.6x. Spirit 1.8 and higher does not work with
-older compilers - specificallly MSVC 6, Borland and GCC < 3.0.
+older compilers - specifically MSVC 6, Borland and GCC < 3.0.
 If you are using one of these compilers, you may download a version
 of spirit 1.6 here.
 To use this downloaded version rather than the one included with boost,
@@ -66,7 +65,7 @@
     <li>Improved <code>const</code> correctness for save/load operators. Note that this may
     produce compile time errors in code which compiled without problem in earlier boost releases.
     In most cases the fix is trivial. In other cases, code should be scrutinized to be
- sure that it doesn't use the serializaton system in a way which may introduce subtle bugs in
+ sure that it doesn't use the serialization system in a way which may introduce subtle bugs in
     to the program. A fuller explanation of this issue can be found
     <a target="detail" href="traits.html#tracking">here</a>.
     <li>A new implementation of serialization for <code style="white-space: normal">shared_ptr&lt;T&gt;</code>. This
@@ -78,19 +77,19 @@
     needs to load archives created with boost 1.32 libraries, include the above header
     before each inclusion of <code style="white-space: normal">boost/serialization/shared_ptr.hpp</code>.
     <li>More compilers tested and supported.
- <li>Miscelleanous bug fixes.
+ <li>Miscellaneous bug fixes.
 </ul>
 <h2><a name="differences_1_33"></a>Differences from Boost 1.33</h2>
 <ul>
     <li>Native Binary archives use the <code style="white-space: normal">std::streambuf</code> interface.
- This should result in noticibly faster execution in many cases.
+ This should result in noticeably faster execution in many cases.
 </ul>
 
 <h2><a name="differences_1_34"></a>Differences from Boost 1.34</h2>
 <ul>
- <li>Ehanced support for fast serialiation for native binary archives. By Mattias Troyer.
+ <li>Enhanced support for fast serialization for native binary archives. By Mattias Troyer.
     <li>Improved implementation of "export" functionality. Removes header ordering
- requirement and eliminates the maintainence of a pre-determined list of "known archives"
+ requirement and eliminates the maintenance of a pre-determined list of "known archives"
         By David Abrahams.
     <li>Improved support for STLPort.
 </ul>
@@ -106,14 +105,14 @@
     and <code style="white-space: normal">std::wstring</code> contain characters such as
     '\0' which cannot be rendered in XML without an escape mechanism. Currently there is
     no such escape mechanism implemented.
- <li>A subtle error in the implementation of serialiaton of <code style="white-space: normal">std::map</code>
+ <li>A subtle error in the implementation of serializaton of <code style="white-space: normal">std::map</code>
     is fixed in this version. Unfortunately, the fix breaks serialization of
     <code style="white-space: normal">std::map</code> for those compilers which do not support
     partial template specialization.
     <li>Floating point values which are number cannot be serialized to text base archives.
 </ul>
 <p>
-Aside from the above, there are a number of issus related to specific platforms.
+Aside from the above, there are a number of issues related to specific platforms.
 These are listed in Specific Compiler/Library Issues.
 
 <hr>

Modified: branches/serialization_next_release/boost/libs/serialization/doc/shared_ptr2.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/shared_ptr2.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/shared_ptr2.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -20,7 +20,7 @@
     </td>
     <td valign="top">
       <h1 align="center">Serialization</h1>
- <h2 align="center"><code style="white-space: normal">shared_ptr&lt;class T&gt;</code> Revisted</h2>
+ <h2 align="center"><code style="white-space: normal">shared_ptr&lt;class T&gt;</code> Revisited</h2>
     </td>
   </tr>
 </table>
@@ -32,7 +32,7 @@
   <li>It was dependent on the Boost implementation of <code style="white-space: normal">shared_ptr</code>.
   The <code style="white-space: normal">shared_ptr</code> interface has been included
   in <code style="white-space: normal">std::tr1</code> and may someday be included in the standard
- C++ library. An implementation which depends only on the public interface can be guarenteed to
+ C++ library. An implementation which depends only on the public interface can be guaranteed to
   function with any other future implementation of <code style="white-space: normal">shared_ptr</code>.
   <li>It required extra macros for export.
 </ul>
@@ -45,7 +45,7 @@
     const unsigned int /* file_version */
 ){
     const T * t_ptr = t.get();
- // just seriailize the underlying raw pointer
+ // just serialize the underlying raw pointer
     ar &lt;&lt: boost::serialization::make_nvp("px", t_ptr);
 }
 
@@ -56,7 +56,7 @@
     const unsigned int file_version
 ){
     T* r;
- // recover the underlying raw poiter
+ // recover the underlying raw pointer
     ar >> boost::serialization::make_nvp("px", r);
 
     // To Do - match up with other shared pointers which
@@ -65,13 +65,13 @@
 }
 </code></pre>
 
-In priniciple this is very much simpler than the original implementation. Completion of
+In principle, this is very much simpler than the original implementation. Completion of
 this code requires:
 
 <ol>
   <li>Filling in the "To Do". This required making an extra map for
   <code style="white-space: normal">shared_ptr</code> instances.
- <li>A method for identifing pointers to the same objects from pointers to their base classes.
+ <li>A method for identifying pointers to the same objects from pointers to their base classes.
   <li>Backward compatibility with pointers serialized by the previous method. This exploits
   the serialization class versioning.
   <li>Proper handling of <code style="white-space: normal">weak_ptr</code>.

Modified: branches/serialization_next_release/boost/libs/serialization/doc/special.html
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/doc/special.html (original)
+++ branches/serialization_next_release/boost/libs/serialization/doc/special.html 2007-10-29 16:21:48 EDT (Mon, 29 Oct 2007)
@@ -194,6 +194,14 @@
 to be a permanent part of the <code style="white-space: normal">my_class.hpp</code> .
 
 <p>
+Strictly speaking, export should not be necessary if all pointer serialization
+occurs through the most derived class. However, in order to detect
+what would be catastophic error, the library traps ALL serializations through
+a pointer to a polymorphic which are not exported or otherwise registered.
+So, in practice, be prepared to register or export all classes with one
+or more virtual functions which are serialized through a pointer.
+
+<p>
 Note that the implementation of this functionality depends upon vendor
 specific extensions to the C++ language. So, there is no guarenteed portability
 of programs which use this facility. However, all C++ compilers which


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