Chris@16: // (C) Copyright 2005 Matthias Troyer Chris@16: Chris@16: // Use, modification and distribution is subject to the Boost Software Chris@16: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // Authors: Matthias Troyer Chris@16: Chris@16: #ifndef BOOST_MPI_DETAIL_IGNORE_IPRIMITIVE_HPP Chris@16: #define BOOST_MPI_DETAIL_IGNORE_IPRIMITIVE_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: Chris@16: namespace boost { namespace mpi { namespace detail { Chris@16: Chris@16: /// @brief a minimal input archive, which ignores any load Chris@16: /// Chris@16: /// This class implements a minimal input archive, probably an input archive Chris@16: /// archetype, doing nothing at any load. It's use, besides acting as an Chris@16: /// archetype is as a base class to implement special archives that ignore Chris@16: /// loading of most types Chris@16: Chris@16: class ignore_iprimitive Chris@16: { Chris@16: public: Chris@16: /// a trivial default constructor Chris@16: ignore_iprimitive() Chris@16: {} Chris@16: Chris@16: Chris@16: /// don't do anything when loading binary data Chris@16: void load_binary(void *, std::size_t ) Chris@16: {} Chris@16: Chris@16: /// don't do anything when loading arrays Chris@16: template Chris@16: void load_array(serialization::array &, unsigned int ) Chris@16: {} Chris@16: Chris@16: typedef is_mpi_datatype use_array_optimization; Chris@16: Chris@16: /// don't do anything when loading primitive types Chris@16: template Chris@16: void load(T &) Chris@16: { Chris@16: } Chris@16: }; Chris@16: Chris@16: } } } // end namespace boost::mpi::detail Chris@16: Chris@16: #endif // BOOST_MPI_DETAIL_IGNORE_IPRIMITIVE_HPP