|
SerializationText Archive Class Diagram |
basic_oarchive ->
|
|
| interface_oarchive<text_oarchive> ->
| /
| /
| _________/
| /
| /
| /
common_oarchive<text_oarchive> ->
|
|
basic_text_oarchive<text_oarchive> ->
|
|
| basic_text_oprimitive<basic_ostream> ->
| /
| /
| _________/ interface_oarchive<polymorphic_oarchive> ->
| / |
| / |
| / |
text_oarchive_impl<text_oarchive> -> polymorphic_oarchive_impl ->
| \ |
| \ |
| \_____________________________________ polymorphic_oarchive ->
| \ /
| \ /
| \ /
text_oarchive -> polymorphic_oarchive_route<text_oarchive_impl<text_oarchive> > ->
|
|
|
polymorphic_text_oarchive ->
This diagram shows the relationship between the various classes that implement saving (output
serialization) for text archives. The hierarchy and organization is similar for loading and for
other types of archives as well. In the diagram, classes written in blue
implement saving for a given archive type. (in this case it's text archives).
Users include classes in red to save their data from a particular
type of archive. Other classes whose names are in black implement the library and should
never change. They are in namespace boost::archive::detail
basic_oarchive
interface_oarchive<text_oarchive>
polymorphic_oarchive
as well as for archive implementations.
common_oarchive<text_oarchive>
basic_oarchive
and the template interface used by archive
class implementations.
basic_text_oarchive<text_oarchive>
basic_text_oprimitive<basic_ostream>
text_oarchive_impl<text_oarchive>
text_oarchive
text_oarchive_impl<text_oarchive>
.
We can't use typedef
because a
typedef
can't refer to it self in its definition.
This is the class name that is used to serialize to a text archive.
interface_oarchive<polymorphic_oarchive>
common_oarchive
uses.
polymorphic_oarchive
save(T &t)
for all primitive types T. This is the class that is used to do pre-compile serialization of classes
for all archives present and future.
polymorphic_oarchive_route<text_oarchive_impl<text_oarchive> >
This class implements the polymorphic_oarchive
in terms of a specific
concrete class. Virtual function calls are routed to the implementing class. In this example,
that implementing class would be text_oarchive_impl.
polymorphic_text_oarchive
polymorphic_text_archive
rather than
polymorphic_oarchive_route<text_oarchive_impl<text_oarchive> >
© Copyright Robert Ramey 2002-2004. 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)