os/ossrv/ossrv_pub/boost_apis/boost/serialization/hash_map.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/serialization/hash_map.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,175 @@
     1.4 +#ifndef  BOOST_SERIALIZATION_HASH_MAP_HPP
     1.5 +#define BOOST_SERIALIZATION_HASH_MAP_HPP
     1.6 +
     1.7 +// MS compatible compilers support #pragma once
     1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
     1.9 +# pragma once
    1.10 +#endif
    1.11 +
    1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1.13 +// serialization/hash_map.hpp:
    1.14 +// serialization for stl hash_map templates
    1.15 +
    1.16 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
    1.17 +// Use, modification and distribution is subject to the Boost Software
    1.18 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1.19 +// http://www.boost.org/LICENSE_1_0.txt)
    1.20 +
    1.21 +//  See http://www.boost.org for updates, documentation, and revision history.
    1.22 +
    1.23 +#include <boost/config.hpp>
    1.24 +#ifdef BOOST_HAS_HASH
    1.25 +#include BOOST_HASH_MAP_HEADER
    1.26 +
    1.27 +#include <boost/serialization/utility.hpp>
    1.28 +#include <boost/serialization/hash_collections_save_imp.hpp>
    1.29 +#include <boost/serialization/hash_collections_load_imp.hpp>
    1.30 +#include <boost/serialization/split_free.hpp>
    1.31 +
    1.32 +namespace boost { 
    1.33 +namespace serialization {
    1.34 +
    1.35 +template<
    1.36 +    class Archive, 
    1.37 +    class Key, 
    1.38 +    class HashFcn, 
    1.39 +    class EqualKey,
    1.40 +    class Allocator
    1.41 +>
    1.42 +inline void save(
    1.43 +    Archive & ar,
    1.44 +    const BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.45 +        Key, HashFcn, EqualKey, Allocator
    1.46 +    > &t,
    1.47 +    const unsigned int file_version
    1.48 +){
    1.49 +    boost::serialization::stl::save_hash_collection<
    1.50 +        Archive, 
    1.51 +        BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.52 +            Key, HashFcn, EqualKey, Allocator
    1.53 +        >
    1.54 +    >(ar, t);
    1.55 +}
    1.56 +
    1.57 +template<
    1.58 +    class Archive, 
    1.59 +    class Key, 
    1.60 +    class HashFcn, 
    1.61 +    class EqualKey,
    1.62 +    class Allocator
    1.63 +>
    1.64 +inline void load(
    1.65 +    Archive & ar,
    1.66 +    BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.67 +        Key, HashFcn, EqualKey, Allocator
    1.68 +    > &t,
    1.69 +    const unsigned int file_version
    1.70 +){
    1.71 +    boost::serialization::stl::load_hash_collection<
    1.72 +        Archive,
    1.73 +        BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.74 +            Key, HashFcn, EqualKey, Allocator
    1.75 +        >,
    1.76 +        boost::serialization::stl::archive_input_unique<
    1.77 +            Archive, 
    1.78 +            BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.79 +                Key, HashFcn, EqualKey, Allocator
    1.80 +            >
    1.81 +        >
    1.82 +    >(ar, t);
    1.83 +}
    1.84 +
    1.85 +// split non-intrusive serialization function member into separate
    1.86 +// non intrusive save/load member functions
    1.87 +template<
    1.88 +    class Archive, 
    1.89 +    class Key, 
    1.90 +    class HashFcn, 
    1.91 +    class EqualKey,
    1.92 +    class Allocator
    1.93 +>
    1.94 +inline void serialize(
    1.95 +    Archive & ar,
    1.96 +    BOOST_STD_EXTENSION_NAMESPACE::hash_map<
    1.97 +        Key, HashFcn, EqualKey, Allocator
    1.98 +    > &t,
    1.99 +    const unsigned int file_version
   1.100 +){
   1.101 +    boost::serialization::split_free(ar, t, file_version);
   1.102 +}
   1.103 +
   1.104 +// hash_multimap
   1.105 +template<
   1.106 +    class Archive, 
   1.107 +    class Key, 
   1.108 +    class HashFcn, 
   1.109 +    class EqualKey,
   1.110 +    class Allocator
   1.111 +>
   1.112 +inline void save(
   1.113 +    Archive & ar,
   1.114 +    const BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.115 +        Key, HashFcn, EqualKey, Allocator
   1.116 +    > &t,
   1.117 +    const unsigned int file_version
   1.118 +){
   1.119 +    boost::serialization::stl::save_hash_collection<
   1.120 +        Archive, 
   1.121 +        BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.122 +            Key, HashFcn, EqualKey, Allocator
   1.123 +        >
   1.124 +    >(ar, t);
   1.125 +}
   1.126 +
   1.127 +template<
   1.128 +    class Archive, 
   1.129 +    class Key, 
   1.130 +    class HashFcn, 
   1.131 +    class EqualKey,
   1.132 +    class Allocator
   1.133 +>
   1.134 +inline void load(
   1.135 +    Archive & ar,
   1.136 +    BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.137 +        Key, HashFcn, EqualKey, Allocator
   1.138 +    > &t,
   1.139 +    const unsigned int file_version
   1.140 +){
   1.141 +    boost::serialization::stl::load_hash_collection<
   1.142 +        Archive,
   1.143 +        BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.144 +            Key, HashFcn, EqualKey, Allocator
   1.145 +        >,
   1.146 +        boost::serialization::stl::archive_input_multi<
   1.147 +            Archive, 
   1.148 +            BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.149 +                Key, HashFcn, EqualKey, Allocator
   1.150 +            >
   1.151 +        >
   1.152 +    >(ar, t);
   1.153 +}
   1.154 +
   1.155 +// split non-intrusive serialization function member into separate
   1.156 +// non intrusive save/load member functions
   1.157 +template<
   1.158 +    class Archive, 
   1.159 +    class Key, 
   1.160 +    class HashFcn, 
   1.161 +    class EqualKey,
   1.162 +    class Allocator
   1.163 +>
   1.164 +inline void serialize(
   1.165 +    Archive & ar,
   1.166 +    BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
   1.167 +        Key, HashFcn, EqualKey, Allocator
   1.168 +    > &t,
   1.169 +    const unsigned int file_version
   1.170 +){
   1.171 +    boost::serialization::split_free(ar, t, file_version);
   1.172 +}
   1.173 +
   1.174 +} // namespace serialization
   1.175 +} // namespace boost
   1.176 +
   1.177 +#endif // BOOST_HAS_HASH
   1.178 +#endif // BOOST_SERIALIZATION_HASH_MAP_HPP