annotate DEPENDENCIES/generic/include/boost/ptr_container/serialize_ptr_vector.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // Copyright Sebastian Ramacher, 2007.
Chris@16 2 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 3 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 4 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5
Chris@16 6 #ifndef BOOST_PTR_CONTAINER_SERIALIZE_PTR_VECTOR_HPP
Chris@16 7 #define BOOST_PTR_CONTAINER_SERIALIZE_PTR_VECTOR_HPP
Chris@16 8
Chris@16 9 #include <boost/ptr_container/detail/serialize_reversible_cont.hpp>
Chris@16 10 #include <boost/ptr_container/ptr_vector.hpp>
Chris@16 11
Chris@16 12 namespace boost
Chris@16 13 {
Chris@16 14
Chris@16 15 namespace serialization
Chris@16 16 {
Chris@16 17
Chris@16 18 template<class Archive, class T, class CloneAllocator, class Allocator>
Chris@16 19 void load(Archive& ar, ptr_vector<T, CloneAllocator, Allocator>& c, unsigned int /*version*/)
Chris@16 20 {
Chris@16 21 typedef ptr_vector<T, CloneAllocator, Allocator> container_type;
Chris@16 22 typedef BOOST_DEDUCED_TYPENAME container_type::size_type size_type;
Chris@16 23
Chris@16 24 size_type n;
Chris@16 25 ar >> boost::serialization::make_nvp( ptr_container_detail::count(), n );
Chris@16 26 c.reserve(n);
Chris@16 27
Chris@16 28 ptr_container_detail::load_helper(ar, c, n);
Chris@16 29 }
Chris@16 30
Chris@16 31 template<class Archive, class T, class CloneAllocator, class Allocator>
Chris@16 32 void serialize(Archive& ar, ptr_vector<T, CloneAllocator, Allocator>& c, const unsigned int version)
Chris@16 33 {
Chris@16 34 split_free(ar, c, version);
Chris@16 35 }
Chris@16 36
Chris@16 37 } // namespace serialization
Chris@16 38 } // namespace boost
Chris@16 39
Chris@16 40 #endif