]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // (C) Copyright 2005 Matthias Troyer |
2 | ||
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) | |
6 | ||
7 | // Authors: Matthias Troyer | |
8 | ||
9 | #ifndef BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP | |
10 | #define BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP | |
11 | ||
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> | |
19 | ||
20 | namespace boost { namespace mpi { namespace detail { | |
21 | ||
22 | template<class Archive> | |
23 | class ignore_skeleton_oarchive | |
24 | : public archive::detail::common_oarchive<Archive> | |
25 | { | |
26 | public: | |
27 | ignore_skeleton_oarchive() | |
28 | : archive::detail::common_oarchive<Archive>(archive::no_header) | |
29 | { | |
30 | } | |
31 | ||
32 | #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS | |
33 | public: | |
34 | #else | |
35 | friend class archive::detail::interface_oarchive<Archive>; | |
36 | friend class archive::save_access; | |
37 | protected: | |
38 | #endif | |
39 | template<class T> | |
40 | void save_override(T const& t) | |
41 | { | |
42 | archive::save(* this->This(), t); | |
43 | } | |
44 | ||
45 | #define BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(T) \ | |
46 | void save_override(T const &) \ | |
47 | {} | |
48 | ||
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) | |
60 | ||
61 | void save_override(std::string const & s) | |
62 | { | |
63 | if (s.size()) | |
64 | save_override(serialization::make_array(s.data(),s.size())); | |
65 | } | |
66 | ||
67 | #undef BOOST_ARCHIVE_IGNORE_IMPLEMENTATION | |
68 | }; | |
69 | ||
70 | ||
71 | } } } // end namespace boost::mpi::detail | |
72 | ||
73 | #endif // BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP |