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 | // file 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/archive/basic_archive.hpp> |
---|
36 | |
---|
37 | namespace boost { |
---|
38 | namespace archive { |
---|
39 | |
---|
40 | /////////////////////////////////////////////////////////////////////// |
---|
41 | // constants used in archive signature |
---|
42 | //This should never ever change. note that is not an std::string |
---|
43 | // string. |
---|
44 | BOOST_ARCHIVE_DECL(const char *) |
---|
45 | ARCHIVE_SIGNATURE(){ |
---|
46 | return "serialization::archive"; |
---|
47 | } |
---|
48 | |
---|
49 | // this should change if the capabilities are added to the library |
---|
50 | // such that archives can be created which can't be read by previous |
---|
51 | // versions of this library |
---|
52 | // 1 - initial version |
---|
53 | // 2 - made address tracking optional |
---|
54 | // 3 - numerous changes - can't guarentee compatibility with previous versions |
---|
55 | |
---|
56 | BOOST_ARCHIVE_DECL(unsigned char) |
---|
57 | ARCHIVE_VERSION(){ |
---|
58 | return 3; |
---|
59 | } |
---|
60 | |
---|
61 | } // namespace archive |
---|
62 | } // namespace boost |
---|