text_skeleton_oarchive.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // (C) Copyright 2005 Matthias Troyer
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Authors: Matthias Troyer
  6. #ifndef BOOST_MPI_TEXT_SKELETON_OARCHIVE_HPP
  7. #define BOOST_MPI_TEXT_SKELETON_OARCHIVE_HPP
  8. #include <boost/archive/detail/auto_link_archive.hpp>
  9. #include <boost/archive/text_oarchive.hpp>
  10. #include <boost/mpi/detail/forward_skeleton_oarchive.hpp>
  11. #include <boost/mpi/detail/ignore_oprimitive.hpp>
  12. #include <boost/archive/detail/register_archive.hpp>
  13. namespace boost { namespace mpi {
  14. // an archive that writes a text skeleton into a stream
  15. class text_skeleton_oarchive
  16. : public detail::ignore_oprimitive,
  17. public detail::forward_skeleton_oarchive<text_skeleton_oarchive,boost::archive::text_oarchive>
  18. {
  19. public:
  20. text_skeleton_oarchive(std::ostream & s, unsigned int flags = 0)
  21. : detail::forward_skeleton_oarchive<text_skeleton_oarchive,boost::archive::text_oarchive>(skeleton_archive_)
  22. , skeleton_archive_(s,flags)
  23. {}
  24. private:
  25. boost::archive::text_oarchive skeleton_archive_;
  26. };
  27. namespace detail {
  28. typedef boost::mpi::detail::forward_skeleton_oarchive<boost::mpi::text_skeleton_oarchive,boost::archive::text_oarchive> type3;
  29. }
  30. } } // end namespace boost::mpi
  31. // required by export
  32. BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::mpi::text_skeleton_oarchive)
  33. BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::mpi::detail::type3)
  34. #endif // BOOST_MPI_TEXT_SKELETON_OARCHIVE_HPP