williamr@2: #ifndef BOOST_SERIALIZATION_LEVEL_ENUM_HPP williamr@2: #define BOOST_SERIALIZATION_LEVEL_ENUM_HPP williamr@2: williamr@2: // MS compatible compilers support #pragma once williamr@2: #if defined(_MSC_VER) && (_MSC_VER >= 1020) williamr@2: # pragma once williamr@2: #endif williamr@2: williamr@2: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 williamr@2: // level_enum.hpp: williamr@2: williamr@2: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . williamr@2: // Use, modification and distribution is subject to the Boost Software williamr@2: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at williamr@2: // http://www.boost.org/LICENSE_1_0.txt) williamr@2: williamr@2: // See http://www.boost.org for updates, documentation, and revision history. williamr@2: williamr@2: namespace boost { williamr@2: namespace serialization { williamr@2: williamr@2: // for each class used in the program, specify which level williamr@2: // of serialization should be implemented williamr@2: williamr@2: // names for each level williamr@2: enum level_type williamr@2: { williamr@2: // Don't serialize this type. An attempt to do so should williamr@2: // invoke a compile time assertion. williamr@2: not_serializable = 0, williamr@2: // write/read this type directly to the archive. In this case williamr@2: // serialization code won't be called. This is the default williamr@2: // case for fundamental types. It presumes a member function or williamr@2: // template in the archive class that can handle this type. williamr@2: // there is no runtime overhead associated reading/writing williamr@2: // instances of this level williamr@2: primitive_type = 1, williamr@2: // Serialize the objects of this type using the objects "serialize" williamr@2: // function or template. This permits values to be written/read williamr@2: // to/from archives but includes no class or version information. williamr@2: object_serializable = 2, williamr@2: /////////////////////////////////////////////////////////////////// williamr@2: // once an object is serialized at one of the above levels, the williamr@2: // corresponding archives cannot be read if the implementation level williamr@2: // for the archive object is changed. williamr@2: /////////////////////////////////////////////////////////////////// williamr@2: // Add class information to the archive. Class information includes williamr@2: // implementation level, class version and class name if available williamr@2: object_class_info = 3 williamr@2: }; williamr@2: williamr@2: } // namespace serialization williamr@2: } // namespace boost williamr@2: williamr@2: #endif // BOOST_SERIALIZATION_LEVEL_ENUM_HPP