Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:40:57

0001 // (C) Copyright 2005 Matthias Troyer 
0002 
0003 // Use, modification and distribution is subject to the Boost Software
0004 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 //  Authors: Matthias Troyer
0008 
0009 #ifndef BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
0010 #define BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP
0011 
0012 #include <boost/archive/detail/auto_link_archive.hpp>
0013 #include <boost/archive/detail/common_oarchive.hpp>
0014 #include <boost/archive/basic_archive.hpp>
0015 #include <boost/archive/detail/oserializer.hpp>
0016 #include <boost/serialization/collection_size_type.hpp>
0017 #include <boost/serialization/array.hpp>
0018 #include <boost/serialization/library_version_type.hpp>
0019 #include <boost/serialization/item_version_type.hpp>
0020 
0021 namespace boost { namespace mpi { namespace detail {
0022 
0023 template<class Archive>
0024 class ignore_skeleton_oarchive 
0025   : public archive::detail::common_oarchive<Archive>
0026 {
0027 public:
0028     ignore_skeleton_oarchive()
0029       : archive::detail::common_oarchive<Archive>(archive::no_header)
0030     {
0031     }
0032 
0033 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0034 public:
0035 #else
0036     friend class archive::detail::interface_oarchive<Archive>;
0037     friend class archive::save_access;
0038 protected:
0039 #endif
0040   template<class T>
0041   void save_override(T const& t)
0042   {
0043     archive::save(* this->This(), t);
0044   }
0045 
0046 #define BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(T) \
0047     void save_override(T const &)              \
0048     {}
0049 
0050 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_optional_type)
0051 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::version_type)
0052 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_type)
0053 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_id_reference_type)
0054 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_id_type)
0055 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::object_reference_type)
0056 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::tracking_type)
0057 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(archive::class_name_type)
0058 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::collection_size_type)
0059 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::library_version_type)
0060 BOOST_ARCHIVE_IGNORE_IMPLEMENTATION(serialization::item_version_type)
0061 
0062     void save_override(std::string const & s)       
0063     {
0064       if (s.size())
0065         save_override(serialization::make_array(s.data(),s.size()));
0066     }
0067 
0068 #undef BOOST_ARCHIVE_IGNORE_IMPLEMENTATION
0069 };
0070 
0071 
0072 } } } // end namespace boost::mpi::detail
0073 
0074 #endif // BOOST_MPI_DETAIL_IGNORE_SKELETON_OARCHIVE_HPP