fix doc example typo
[boost.git] / boost / mpi / detail / forward_skeleton_iarchive.hpp
blobb5dfed0024b79f2340801d05a9188760009d8ba2
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_FORWARD_SKELETON_IARCHIVE_HPP
10 #define BOOST_MPI_DETAIL_FORWARD_SKELETON_IARCHIVE_HPP
12 #include <boost/serialization/pfto.hpp>
14 #include <boost/archive/detail/auto_link_archive.hpp>
15 #include <boost/archive/detail/iserializer.hpp>
16 #include <boost/archive/detail/interface_iarchive.hpp>
17 #include <boost/archive/detail/common_iarchive.hpp>
18 #include <boost/serialization/collection_size_type.hpp>
20 namespace boost { namespace mpi { namespace detail {
22 template<class Archive, class ImplementationArchive>
23 class forward_skeleton_iarchive
24 : public archive::detail::common_iarchive<Archive>
26 public:
28 typedef ImplementationArchive implementation_archive_type;
30 forward_skeleton_iarchive(implementation_archive_type& ar)
31 : archive::detail::common_iarchive<Archive>(archive::no_header),
32 implementation_archive(ar)
36 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
37 public:
38 #else
39 friend class archive::detail::interface_iarchive<Archive>;
40 friend class archive::load_access;
41 protected:
42 #endif
44 // intermediate level to support override of operators
45 // for templates in the absence of partial function
46 // template ordering
47 template<class T>
48 void load_override(T & t, BOOST_PFTO int)
50 archive::load(* this->This(), t);
53 #define BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(T) \
54 void load_override(T & t , int) \
55 { \
56 implementation_archive >> t; \
59 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_optional_type)
60 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::version_type)
61 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_type)
62 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_reference_type)
63 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::object_id_type)
64 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::tracking_type)
65 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_name_type)
66 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(serialization::collection_size_type)
68 #undef BOOST_ARCHIVE_FORWARD_IMPLEMENTATION
69 protected:
70 /// the actual archive used to serialize the information we actually want to store
71 implementation_archive_type& implementation_archive;
75 } } } // end namespace boost::mpi::detail
77 #endif // BOOST_MPI_DETAIL_FORWARD_SKELETON_IARCHIVE_HPP