Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:29:35

0001 //
0002 // Boost.Pointer Container
0003 //
0004 //  Copyright Thorsten Ottosen 2008. Use, modification and
0005 //  distribution is subject to the Boost Software License, Version
0006 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 //  http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // For more information, see http://www.boost.org/libs/ptr_container/
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 } // namespace serialization
0044 } // namespace boost
0045 
0046 #endif