File indexing completed on 2024-11-15 09:31:00
0001 #ifndef BOOST_SERIALIZATION_LIST_HPP
0002 #define BOOST_SERIALIZATION_LIST_HPP
0003
0004
0005 #if defined(_MSC_VER)
0006 # pragma once
0007 #endif
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <list>
0020
0021 #include <boost/config.hpp>
0022
0023 #include <boost/serialization/collections_save_imp.hpp>
0024 #include <boost/serialization/collections_load_imp.hpp>
0025
0026 #include <boost/serialization/access.hpp>
0027 #include <boost/serialization/nvp.hpp>
0028 #include <boost/serialization/collection_size_type.hpp>
0029 #include <boost/serialization/item_version_type.hpp>
0030 #include <boost/serialization/library_version_type.hpp>
0031 #include <boost/serialization/split_free.hpp>
0032
0033 namespace boost {
0034 namespace serialization {
0035
0036 template<class Archive, class U, class Allocator>
0037 inline void save(
0038 Archive & ar,
0039 const std::list<U, Allocator> &t,
0040 const unsigned int
0041 ){
0042 boost::serialization::stl::save_collection<
0043 Archive,
0044 std::list<U, Allocator>
0045 >(ar, t);
0046 }
0047
0048 template<class Archive, class U, class Allocator>
0049 inline void load(
0050 Archive & ar,
0051 std::list<U, Allocator> &t,
0052 const unsigned int
0053 ){
0054 const boost::serialization::library_version_type library_version(
0055 ar.get_library_version()
0056 );
0057
0058 item_version_type item_version(0);
0059 collection_size_type count;
0060 ar >> BOOST_SERIALIZATION_NVP(count);
0061 if(boost::serialization::library_version_type(3) < library_version){
0062 ar >> BOOST_SERIALIZATION_NVP(item_version);
0063 }
0064 stl::collection_load_impl(ar, t, count, item_version);
0065 }
0066
0067
0068
0069 template<class Archive, class U, class Allocator>
0070 inline void serialize(
0071 Archive & ar,
0072 std::list<U, Allocator> & t,
0073 const unsigned int file_version
0074 ){
0075 boost::serialization::split_free(ar, t, file_version);
0076 }
0077
0078 }
0079 }
0080
0081 #include <boost/serialization/collection_traits.hpp>
0082
0083 BOOST_SERIALIZATION_COLLECTION_TRAITS(std::list)
0084
0085 #endif