]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
2 | // basic_archive.cpp: | |
3 | ||
4 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . | |
5 | // Use, modification and distribution is subject to the Boost Software | |
6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
7 | // http://www.boost.org/LICENSE_1_0.txt) | |
8 | ||
9 | // See http://www.boost.org for updates, documentation, and revision history. | |
10 | ||
11 | ////////////////////////////////////////////////////////////////////// | |
12 | // | |
13 | // objects are stored as | |
14 | // | |
15 | // class_id* // -1 for a null pointer | |
16 | // if a new class id | |
17 | // [ | |
18 | // exported key - class name* | |
19 | // tracking level - always/never | |
20 | // class version | |
21 | // ] | |
22 | // | |
23 | // if tracking | |
24 | // [ | |
25 | // object_id | |
26 | // ] | |
27 | // | |
28 | // [ // if a new object id | |
29 | // data... | |
30 | // ] | |
31 | // | |
32 | // * required only for pointers - optional for objects | |
33 | ||
34 | #define BOOST_ARCHIVE_SOURCE | |
35 | #include <boost/serialization/config.hpp> | |
36 | #include <boost/archive/basic_archive.hpp> | |
37 | ||
38 | namespace boost { | |
39 | namespace archive { | |
40 | ||
41 | /////////////////////////////////////////////////////////////////////// | |
42 | // constants used in archive signature | |
43 | //This should never ever change. note that is not an std::string | |
44 | // string. | |
45 | BOOST_SYMBOL_VISIBLE const char * | |
46 | BOOST_ARCHIVE_SIGNATURE(){ | |
47 | return "serialization::archive"; | |
48 | } | |
49 | ||
50 | // this should change if the capabilities are added to the library | |
51 | // such that archives can be created which can't be read by previous | |
52 | // versions of this library | |
53 | // 1 - initial version | |
54 | // 2 - made address tracking optional | |
55 | // 3 - numerous changes - can't guarentee compatibility with previous versions | |
56 | // 4 - Boost 1.34 | |
57 | // added item_version to properly support versioning for collections | |
58 | // 5 - Boost 1.36 | |
59 | // changed serialization of collections: adding version even for primitive | |
60 | // types caused backwards compatibility breaking change in 1.35 | |
61 | // 6 - Boost 1.41 17 Nov 2009 | |
62 | // serializing collection sizes as std::size_t | |
63 | // 7 Boost 1.42 2 Feb 2010 | |
64 | // error - changed binary version to 16 bits w/o changing library version # | |
65 | // That is - binary archives are recorded with #6 even though they are | |
66 | // different from the previous versions. This means that binary archives | |
67 | // created with versions 1.42 and 1.43 will have to be fixed with a special | |
68 | // program which fixes the library version # in the header | |
69 | // Boost 1.43 6 May 2010 | |
70 | // no change | |
71 | // 8 - Boost 1.44 | |
72 | // separated version_type into library_version_type and class_version_type | |
73 | // changed version_type to be stored as 8 bits. | |
74 | // 10- fixed base64 output/input. | |
75 | // 11- not changes | |
76 | // 12- improved serialization of collections | |
77 | // 13- simplified visibility, removed Borland, removed pfto | |
78 | // 14- improved visibility, refactor map/set | |
b32b8144 FG |
79 | // 15- corrections to optional and collection loading |
80 | // 16- eliminated dependency on <codecvt> which is buggy in some libraries | |
81 | // and now officially deprecated in the standard | |
92f5a8d4 | 82 | // 17- Boost 1.68 August 2018 |
f67539c2 TL |
83 | // 18- addressed undefined behavior in archive constuctors. |
84 | // init() called from base wrote archive header before archive | |
85 | // was fully constructed. | |
7c673cae FG |
86 | |
87 | BOOST_SYMBOL_VISIBLE library_version_type | |
88 | BOOST_ARCHIVE_VERSION(){ | |
f67539c2 | 89 | return library_version_type(18); |
7c673cae FG |
90 | } |
91 | ||
92 | } // namespace archive | |
93 | } // namespace boost |