1 // (C) Copyright 2005 Matthias Troyer
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // Authors: Matthias Troyer
9 #ifndef BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
10 #define BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
12 #include <boost/archive/detail/auto_link_archive.hpp>
13 #include <boost/archive/detail/common_oarchive.hpp>
14 #include <boost/archive/basic_archive.hpp>
15 #include <boost/archive/detail/oserializer.hpp>
16 #include <boost/serialization/collection_size_type.hpp>
17 #include <boost/serialization/array.hpp>
18 #include <boost/serialization/item_version_type.hpp>
20 namespace boost { namespace mpi { namespace detail {
22 template<class Archive>
23 class ignore_skeleton_oarchive
24 : public archive::detail::common_oarchive<Archive>
27 ignore_skeleton_oarchive()
28 : archive::detail::common_oarchive<Archive>(archive::no_header)
32 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
35 friend class archive::detail::interface_oarchive<Archive>;
36 friend class archive::save_access;
40 void save_override(T const& t)
42 archive::save(* this->This(), t);
45 #define BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(T) \
46 void save_override(T const &) \
49 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_optional_type)
50 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::version_type)
51 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::library_version_type)
52 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_type)
53 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_reference_type)
54 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_id_type)
55 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_reference_type)
56 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::tracking_type)
57 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_name_type)
58 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::collection_size_type)
59 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::item_version_type)
61 void save_override(std::string const & s)
64 save_override(serialization::make_array(s.data(),s.size()));
67 #undef BOOST_ARCHIVE_IGNORE_IMPLEMENTATION
71 } } } // end namespace boost::mpi::detail
73 #endif // BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP