Update of /cvsroot/boost/boost/libs/serialization/doc
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2028
Modified Files:
Tag: RC_1_33_0
acknowledgments.html archive_reference.html archives.html
contents.html derivation.html exceptions.html release.html
serialization.html shared_ptr2.html traits.html tutorial.html
void_cast.html wrappers.html
Log Message:
fix char set tag
Index: acknowledgments.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/acknowledgments.html,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- acknowledgments.html 21 Jul 2005 18:30:48 -0000 1.10
+++ acknowledgments.html 16 Jul 2006 02:06:46 -0000 1.10.2.1
@@ -7,7 +7,7 @@
http://www.boost.org/LICENSE_1_0.txt)
-->
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Serialization - Acknowledgments</title>
Index: archive_reference.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/archive_reference.html,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- archive_reference.html 21 Apr 2005 04:59:13 -0000 1.7
+++ archive_reference.html 16 Jul 2006 02:06:46 -0000 1.7.2.1
@@ -142,7 +142,7 @@
<dt><h4><code>void end_preamble()</code></h4></dt>
<dd>
<strong>Default</strong>:Does nothing.<br>
-<strong>Purpose</strong>:Called <strong>each time</strong> user data data is
saved.
+<strong>Purpose</strong>:Called <strong>each time</strong> user data is saved.
Its not called when archive book keeping data is saved. This is used by XML
archives
to determine when to inject a ">" character at end of XML header. XML
output archives
keep their own internal flag indicating that data being written is header
data. This
@@ -180,7 +180,9 @@
of these objects is included in a wrapper so that the archive class can
override the
implementation of <code style="white-space: normal">void load_override(T & t,
int);</code>.
For example, in the XML archive, the override for this type renders an
object_id equal to 23 as
-"object_id=_23". The following table lists the types used by the
serialization library:
+"object_id=_23". The following table lists the types defined in the
+<code style="white-space: normal">boost::archive namespace</code>
+used internally by the serialization library:
<p>
<table border>
<tr><th align=left>type</th><th align=left><code style="white-space:
normal">default<br>serialed as</code></th>
@@ -203,7 +205,7 @@
All of these types have been assigned an
<a target="detail" href="traits.html#level">implementation level</a> of
<code style="white-space: normal">primitive</code> and are convertible to
types such as int, unsigned int, etc.
-So that they have default implementations. This is illustrated by
+so that they have default implementations. This is illustrated by
<a href="../../../boost/archive/basic_text_iarchive.hpp"
target="basic_text_iarchive_hpp"><code style="white-space:
normal">basic_text_iarchive.hpp</code></a>.
which relies upon the default. However, in some cases, overrides will have to
be
explicitly provided for these types. For an example see
@@ -323,7 +325,7 @@
<ul>
<li>Much inline code may be replicated.
<li>If there are several archive classes, code will be regenerated for each
archive class.
-<li>If seriaiization code is placed in a library, that library must be rebuilt
+<li>If serialization code is placed in a library, that library must be rebuilt
each time a new archive class is created.
<li>If serialization code is placed in a DLL,
<ul>
Index: archives.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/archives.html,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -d -r1.6.2.3 -r1.6.2.4
--- archives.html 23 Sep 2005 06:13:57 -0000 1.6.2.3
+++ archives.html 16 Jul 2006 02:06:46 -0000 1.6.2.4
@@ -29,7 +29,7 @@
<h4>Notation</h4>
In the following descriptions
<ul>
- <li><code>SA</code> is an type modeling the <a
href="#loading_interface">Saving Archive Concept</a>
+ <li><code>SA</code> is an type modeling the <a
href="#saving_interface">Saving Archive Concept</a>
<li><code>sa</code> is an instance of type SA.
<li><code>LA</code> is an type modeling the <a
href="#loading_interface">Loading Archive Concept</a>
<li><code>la</code> is an instance of type LA.
@@ -246,21 +246,24 @@
<a
href="../../../boost/archive/text_woarchive.hpp">boost::archive::text_woarchive</a>
// saving
<a
href="../../../boost/archive/text_wiarchive.hpp">boost::archive::text_wiarchive</a>
// loading
+// a portable XML archive</a>
+<a href="../../../boost/archive/xml_oarchive.hpp"
target="xml_oarchive_cpp">boost::archive::xml_oarchive</a> // saving
+<a href="../../../boost/archive/xml_iarchive.hpp"
target="xml_iarchive_cpp">boost::archive::xml_iarchive</a> // loading
+
+// a portable XML archive which uses wide characters - use for utf-8 output</a>
+<a href="../../../boost/archive/xml_woarchive.hpp"
target="xml_woarchive_cpp">boost::archive::xml_woarchive</a> // saving
+<a href="../../../boost/archive/xml_wiarchive.hpp"
target="xml_wiarchive_cpp">boost::archive::xml_wiarchive</a> // loading
+
// a non-portable native binary archive</a>
<a href="../../../boost/archive/binary_oarchive.hpp"
target="binary_oarchive_cpp">boost::archive::binary_oarchive</a> // saving
<a href="../../../boost/archive/binary_iarchive.hpp"
target="binary_iarchive_cpp">boost::archive::binary_iarchive</a> // loading
+
<!--
// a non-portable native binary archive which use wide character streams
<a
href="../../../boost/archive/binary_woarchive.hpp">boost::archive::binary_woarchive</a>
// saving
<a
href="../../../boost/archive/binary_wiarchive.hpp">boost::archive::binary_wiarchive</a>
// loading
-->
-// a portable XML archive</a>
-<a href="../../../boost/archive/xml_oarchive.hpp"
target="xml_oarchive_cpp">boost::archive::xml_oarchive</a> // saving
-<a href="../../../boost/archive/xml_iarchive.hpp"
target="xml_iarchive_cpp">boost::archive::xml_iarchive</a> // loading
-// a portable XML archive which uses wide characters - use for utf-8 output</a>
-<a href="../../../boost/archive/xml_woarchive.hpp"
target="xml_woarchive_cpp">boost::archive::xml_woarchive</a> // saving
-<a href="../../../boost/archive/xml_wiarchive.hpp"
target="xml_wiarchive_cpp">boost::archive::xml_wiarchive</a> // loading
</code></pre>
All of these archives implement the same inteface. Hence, it should suffice to
describe only one
@@ -285,14 +288,13 @@
namespace boost {
namespace archive {
-template<class OStream>
class text_oarchive : ...
{
...
public:
- ... // implementation of <strong>Archive</strong> concept
- oarchive(OStream & os, unsigned int flags = 0);
- ~oarchive();
+ ... // implementation of the <strong>Saving Archive</strong> concept
+ text_oarchive(std::ostream & os, unsigned int flags = 0);
+ ~text_oarchive();
};
} // archive
@@ -301,16 +303,8 @@
<dl>
-<dt><h4>
-Template parameter <code>OStream</code>
-</h4></dt>
-<dd>
-An class derived from <code style="white-space:
normal">basic_istream<char>
-</code>
-</dd>
-
<dt><h4><code>
-oarchive(OStream & os, unsigned int flags = 0);
+text_oarchive(std::ostream & os, unsigned int flags = 0);
</code></h4></dt>
<dd>
Contructs an archive given an open <code style="white-space:
normal">stream</code> as
@@ -340,7 +334,7 @@
</dd>
<dt><h4><code>
-~oarchive();
+~text_oarchive();
</code></h4></dt>
<dd>
Destructor for an archive. This should be called before the stream is
@@ -354,14 +348,13 @@
namespace boost {
namespace archive {
-template<class IStream>
class text_iarchive : ...
{
...
public:
- ... // implementation of <strong>Archive</strong> concept
- iarchive(IStream & is, unsigned int flags = 0);
- ~iarchive();
+ ... // implementation of the <strong>Loading Archive</strong> concept
+ text_iarchive(std::istream & is, unsigned int flags = 0);
+ ~text_iarchive();
};
} //namespace archive
@@ -371,16 +364,8 @@
<dl>
-<dt><h4>
-Template parameter <code>IStream</code>
-</h4></dt>
-<dd>
-An class derived from <code style="white-space:
normal">basic_ostream<char>
-</code>
-</dd>
-
<dt><h4><code>
-iarchive(IStream & is, unsigned int flags = 0);
+text_iarchive(std::istream & is, unsigned int flags = 0);
</code></h4></dt>
<dd>
Contructs an archive given an open <code style="white-space:
normal">stream</code> as
@@ -390,14 +375,29 @@
</dd>
<dt><h4><code>
-~iarchive();
+~text_iarchive();
</code></h4></dt>
<dd>
Destructor for an archive. This should be called before the stream is
closed. It restores any altered stream facets to thier state before the
the archive was opened.
</dd>
-
+</dl>
+<p>
+The <code style="white-space: normal">binary_oarchive</code> and
+<code style="white-space: normal">binary_iarchive</code> classes are
+implemented in terms of the more basic
+<code style="white-space: normal">std::streambuf</code>. So, in addition
+to the common class interface described above, they include the following
+constructors:
+<dl>
+<dt><h4><code>
+binary_oarchive(std::streambuf & bsb, unsigned int flags = 0);
+</code></h4></dt>
+and
+<dt><h4><code>
+binary_iarchive(std::streambuf & bsb, unsigned int flags = 0);
+</code></h4></dt>
</dl>
<h3><a name="exceptions">Exceptions</h3>
Index: contents.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/contents.html,v
retrieving revision 1.16.2.7
retrieving revision 1.16.2.8
diff -u -d -r1.16.2.7 -r1.16.2.8
--- contents.html 23 Oct 2005 21:32:24 -0000 1.16.2.7
+++ contents.html 16 Jul 2006 02:06:46 -0000 1.16.2.8
@@ -1,4 +1,4 @@
-<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
(C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
Index: derivation.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/derivation.html,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -d -r1.5 -r1.5.4.1
--- derivation.html 1 Nov 2004 15:39:05 -0000 1.5
+++ derivation.html 16 Jul 2006 02:06:46 -0000 1.5.4.1
@@ -73,7 +73,11 @@
typedef portable_binary_oarchive derived_t;
friend class detail::common_oarchive<derived_t>;
friend class basic_binary_oarchive<derived_t>;
- friend class basic_binary_oprimitive<derived_t, std::ostream>;
+ friend class basic_binary_oprimitive<
+ derived_t,
+ std::ostream::char_type,
+ std::ostream::traits_type
+ >;
friend class boost::serialization::save_access;
</code></pre>
<li><i>Base class functions will usually need to be explicitly invoked</i>
Index: exceptions.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/exceptions.html,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- exceptions.html 3 Aug 2005 21:42:34 -0000 1.5.2.1
+++ exceptions.html 16 Jul 2006 02:06:46 -0000 1.5.2.2
@@ -162,7 +162,11 @@
archive has already been created.
<h3><a name="stream_error"><code style="white-space:
normal">stream_error</code></a></h3>
-An error has occured durring stream input or ouput. This includes
+An error has occured during stream input or ouput. Aside from the common
+situations such as a corrupted or truncated input file, there are
+several less obvious ones that sometimes occur.
+<p>
+This includes
an attempt to read past the end of the file. Text files need a terminating
new line character at the end of the file which is appended when the
archive destructor is invoked. Be sure that an output archive on a stream
@@ -189,6 +193,13 @@
ia >> v;
}
</code></pre>
+<p>
+Another one is the passing of uninitialized data. In general, the behavior
+of the serialization library when passed uninitialized data is undefined.
+If it can be detected, it will invoke an assertion in debug builds.
+Otherwise, depending on the type of archive, it may pass through without
+incident or it may result in an archive with unexpected data in it.
+This, in turn, can result in the throwing of this exception.
<h3><a name="invalid_class_name"><code style="white-space:
normal">invalid_class_name</code></a></h3>
Class name length greater than the maximum permitted. Most likely cause is a
corrupted
Index: release.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/release.html,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- release.html 19 Sep 2005 03:16:56 -0000 1.10.2.1
+++ release.html 16 Jul 2006 02:06:47 -0000 1.10.2.2
@@ -78,6 +78,11 @@
<li>More compilers tested and supported.
<li>Miscelleanous bug fixes.
</ul>
+<h2><a name="recent_improvements"></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 noticible faster execution in some cases.
+</ul>
<h2><a name="todo"></a>Pending issues</h2>
<ul>
@@ -94,6 +99,7 @@
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.
Index: serialization.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/serialization.html,v
retrieving revision 1.14.2.4
retrieving revision 1.14.2.5
diff -u -d -r1.14.2.4 -r1.14.2.5
--- serialization.html 11 Oct 2005 15:12:58 -0000 1.14.2.4
+++ serialization.html 16 Jul 2006 02:06:47 -0000 1.14.2.5
@@ -77,8 +77,7 @@
<a target="detail" href="traits.html#Traits">serialization traits</a>,
any user type can also be designated as "primitive"
so that it is handled in this way.
- <li>It is a class type and for all <strong>Archive</strong> classes, one of
the following
- has been declared:
+ <li>It is a class type and one of the following has been declared:
<ul>
<li>a class member function <code style="white-space:
normal">serialize</code>
<li>a global function <code style="white-space: normal">serialize</code>
@@ -814,6 +813,17 @@
ar >> b;
}
</code></pre>
+<p>
+
+In order for this template to be invoked in code compiled by non-conforming
+compilers, the following syntax may be used:
+<pre><code>
+boost::serialization::void_cast_register(
+ static_cast<Derived *>(NULL),
+ static_cast<Base *>(NULL)
+);
+</code></pre>
+For more information, see <a target="detail"
href="implementation.html#tempatesyntax">Template Invocation syntax</a>
<h3><a name="references"></a>References</h3>
Classes that contain reference members will generally require
Index: shared_ptr2.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/shared_ptr2.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- shared_ptr2.html 27 Jul 2005 19:59:42 -0000 1.1
+++ shared_ptr2.html 16 Jul 2006 02:06:47 -0000 1.1.2.1
@@ -26,7 +26,7 @@
</table>
<hr>
The previously described serialization of <code style="white-space:
normal">shared_ptr</code>
-illustrates the straight forward way of serializing a moderatly compiicated
class structure.
+illustrates the straightforward way of serializing a moderately complicated
class structure.
Unfortunately, this way of doing it suffered from some undesirable features
<ul>
<li>It was dependent on the Boost implementation of <code
style="white-space: normal">shared_ptr</code>.
Index: traits.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/traits.html,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -d -r1.7.2.1 -r1.7.2.2
--- traits.html 3 Sep 2005 18:34:15 -0000 1.7.2.1
+++ traits.html 16 Jul 2006 02:06:47 -0000 1.7.2.2
@@ -296,8 +296,8 @@
By invoking the macro:
<pre><code>
BOOST_CLASS_TYPE_INFO(
- derived_class,
- extended_type_info_no_rtti<base_class>
+ my_class,
+ extended_type_info_no_rtti<my_class>
)
</code></pre>
we can assign the type information implementation to each class on a case by
Index: tutorial.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/tutorial.html,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -u -d -r1.7.2.3 -r1.7.2.4
--- tutorial.html 10 Oct 2005 03:26:49 -0000 1.7.2.3
+++ tutorial.html 16 Jul 2006 02:06:47 -0000 1.7.2.4
@@ -60,7 +60,7 @@
<h3><a name="simplecase">A Very Simple Case</a></h3>
These operators are used inside the <code style="white-space:
normal">serialize</code>
-function> to save and load class data members.
+function to save and load class data members.
<p>
Included in this library is a program called
<a href="../example/demo.cpp" target="demo_cpp">demo.cpp</a> which illustrates
how
Index: void_cast.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/void_cast.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- void_cast.html 21 Jul 2005 18:34:59 -0000 1.1
+++ void_cast.html 16 Jul 2006 02:06:47 -0000 1.1.2.1
@@ -57,8 +57,8 @@
pre-runtime and is available anywhere else in the program.
<li>only adjacent base/derived pairs need be registered. That is,
<pre><code>
- void_cast_register<A, B>();
- void_cast_register<B, C>();
+ void_cast_register<A, B>();
+ void_cast_register<B, C>();
</code></pre>
automatically derives the fact that A can be upcast to C and vice-versa.
</ul>
Index: wrappers.html
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/doc/wrappers.html,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -d -r1.4 -r1.4.4.1
--- wrappers.html 1 Nov 2004 15:39:05 -0000 1.4
+++ wrappers.html 16 Jul 2006 02:06:47 -0000 1.4.4.1
@@ -1,4 +1,4 @@
-<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
(C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
@@ -79,7 +79,17 @@
<strong>name-value-pair</strong>. This structure is defined in
<a href="../../../boost/serialization/nvp.hpp" target="nvp_hpp">nvp.hpp</a>.
It is just a reference to the data member coupled with a pointer to
-to a <code style="white-space: normal">const char *</code> which corresponds
to the XML name.
+to a <code style="white-space: normal">const char *</code> which
+corresponds to the XML name. It implements the default
+serialization functions for a name-value pair. This default
+action is to just ignore the item name and serialize the
+data value in the normal manner. For archive classes that
+don't make any special provision for name-value pairs, this
+is the action which will be invoked when the name-value pair
+is serialized. Hence, wrapping a data value into a name-value
+pair will have no effect when used with archives which
+make no special provision for this wrapper.
+<p>
The xml archive classes contain code similar to:
<pre><code>
// special treatment for name-value pairs.
@@ -96,24 +106,6 @@
end_tag(t.name());
}
</code></pre>
-Archive classes which don't use the name of the data item include
-code similar to the following:
-<pre><code>
-// special treatment for name-value pairs. In a simple
-// text archive, just output the value in the normal way.
-// the name is not used
-template<class IStream, class T>
-text_oarchive & operator&(const boost::serialization::nvp<T> & t)
-{
- *this & t.value();
-}
-</code></pre>
-That is, the name part is ignored and and the value part is serialized
-as usual.
-<p>
-Hence, adding the name of the data item does not in any way affect the usage
-of archives which don't use it.
-<p>
The most obvious and convient name to assign to as the XML data item name
is - surpise! - the name of the C++ class data member. So our serialization
code will look like:
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs