Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:37

0001 // Copyright Sebastian Ramacher, 2007.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_PTR_CONTAINER_SERIALIZE_PTR_VECTOR_HPP
0007 #define BOOST_PTR_CONTAINER_SERIALIZE_PTR_VECTOR_HPP
0008 
0009 #include <boost/ptr_container/detail/serialize_reversible_cont.hpp>
0010 #include <boost/ptr_container/ptr_vector.hpp>
0011 
0012 namespace boost
0013 {
0014 
0015 namespace serialization
0016 {
0017 
0018 template<class Archive, class T, class CloneAllocator, class Allocator>
0019 void load(Archive& ar, ptr_vector<T, CloneAllocator, Allocator>& c, unsigned int /*version*/)
0020 {
0021     typedef ptr_vector<T, CloneAllocator, Allocator> container_type;
0022     typedef BOOST_DEDUCED_TYPENAME container_type::size_type size_type;
0023 
0024     size_type n;
0025     ar >> boost::serialization::make_nvp( ptr_container_detail::count(), n );
0026     c.reserve(n);
0027 
0028     ptr_container_detail::load_helper(ar, c, n);
0029 }
0030 
0031 template<class Archive, class T, class CloneAllocator, class Allocator>
0032 void serialize(Archive& ar, ptr_vector<T, CloneAllocator, Allocator>& c, const unsigned int version)
0033 {
0034    core::split_free(ar, c, version);
0035 }
0036 
0037 } // namespace serialization
0038 } // namespace boost
0039 
0040 #endif