Text Archive Class Diagram
This diagram shows the relationship between the various classes that implement saving (output serialization) for text archives. The hierachy 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 its text archives). Users include classes in red to save their data from a partcular type of archive. Other classes whose names are in black implement the library and should never change. They are in
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 ->
polymorphic_oarchiveas well as for archive implementations.
basic_oarchiveand the template interface used by archive class implementations.
text_oarchive_impl<text_oarchive>. We can't use
typedefcan't refer to it self in its definition. This is the class name that is used to serialize to a text archive.
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.
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.
© 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)