basic_pointer_iserializer.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
  2. #define BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  8. // basic_pointer_oserializer.hpp: extenstion of type_info required for
  9. // serialization.
  10. // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  11. // Use, modification and distribution is subject to the Boost Software
  12. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. // See http://www.boost.org for updates, documentation, and revision history.
  15. #include <boost/config.hpp>
  16. #include <boost/noncopyable.hpp>
  17. #include <boost/archive/detail/auto_link_archive.hpp>
  18. #include <boost/archive/detail/basic_serializer.hpp>
  19. #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
  20. #ifdef BOOST_MSVC
  21. # pragma warning(push)
  22. # pragma warning(disable : 4511 4512)
  23. #endif
  24. namespace boost {
  25. namespace serialization {
  26. class extended_type_info;
  27. } // namespace serialization
  28. // forward declarations
  29. namespace archive {
  30. namespace detail {
  31. class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive;
  32. class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
  33. class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer
  34. : public basic_serializer {
  35. protected:
  36. explicit basic_pointer_iserializer(
  37. const boost::serialization::extended_type_info & type_
  38. );
  39. // account for bogus gcc warning
  40. #if defined(__GNUC__)
  41. virtual
  42. #endif
  43. ~basic_pointer_iserializer();
  44. public:
  45. virtual const basic_iserializer & get_basic_serializer() const = 0;
  46. virtual void load_object_ptr(
  47. basic_iarchive & ar,
  48. void * & x,
  49. const unsigned int file_version
  50. ) const = 0;
  51. };
  52. } // namespace detail
  53. } // namespace archive
  54. } // namespace boost
  55. #ifdef BOOST_MSVC
  56. #pragma warning(pop)
  57. #endif
  58. #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
  59. #endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP