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">Archive Class Diagram</h2> |
---|
24 | </td> |
---|
25 | </tr> |
---|
26 | </table> |
---|
27 | <hr> |
---|
28 | |
---|
29 | <pre><code> |
---|
30 | |
---|
31 | |
---|
32 | basic_iarchive <a href="../../../boost/archive/detail/basic_iarchive.hpp">-></a> |
---|
33 | | |
---|
34 | | |
---|
35 | | interface_iarchive<text_iarchive> <a href="../../../boost/archive/detail/interface_iarchive.hpp">-></a> |
---|
36 | | / |
---|
37 | | / |
---|
38 | | _________/ |
---|
39 | | / |
---|
40 | | / |
---|
41 | | / |
---|
42 | common_iarchive<text_iarchive> <a href="../../../boost/archive/detail/common_iarchive.hpp">-></a> |
---|
43 | | |
---|
44 | | |
---|
45 | <font color="blue">basic_text_iarchive<text_iarchive></font> <a href="../../../boost/archive/basic_text_iarchive.hpp">-></a> |
---|
46 | | |
---|
47 | | |
---|
48 | | <font color="blue">basic_text_iprimitive<basic_istream></font> <a href="../../../boost/archive/basic_text_iprimitive.hpp">-></a> |
---|
49 | | / |
---|
50 | | / |
---|
51 | | _________/ interface_iarchive<polymorphic_iarchive> <a href="../../../boost/archive/detail/interface_iarchive.hpp">-></a> |
---|
52 | | / | |
---|
53 | | / | |
---|
54 | | / | |
---|
55 | <font color="blue">text_iarchive_impl<text_iarchive></font> <a href="../../../boost/archive/text_iarchive.hpp">-></a> <font color="red">polymorphic_iarchive</font> <a href="../../../boost/archive/polymorphic_iarchive.hpp">-></a> |
---|
56 | | \ | |
---|
57 | | \ | |
---|
58 | | \_____________________________________ | |
---|
59 | | \ / |
---|
60 | | \ / |
---|
61 | | \ / |
---|
62 | <font color="red">text_iarchive</font> <a href="../../../boost/archive/text_iarchive.hpp">-></a> polymorphic_iarchive_impl<text_iarchive_impl<text_iarchive> > <a href="../../../boost/archive/detail/polymorphic_iarchive_impl.hpp">-></a> |
---|
63 | | |
---|
64 | | |
---|
65 | | |
---|
66 | <font color="red">polymorphic_text_iarchive</font> <a href="../../../boost/archive/polymorphic_text_iarchive.hpp">-></a> |
---|
67 | |
---|
68 | |
---|
69 | </code></pre> |
---|
70 | This diagram shows the relationship between the various classes that implement loading (input |
---|
71 | serialization) for text files. The hierachy and organization is identical for saving and for |
---|
72 | other types of archives as well. In the diagram, classes written in <font color="blue">blue</font> |
---|
73 | implement loading for a given archive type. (in this case its text archives). |
---|
74 | Users include classes in <font color="red">red</font> to load their data from a partcular |
---|
75 | type of archive. Other classes whose names are in black implment 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_iarchive.hpp">basic_iarchive</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_iarchive.hpp">interface_iarchive<text_iarchive></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_iarchive</code> |
---|
91 | as well as for archive implementations. |
---|
92 | |
---|
93 | <p><dt><code> |
---|
94 | <a href="../../../boost/archive/detail/common_iarchive.hpp">common_iarchive<text_iarchive></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_iarchive</code> and the template interface used by archive |
---|
99 | class implementations. |
---|
100 | |
---|
101 | <p><dt><code> |
---|
102 | <a href="../../../boost/archive/basic_text_iarchive.hpp">basic_text_iarchive<text_iarchive></a> |
---|
103 | </code></dt> |
---|
104 | <dd> |
---|
105 | Implements the basic functionality for simple text archives. The primitive load 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_iprimitive.hpp">basic_text_iprimitive<basic_istream></a> |
---|
110 | </code></dt> |
---|
111 | <dd> |
---|
112 | Implements the save overloads 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_iarchive.hpp">text_iarchive_impl<text_iarchive></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_iarchive.hpp">text_iarchive</a> |
---|
124 | </code></dt> |
---|
125 | <dd> |
---|
126 | This is just a short hand for <code style="white-space: normal">text_iarchive_impl<text_iarchive></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_iarchive.hpp">interface_iarchive<polymorphic_iarchive></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_iarchive</code> uses. |
---|
139 | |
---|
140 | <p><dt><code> |
---|
141 | <a href="../../../boost/archive/polymorphic_iarchive.hpp">polymorphic_iarchive</a> |
---|
142 | </code></dt> |
---|
143 | <dd> |
---|
144 | A class with a list of virtual <code style="white-space: normal">load(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_iarchive_impl.hpp">polymorphic_iarchive_impl<text_iarchive_impl<text_iarchive> ></a> |
---|
150 | </code></dt> |
---|
151 | <dd><p> |
---|
152 | This class implements the <code style="white-space: normal">polymorphic_iarchive</code> in terms of a specific |
---|
153 | concrete class. Virtual function calls are forwarded to the implementing class. In this example, |
---|
154 | that impelenting class would be text_iarchive_impl. |
---|
155 | |
---|
156 | <p><dt><code> |
---|
157 | <a href="../../../boost/archive/polymorphic_text_iarchive.hpp">polymorphic_text_iarchive</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_iarchive_impl<text_iarchive_impl<text_iarchive> ></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> |
---|