Chris@16
|
1 // (C) Copyright 2005 Matthias Troyer
|
Chris@16
|
2
|
Chris@16
|
3 // Use, modification and distribution is subject to the Boost Software
|
Chris@16
|
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
5 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6
|
Chris@16
|
7 // Authors: Matthias Troyer
|
Chris@16
|
8
|
Chris@16
|
9 #ifndef BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
|
Chris@16
|
10 #define BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
|
Chris@16
|
11
|
Chris@16
|
12 #include <boost/serialization/pfto.hpp>
|
Chris@16
|
13
|
Chris@16
|
14 #include <boost/archive/detail/auto_link_archive.hpp>
|
Chris@16
|
15 #include <boost/archive/detail/common_oarchive.hpp>
|
Chris@16
|
16 #include <boost/archive/basic_archive.hpp>
|
Chris@16
|
17 #include <boost/archive/detail/oserializer.hpp>
|
Chris@16
|
18 #include <boost/serialization/collection_size_type.hpp>
|
Chris@16
|
19 #include <boost/serialization/array.hpp>
|
Chris@16
|
20 #include <boost/serialization/item_version_type.hpp>
|
Chris@16
|
21
|
Chris@16
|
22 namespace boost { namespace mpi { namespace detail {
|
Chris@16
|
23
|
Chris@16
|
24 template<class Archive>
|
Chris@16
|
25 class ignore_skeleton_oarchive
|
Chris@16
|
26 : public archive::detail::common_oarchive<Archive>
|
Chris@16
|
27 {
|
Chris@16
|
28 public:
|
Chris@16
|
29 ignore_skeleton_oarchive()
|
Chris@16
|
30 : archive::detail::common_oarchive<Archive>(archive::no_header)
|
Chris@16
|
31 {
|
Chris@16
|
32 }
|
Chris@16
|
33
|
Chris@16
|
34 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
Chris@16
|
35 public:
|
Chris@16
|
36 #else
|
Chris@16
|
37 friend class archive::detail::interface_oarchive<Archive>;
|
Chris@16
|
38 friend class archive::save_access;
|
Chris@16
|
39 protected:
|
Chris@16
|
40 #endif
|
Chris@16
|
41
|
Chris@16
|
42 // intermediate level to support override of operators
|
Chris@16
|
43 // for templates in the absence of partial function
|
Chris@16
|
44 // template ordering
|
Chris@16
|
45 template<class T>
|
Chris@16
|
46 void save_override(T const& t, BOOST_PFTO int)
|
Chris@16
|
47 {
|
Chris@16
|
48 archive::save(* this->This(), t);
|
Chris@16
|
49 }
|
Chris@16
|
50
|
Chris@16
|
51 #define BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(T) \
|
Chris@16
|
52 void save_override(T const & , int) \
|
Chris@16
|
53 {}
|
Chris@16
|
54
|
Chris@16
|
55 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_optional_type)
|
Chris@16
|
56 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::version_type)
|
Chris@16
|
57 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::library_version_type)
|
Chris@16
|
58 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_type)
|
Chris@16
|
59 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_reference_type)
|
Chris@16
|
60 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_id_type)
|
Chris@16
|
61 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_reference_type)
|
Chris@16
|
62 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::tracking_type)
|
Chris@16
|
63 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_name_type)
|
Chris@16
|
64 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::collection_size_type)
|
Chris@16
|
65 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::item_version_type)
|
Chris@16
|
66
|
Chris@16
|
67 void save_override(std::string const & s, int)
|
Chris@16
|
68 {
|
Chris@16
|
69 if (s.size())
|
Chris@16
|
70 save_override(serialization::make_array(s.data(),s.size()),0);
|
Chris@16
|
71 }
|
Chris@16
|
72
|
Chris@16
|
73 #undef BOOST_ARCHIVE_IGNORE_IMPLEMENTATION
|
Chris@16
|
74 };
|
Chris@16
|
75
|
Chris@16
|
76
|
Chris@16
|
77 } } } // end namespace boost::mpi::detail
|
Chris@16
|
78
|
Chris@16
|
79 #endif // BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
|