File indexing completed on 2024-11-15 09:29:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_PTR_CONTAINER_SERIALIZE_PTR_CIRCULAR_BUFFER_HPP
0013 #define BOOST_PTR_CONTAINER_SERIALIZE_PTR_CIRCULAR_BUFFER_HPP
0014
0015 #include <boost/ptr_container/detail/serialize_reversible_cont.hpp>
0016 #include <boost/ptr_container/ptr_circular_buffer.hpp>
0017
0018 namespace boost
0019 {
0020
0021 namespace serialization
0022 {
0023
0024 template<class Archive, class T, class CloneAllocator, class Allocator>
0025 void load(Archive& ar, ptr_circular_buffer<T, CloneAllocator, Allocator>& c, unsigned int version)
0026 {
0027 typedef ptr_circular_buffer<T, CloneAllocator, Allocator> container_type;
0028 typedef BOOST_DEDUCED_TYPENAME container_type::size_type size_type;
0029
0030 size_type n;
0031 ar >> boost::serialization::make_nvp( ptr_container_detail::count(), n );
0032 c.reserve(n);
0033
0034 ptr_container_detail::load_helper(ar, c, n);
0035 }
0036
0037 template<class Archive, class T, class CloneAllocator, class Allocator>
0038 void serialize(Archive& ar, ptr_circular_buffer<T, CloneAllocator, Allocator>& c, const unsigned int version)
0039 {
0040 core::split_free(ar, c, version);
0041 }
0042
0043 }
0044 }
0045
0046 #endif