level_enum.hpp 2.1 KB

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