File indexing completed on 2025-01-18 09:40:57
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_MPI_DETAIL_FORWARD_SKELETON_IARCHIVE_HPP
0010 #define BOOST_MPI_DETAIL_FORWARD_SKELETON_IARCHIVE_HPP
0011
0012 #include <boost/archive/detail/auto_link_archive.hpp>
0013 #include <boost/archive/detail/iserializer.hpp>
0014 #include <boost/archive/detail/interface_iarchive.hpp>
0015 #include <boost/archive/detail/common_iarchive.hpp>
0016 #include <boost/serialization/collection_size_type.hpp>
0017
0018 namespace boost { namespace mpi { namespace detail {
0019
0020 template<class Archive, class ImplementationArchive>
0021 class forward_skeleton_iarchive
0022 : public archive::detail::common_iarchive<Archive>
0023 {
0024 public:
0025
0026 typedef ImplementationArchive implementation_archive_type;
0027
0028 forward_skeleton_iarchive(implementation_archive_type& ar)
0029 : archive::detail::common_iarchive<Archive>(archive::no_header),
0030 implementation_archive(ar)
0031 {
0032 }
0033
0034 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0035 public:
0036 #else
0037 friend class archive::detail::interface_iarchive<Archive>;
0038 friend class archive::load_access;
0039 protected:
0040 #endif
0041
0042 template<class T>
0043 void load_override(T & t)
0044 {
0045 archive::load(* this->This(), t);
0046 }
0047
0048 #define BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(T) \
0049 void load_override(T & t) \
0050 { \
0051 implementation_archive >> t; \
0052 }
0053
0054 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_optional_type)
0055 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::version_type)
0056 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_type)
0057 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_id_reference_type)
0058 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::object_id_type)
0059 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::object_reference_type)
0060 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::tracking_type)
0061 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(archive::class_name_type)
0062 BOOST_ARCHIVE_FORWARD_IMPLEMENTATION(serialization::collection_size_type)
0063
0064 void load_override(std::string & s)
0065 {
0066 serialization::collection_size_type length(s.size());
0067 load_override(length);
0068 s.resize(length);
0069 }
0070
0071 #undef BOOST_ARCHIVE_FORWARD_IMPLEMENTATION
0072 protected:
0073
0074 implementation_archive_type& implementation_archive;
0075 };
0076
0077
0078 } } }
0079
0080 #endif