os/ossrv/ossrv_pub/boost_apis/boost/serialization/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/map.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,118 @@
     1.4 +#ifndef  BOOST_SERIALIZATION_MAP_HPP
     1.5 +#define BOOST_SERIALIZATION_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/map.hpp:
    1.14 +// serialization for stl 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 <map>
    1.24 +
    1.25 +#include <boost/config.hpp>
    1.26 +
    1.27 +#include <boost/serialization/utility.hpp>
    1.28 +#include <boost/serialization/collections_save_imp.hpp>
    1.29 +#include <boost/serialization/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<class Archive, class Type, class Key, class Compare, class Allocator >
    1.36 +inline void save(
    1.37 +    Archive & ar,
    1.38 +    const std::map<Key, Type, Compare, Allocator> &t,
    1.39 +    const unsigned int /* file_version */
    1.40 +){
    1.41 +    boost::serialization::stl::save_collection<
    1.42 +        Archive, 
    1.43 +        std::map<Key, Type, Compare, Allocator> 
    1.44 +    >(ar, t);
    1.45 +}
    1.46 +
    1.47 +template<class Archive, class Type, class Key, class Compare, class Allocator >
    1.48 +inline void load(
    1.49 +    Archive & ar,
    1.50 +    std::map<Key, Type, Compare, Allocator> &t,
    1.51 +    const unsigned int /* file_version */
    1.52 +){
    1.53 +    boost::serialization::stl::load_collection<
    1.54 +        Archive,
    1.55 +        std::map<Key, Type, Compare, Allocator>,
    1.56 +        boost::serialization::stl::archive_input_unique<
    1.57 +            Archive, std::map<Key, Type, Compare, Allocator> >,
    1.58 +            boost::serialization::stl::no_reserve_imp<std::map<
    1.59 +                Key, Type, Compare, Allocator
    1.60 +            >
    1.61 +        >
    1.62 +    >(ar, t);
    1.63 +}
    1.64 +
    1.65 +// split non-intrusive serialization function member into separate
    1.66 +// non intrusive save/load member functions
    1.67 +template<class Archive, class Type, class Key, class Compare, class Allocator >
    1.68 +inline void serialize(
    1.69 +    Archive & ar,
    1.70 +    std::map<Key, Type, Compare, Allocator> &t,
    1.71 +    const unsigned int file_version
    1.72 +){
    1.73 +    boost::serialization::split_free(ar, t, file_version);
    1.74 +}
    1.75 +
    1.76 +// multimap
    1.77 +template<class Archive, class Type, class Key, class Compare, class Allocator >
    1.78 +inline void save(
    1.79 +    Archive & ar,
    1.80 +    const std::multimap<Key, Type, Compare, Allocator> &t,
    1.81 +    const unsigned int /* file_version */
    1.82 +){
    1.83 +    boost::serialization::stl::save_collection<
    1.84 +        Archive, 
    1.85 +        std::multimap<Key, Type, Compare, Allocator> 
    1.86 +    >(ar, t);
    1.87 +}
    1.88 +
    1.89 +template<class Archive, class Type, class Key, class Compare, class Allocator >
    1.90 +inline void load(
    1.91 +    Archive & ar,
    1.92 +    std::multimap<Key, Type, Compare, Allocator> &t,
    1.93 +    const unsigned int /* file_version */
    1.94 +){
    1.95 +    boost::serialization::stl::load_collection<
    1.96 +        Archive,
    1.97 +        std::multimap<Key, Type, Compare, Allocator>,
    1.98 +        boost::serialization::stl::archive_input_multi<
    1.99 +            Archive, std::multimap<Key, Type, Compare, Allocator> 
   1.100 +        >,
   1.101 +        boost::serialization::stl::no_reserve_imp<
   1.102 +            std::multimap<Key, Type, Compare, Allocator> 
   1.103 +        >
   1.104 +    >(ar, t);
   1.105 +}
   1.106 +
   1.107 +// split non-intrusive serialization function member into separate
   1.108 +// non intrusive save/load member functions
   1.109 +template<class Archive, class Type, class Key, class Compare, class Allocator >
   1.110 +inline void serialize(
   1.111 +    Archive & ar,
   1.112 +    std::multimap<Key, Type, Compare, Allocator> &t,
   1.113 +    const unsigned int file_version
   1.114 +){
   1.115 +    boost::serialization::split_free(ar, t, file_version);
   1.116 +}
   1.117 +
   1.118 +} // serialization
   1.119 +} // namespace boost
   1.120 +
   1.121 +#endif // BOOST_SERIALIZATION_MAP_HPP