]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 | <!-- | |
3 | (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . | |
4 | Use, modification and distribution is subject to the Boost Software | |
5 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
6 | http://www.boost.org/LICENSE_1_0.txt) | |
7 | --> | |
8 | <html> | |
9 | <head> | |
10 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
11 | <link rel="stylesheet" type="text/css" href="../../../boost.css"> | |
12 | <link rel="stylesheet" type="text/css" href="style.css"> | |
13 | <title>Serialization - Archive Class Diagram</title> | |
14 | </head> | |
15 | <body link="#0000ff" vlink="#800080"> | |
16 | <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header"> | |
17 | <tr> | |
18 | <td valign="top" width="300"> | |
19 | <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../boost.png" border="0"></a></h3> | |
20 | </td> | |
21 | <td valign="top"> | |
22 | <h1 align="center">Serialization</h1> | |
23 | <h2 align="center">Text Archive Class Diagram</h2> | |
24 | </td> | |
25 | </tr> | |
26 | </table> | |
27 | <hr> | |
28 | ||
29 | <pre><code> | |
30 | ||
31 | ||
32 | basic_oarchive <a href="../../../boost/archive/detail/basic_oarchive.hpp">-></a> | |
33 | | | |
34 | | | |
35 | | interface_oarchive<text_oarchive> <a href="../../../boost/archive/detail/interface_oarchive.hpp">-></a> | |
36 | | / | |
37 | | / | |
38 | | _________/ | |
39 | | / | |
40 | | / | |
41 | | / | |
42 | common_oarchive<text_oarchive> <a href="../../../boost/archive/detail/common_oarchive.hpp">-></a> | |
43 | | | |
44 | | | |
45 | <font color="blue">basic_text_oarchive<text_oarchive></font> <a href="../../../boost/archive/basic_text_oarchive.hpp">-></a> | |
46 | | | |
47 | | | |
48 | | <font color="blue">basic_text_oprimitive<basic_ostream></font> <a href="../../../boost/archive/basic_text_oprimitive.hpp">-></a> | |
49 | | / | |
50 | | / | |
51 | | _________/ interface_oarchive<polymorphic_oarchive> <a href="../../../boost/archive/detail/interface_oarchive.hpp">-></a> | |
52 | | / | | |
53 | | / | | |
54 | | / | | |
55 | <font color="blue">text_oarchive_impl<text_oarchive></font> <a href="../../../boost/archive/text_oarchive.hpp">-></a> polymorphic_oarchive_impl <a href="../../../boost/archive/polymorphic_oarchive.hpp">-></a> | |
56 | | \ | | |
57 | | \ | | |
58 | | \_____________________________________ <font color="red">polymorphic_oarchive</font> <a href="../../../boost/archive/polymorphic_oarchive.hpp">-></a> | |
59 | | \ / | |
60 | | \ / | |
61 | | \ / | |
62 | <font color="red">text_oarchive</font> <a href="../../../boost/archive/text_oarchive.hpp">-></a> polymorphic_oarchive_route<text_oarchive_impl<text_oarchive> > <a href="../../../boost/archive/detail/polymorphic_oarchive_route.hpp">-></a> | |
63 | | | |
64 | | | |
65 | | | |
66 | <font color="red">polymorphic_text_oarchive</font> <a href="../../../boost/archive/polymorphic_text_oarchive.hpp">-></a> | |
67 | ||
68 | ||
69 | </code></pre> | |
70 | This diagram shows the relationship between the various classes that implement saving (output | |
71 | serialization) for text archives. The hierachy and organization is similar for loading and for | |
72 | other types of archives as well. In the diagram, classes written in <font color="blue">blue</font> | |
73 | implement saving for a given archive type. (in this case its text archives). | |
74 | Users include classes in <font color="red">red</font> to save their data from a partcular | |
75 | type of archive. Other classes whose names are in black implement the library and should | |
76 | never change. They are in <code>namespace boost::archive::detail</code> | |
77 | <dl> | |
78 | <dt><code> | |
79 | <a href="../../../boost/archive/detail/basic_oarchive.hpp">basic_oarchive</a> | |
80 | </code></dt> | |
81 | <dd> | |
82 | Implements the core library functions for class export, versioning, and object tracking. It is compiled | |
83 | into the library as it has no template parameters. | |
84 | </dd> | |
85 | <p><dt><code> | |
86 | <a href="../../../boost/archive/detail/interface_oarchive.hpp">interface_oarchive<text_oarchive></a> | |
87 | </code></dt> | |
88 | <dd> | |
89 | A class that declares the standard archive interface. This has been factored out so that it | |
90 | can be used as a base class for <code style="white-space: normal">polymorphic_oarchive</code> | |
91 | as well as for archive implementations. | |
92 | ||
93 | <p><dt><code> | |
94 | <a href="../../../boost/archive/detail/common_oarchive.hpp">common_oarchive<text_oarchive></a> | |
95 | </code></dt> | |
96 | <dd> | |
97 | The function of this class is to make the connection between the virtual function | |
98 | interface used by <code>basic_oarchive</code> and the template interface used by archive | |
99 | class implementations. | |
100 | ||
101 | <p><dt><code> | |
102 | <a href="../../../boost/archive/basic_text_oarchive.hpp">basic_text_oarchive<text_oarchive></a> | |
103 | </code></dt> | |
104 | <dd> | |
105 | Implements the basic functionality for simple text archives. The primitive save functions have been | |
106 | factored out so it can be used in other text based archives like XML archives. | |
107 | ||
108 | <p><dt><code> | |
109 | <a href="../../../boost/archive/basic_text_oprimitive.hpp">basic_text_oprimitive<basic_ostream></a> | |
110 | </code></dt> | |
111 | <dd> | |
112 | Implements the save oversaves for all primitive types. This is a template with a parameter | |
113 | which describes the stream. | |
114 | ||
115 | <p><dt><code> | |
116 | <a href="../../../boost/archive/text_oarchive.hpp">text_oarchive_impl<text_oarchive></a> | |
117 | </code></dt> | |
118 | <dd> | |
119 | Inherits from the above two classes to implement text archives. | |
120 | </dd> | |
121 | ||
122 | <p><dt><code> | |
123 | <a href="../../../boost/archive/text_oarchive.hpp">text_oarchive</a> | |
124 | </code></dt> | |
125 | <dd> | |
126 | This is just a short hand for <code style="white-space: normal">text_oarchive_impl<text_oarchive></code> . | |
127 | We can't use <code style="white-space: normal">typedef</code> because a | |
128 | <code style="white-space: normal">typedef</code> can't refer to it self in its definition. | |
129 | This is the class name that is used to serialize to a text archive. | |
130 | </dd> | |
131 | ||
132 | <p><dt><code> | |
133 | <a href="../../../boost/archive/detail/interface_oarchive.hpp">interface_oarchive<polymorphic_oarchive></a> | |
134 | </code></dt> | |
135 | <dd> | |
136 | Same template as above. However, this time the Archive parameter refers to the polymorphic archive | |
137 | with a virtual function interface rather than that the template interface that | |
138 | <code style="white-space: normal">common_oarchive</code> uses. | |
139 | ||
140 | <p><dt><code> | |
141 | <a href="../../../boost/archive/polymorphic_oarchive.hpp">polymorphic_oarchive</a> | |
142 | </code></dt> | |
143 | <dd> | |
144 | A class with a list of virtual <code style="white-space: normal">save(T &t)</code> | |
145 | for all primitive types T. This is the class that is used to do pre-compile serialization of classes | |
146 | for all archives present and future. | |
147 | ||
148 | <p><dt><code> | |
149 | <a href="../../../boost/archive/detail/polymorphic_oarchive_route.hpp">polymorphic_oarchive_route<text_oarchive_impl<text_oarchive> ></a> | |
150 | </code></dt> | |
151 | <dd><p> | |
152 | This class implements the <code style="white-space: normal">polymorphic_oarchive</code> in terms of a specific | |
153 | concrete class. Virtual function calls are routed to the implementing class. In this example, | |
154 | that implementing class would be text_oarchive_impl. | |
155 | ||
156 | <p><dt><code> | |
157 | <a href="../../../boost/archive/polymorphic_text_oarchive.hpp">polymorphic_text_oarchive</a> | |
158 | </code></dt> | |
159 | <dd> | |
160 | this is just a typedef so we can write polymorphic_text_archive rather than | |
161 | <code style="white-space: normal">polymorphic_oarchive_route<text_oarchive_impl&'t;text_oarchive> ></code> | |
162 | ||
163 | </dl> | |
164 | <hr> | |
165 | <p><i>© Copyright <a href="http://www.rrsd.com">Robert Ramey</a> 2002-2004. | |
166 | Distributed under the Boost Software License, Version 1.0. (See | |
167 | accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
168 | </i></p> | |
169 | </body> | |
170 | </html> |