1 #ifndef BOOST_SERIALIZATION_MAP_HPP
2 #define BOOST_SERIALIZATION_MAP_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // serialization/map.hpp:
11 // serialization for stl map templates
13 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
14 // Use, modification and distribution is subject to the Boost Software
15 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
18 // See http://www.boost.org for updates, documentation, and revision history.
22 #include <boost/config.hpp>
24 #include <boost/serialization/utility.hpp>
25 #include <boost/serialization/collections_save_imp.hpp>
26 #include <boost/serialization/collections_load_imp.hpp>
27 #include <boost/serialization/split_free.hpp>
30 namespace serialization
{
32 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
35 const std::map
<Key
, Type
, Compare
, Allocator
> &t
,
36 const unsigned int /* file_version */
38 boost::serialization::stl::save_collection
<
40 std::map
<Key
, Type
, Compare
, Allocator
>
44 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
47 std::map
<Key
, Type
, Compare
, Allocator
> &t
,
48 const unsigned int /* file_version */
50 boost::serialization::stl::load_collection
<
52 std::map
<Key
, Type
, Compare
, Allocator
>,
53 boost::serialization::stl::archive_input_map
<
54 Archive
, std::map
<Key
, Type
, Compare
, Allocator
> >,
55 boost::serialization::stl::no_reserve_imp
<std::map
<
56 Key
, Type
, Compare
, Allocator
62 // split non-intrusive serialization function member into separate
63 // non intrusive save/load member functions
64 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
65 inline void serialize(
67 std::map
<Key
, Type
, Compare
, Allocator
> &t
,
68 const unsigned int file_version
70 boost::serialization::split_free(ar
, t
, file_version
);
74 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
77 const std::multimap
<Key
, Type
, Compare
, Allocator
> &t
,
78 const unsigned int /* file_version */
80 boost::serialization::stl::save_collection
<
82 std::multimap
<Key
, Type
, Compare
, Allocator
>
86 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
89 std::multimap
<Key
, Type
, Compare
, Allocator
> &t
,
90 const unsigned int /* file_version */
92 boost::serialization::stl::load_collection
<
94 std::multimap
<Key
, Type
, Compare
, Allocator
>,
95 boost::serialization::stl::archive_input_multimap
<
96 Archive
, std::multimap
<Key
, Type
, Compare
, Allocator
>
98 boost::serialization::stl::no_reserve_imp
<
99 std::multimap
<Key
, Type
, Compare
, Allocator
>
104 // split non-intrusive serialization function member into separate
105 // non intrusive save/load member functions
106 template<class Archive
, class Type
, class Key
, class Compare
, class Allocator
>
107 inline void serialize(
109 std::multimap
<Key
, Type
, Compare
, Allocator
> &t
,
110 const unsigned int file_version
112 boost::serialization::split_free(ar
, t
, file_version
);
118 #endif // BOOST_SERIALIZATION_MAP_HPP