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_IGNORE_OPRIMITIVE_HPP
10 #define BOOST_MPI_DETAIL_IGNORE_OPRIMITIVE_HPP
12 #include <boost/config.hpp>
13 #include <boost/mpi/datatype.hpp>
14 #include <boost/serialization/array.hpp>
16 namespace boost { namespace mpi { namespace detail {
18 /// @brief a minimal output archive, which ignores any save
20 /// This class implements a minimal output archive, probably an output archive
21 /// archetype, doing nothing at any save. It's use, besides acting as an
22 /// archetype is as a base class to implement special archives that ignore
23 /// saving of most types
25 class ignore_oprimitive
28 /// a trivial default constructor
32 /// don't do anything when saving binary data
33 void save_binary(const void *, std::size_t )
37 /// don't do anything when saving arrays
39 void save_array(serialization::array_wrapper<T> const&, unsigned int )
43 typedef is_mpi_datatype<mpl::_1> use_array_optimization;
46 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
47 friend class archive::save_access;
53 /// don't do anything when saving primitive types
60 } } } // end namespace boost::mpi::detail
62 #endif // BOOST_MPI_DETAIL_IGNORE_OPRIMITIVE_HPP