ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
unordered_map.h
Go to the documentation of this file.
1 #ifndef BOOST_SERIALIZATION_UNORDEREDMAP_HPP
2 #define BOOST_SERIALIZATION_UNORDEREDMAP_HPP
3 
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
6 # pragma once
7 #endif
8 
10 // serialization/map.hpp:
11 // serialization for stl map templates
12 
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)
17 
18 // See http://www.boost.org for updates, documentation, and revision history.
19 
20 #include <boost/unordered_map.hpp>
21 
22 #include <boost/config.hpp>
23 
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>
28 
29 namespace boost {
30 namespace serialization {
31 
32  template<class Archive, class Type, class Key, class Hash, class Compare, class Allocator >
33  inline void save(
34  Archive & ar,
35  const boost::unordered_map<Key, Type, Hash, Compare, Allocator> &t,
36  const unsigned int /* file_version */
37  ){
38  boost::serialization::stl::save_collection<
39  Archive,
40  boost::unordered_map<Key, Type, Hash, Compare, Allocator>
41  >(ar, t);
42  }
43 
44  template<class Archive, class Type, class Key, class Hash, class Compare, class Allocator >
45  inline void load(
46  Archive & ar,
47  boost::unordered_map<Key, Type, Hash, Compare, Allocator> &t,
48  const unsigned int /* file_version */
49  ){
50  boost::serialization::stl::load_collection<
51  Archive,
52  boost::unordered_map<Key, Type, Hash, Compare, Allocator>,
53  boost::serialization::stl::archive_input_map<
54  Archive, boost::unordered_map<Key, Type, Hash, Compare, Allocator> >,
55  boost::serialization::stl::no_reserve_imp<boost::unordered_map<
56  Key, Type, Hash, Compare, Allocator>
57  >
58  >(ar, t);
59  }
60 
61  // split non-intrusive serialization function member into separate
62  // non intrusive save/load member functions
63  template<class Archive, class Type, class Key, class Hash, class Compare, class Allocator >
64  inline void serialize(
65  Archive & ar,
66  boost::unordered_map<Key, Type, Hash, Compare, Allocator> &t,
67  const unsigned int file_version
68  ){
69  boost::serialization::split_free(ar, t, file_version);
70  }
71 } // serialization
72 } // namespace boost
73 
74 #endif // BOOST_SERIALIZATION_UNORDEREDMAP_HPP
void load(Archive &ar, boost::unordered_map< Key, Type, Hash, Compare, Allocator > &t, const unsigned int)
Definition: unordered_map.h:45
void save(Archive &ar, const boost::unordered_map< Key, Type, Hash, Compare, Allocator > &t, const unsigned int)
Definition: unordered_map.h:33
void serialize(Archive &ar, boost::unordered_map< Key, Type, Hash, Compare, Allocator > &t, const unsigned int file_version)
Definition: unordered_map.h:64