basic_pointer_oserializer.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
  2. #define BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_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: extension 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. namespace archive {
  29. namespace detail {
  30. class basic_oarchive;
  31. class basic_oserializer;
  32. class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer :
  33. public basic_serializer
  34. {
  35. protected:
  36. explicit BOOST_ARCHIVE_DECL basic_pointer_oserializer(
  37. const boost::serialization::extended_type_info & type_
  38. );
  39. public:
  40. virtual BOOST_ARCHIVE_DECL ~basic_pointer_oserializer();
  41. virtual const basic_oserializer & get_basic_serializer() const = 0;
  42. virtual void save_object_ptr(
  43. basic_oarchive & ar,
  44. const void * x
  45. ) const = 0;
  46. };
  47. } // namespace detail
  48. } // namespace archive
  49. } // namespace boost
  50. #ifdef BOOST_MSVC
  51. #pragma warning(pop)
  52. #endif
  53. #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
  54. #endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP