1 #ifndef BOOST_SERIALIZATION_UNORDERED_MAP_HPP
2 #define BOOST_SERIALIZATION_UNORDERED_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/unordered_map.hpp:
11 // serialization for stl unordered_map templates
13 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
14 // (C) Copyright 2014 Jim Bell
15 // Use, modification and distribution is subject to the Boost Software
16 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
19 // See http://www.boost.org for updates, documentation, and revision history.
21 #include <boost/config.hpp>
23 #include <boost/unordered_map.hpp>
25 #include <boost/serialization/utility.hpp>
26 #include <boost/serialization/unordered_collections_save_imp.hpp>
27 #include <boost/serialization/unordered_collections_load_imp.hpp>
28 #include <boost/serialization/archive_input_unordered_map.hpp>
29 #include <boost/serialization/split_free.hpp>
32 namespace serialization {
43 const boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
44 const unsigned int /*file_version*/
46 boost::serialization::stl::save_unordered_collection<
48 boost::unordered_map<Key, HashFcn, EqualKey, Allocator>
61 boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
62 const unsigned int /*file_version*/
64 boost::serialization::stl::load_unordered_collection<
66 boost::unordered_map<Key, HashFcn, EqualKey, Allocator>,
67 boost::serialization::stl::archive_input_unordered_map<
69 boost::unordered_map<Key, HashFcn, EqualKey, Allocator>
74 // split non-intrusive serialization function member into separate
75 // non intrusive save/load member functions
83 inline void serialize(
85 boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
86 const unsigned int file_version
88 boost::serialization::split_free(ar, t, file_version);
101 const boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator> &t,
102 const unsigned int /*file_version*/
104 boost::serialization::stl::save_unordered_collection<
106 boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
119 boost::unordered_multimap<
120 Key, HashFcn, EqualKey, Allocator
122 const unsigned int /*file_version*/
124 boost::serialization::stl::load_unordered_collection<
126 boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>,
127 boost::serialization::stl::archive_input_unordered_multimap<
129 boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
134 // split non-intrusive serialization function member into separate
135 // non intrusive save/load member functions
143 inline void serialize(
145 boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator> &t,
146 const unsigned int file_version
148 boost::serialization::split_free(ar, t, file_version);
151 } // namespace serialization
154 #endif // BOOST_SERIALIZATION_UNORDERED_MAP_HPP