sl@0: #ifndef BOOST_SERIALIZATION_WEAK_PTR_HPP sl@0: #define BOOST_SERIALIZATION_WEAK_PTR_HPP sl@0: sl@0: // MS compatible compilers support #pragma once sl@0: #if defined(_MSC_VER) && (_MSC_VER >= 1020) sl@0: # pragma once sl@0: #endif sl@0: sl@0: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 sl@0: // shared_ptr.hpp: serialization for boost shared pointer sl@0: sl@0: // (C) Copyright 2004 Robert Ramey and Martin Ecker sl@0: // Use, modification and distribution is subject to the Boost Software sl@0: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { sl@0: namespace serialization{ sl@0: sl@0: template sl@0: inline void save( sl@0: Archive & ar, sl@0: const boost::weak_ptr &t, sl@0: const unsigned int /* file_version */ sl@0: ){ sl@0: const boost::shared_ptr sp(t); sl@0: ar << boost::serialization::make_nvp(NULL, sp); sl@0: } sl@0: sl@0: template sl@0: inline void load( sl@0: Archive & ar, sl@0: boost::weak_ptr &t, sl@0: const unsigned int /* file_version */ sl@0: ){ sl@0: boost::shared_ptr sp; sl@0: ar >> boost::serialization::make_nvp(NULL, sp); sl@0: t = sp; sl@0: } sl@0: sl@0: template sl@0: inline void serialize( sl@0: Archive & ar, sl@0: boost::weak_ptr &t, sl@0: const unsigned int file_version sl@0: ){ sl@0: boost::serialization::split_free(ar, t, file_version); sl@0: } sl@0: sl@0: } // namespace serialization sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_SERIALIZATION_WEAK_PTR_HPP