12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef BOOST_MPI_DETAIL_FORWARD_OPRIMITIVE_HPP
- #define BOOST_MPI_DETAIL_FORWARD_OPRIMITIVE_HPP
- #include <boost/config.hpp>
- #include <boost/serialization/array.hpp>
- namespace boost { namespace mpi { namespace detail {
- template <class ImplementationArchive>
- class forward_oprimitive
- {
- public:
-
- typedef ImplementationArchive implementation_archive_type;
-
-
- forward_oprimitive(implementation_archive_type& ar)
- : implementation_archive(ar)
- {}
-
- void save_binary(const void * address, std::size_t count)
- {
- implementation_archive.save_binary(address,count);
- }
-
-
- template<class T>
- void save_array(serialization::array_wrapper<T> const& x, unsigned int file_version )
- {
- implementation_archive.save_array(x,file_version);
- }
- typedef typename ImplementationArchive::use_array_optimization use_array_optimization;
- #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
- friend class archive::save_access;
- protected:
- #else
- public:
- #endif
-
- template<class T>
- void save(const T & t)
- {
- implementation_archive << t;
- }
- private:
- implementation_archive_type& implementation_archive;
- };
- } } }
- #endif
|