Chris@16
|
1 #ifndef BOOST_SERIALIZATION_LEVEL_ENUM_HPP
|
Chris@16
|
2 #define BOOST_SERIALIZATION_LEVEL_ENUM_HPP
|
Chris@16
|
3
|
Chris@16
|
4 // MS compatible compilers support #pragma once
|
Chris@101
|
5 #if defined(_MSC_VER)
|
Chris@16
|
6 # pragma once
|
Chris@16
|
7 #endif
|
Chris@16
|
8
|
Chris@16
|
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
Chris@16
|
10 // level_enum.hpp:
|
Chris@16
|
11
|
Chris@16
|
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
Chris@16
|
13 // Use, modification and distribution is subject to the Boost Software
|
Chris@16
|
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
15 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
16
|
Chris@16
|
17 // See http://www.boost.org for updates, documentation, and revision history.
|
Chris@16
|
18
|
Chris@16
|
19 namespace boost {
|
Chris@16
|
20 namespace serialization {
|
Chris@16
|
21
|
Chris@16
|
22 // for each class used in the program, specify which level
|
Chris@16
|
23 // of serialization should be implemented
|
Chris@16
|
24
|
Chris@16
|
25 // names for each level
|
Chris@16
|
26 enum level_type
|
Chris@16
|
27 {
|
Chris@16
|
28 // Don't serialize this type. An attempt to do so should
|
Chris@16
|
29 // invoke a compile time assertion.
|
Chris@16
|
30 not_serializable = 0,
|
Chris@16
|
31 // write/read this type directly to the archive. In this case
|
Chris@16
|
32 // serialization code won't be called. This is the default
|
Chris@16
|
33 // case for fundamental types. It presumes a member function or
|
Chris@16
|
34 // template in the archive class that can handle this type.
|
Chris@16
|
35 // there is no runtime overhead associated reading/writing
|
Chris@16
|
36 // instances of this level
|
Chris@16
|
37 primitive_type = 1,
|
Chris@16
|
38 // Serialize the objects of this type using the objects "serialize"
|
Chris@16
|
39 // function or template. This permits values to be written/read
|
Chris@16
|
40 // to/from archives but includes no class or version information.
|
Chris@16
|
41 object_serializable = 2,
|
Chris@16
|
42 ///////////////////////////////////////////////////////////////////
|
Chris@16
|
43 // once an object is serialized at one of the above levels, the
|
Chris@16
|
44 // corresponding archives cannot be read if the implementation level
|
Chris@16
|
45 // for the archive object is changed.
|
Chris@16
|
46 ///////////////////////////////////////////////////////////////////
|
Chris@16
|
47 // Add class information to the archive. Class information includes
|
Chris@16
|
48 // implementation level, class version and class name if available
|
Chris@16
|
49 object_class_info = 3
|
Chris@16
|
50 };
|
Chris@16
|
51
|
Chris@16
|
52 } // namespace serialization
|
Chris@16
|
53 } // namespace boost
|
Chris@16
|
54
|
Chris@16
|
55 #endif // BOOST_SERIALIZATION_LEVEL_ENUM_HPP
|