basic_pointer_iserializer.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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)
  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 basic_iarchive;
  32. class basic_iserializer;
  33. class BOOST_SYMBOL_VISIBLE basic_pointer_iserializer
  34. : public basic_serializer {
  35. protected:
  36. explicit BOOST_ARCHIVE_DECL basic_pointer_iserializer(
  37. const boost::serialization::extended_type_info & type_
  38. );
  39. virtual BOOST_ARCHIVE_DECL ~basic_pointer_iserializer();
  40. public:
  41. virtual void * heap_allocation() const = 0;
  42. virtual const basic_iserializer & get_basic_serializer() const = 0;
  43. virtual void load_object_ptr(
  44. basic_iarchive & ar,
  45. void * x,
  46. const unsigned int file_version
  47. ) const = 0;
  48. };
  49. } // namespace detail
  50. } // namespace archive
  51. } // namespace boost
  52. #ifdef BOOST_MSVC
  53. #pragma warning(pop)
  54. #endif
  55. #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
  56. #endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP