1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/serialization/set.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,120 @@
1.4 +#ifndef BOOST_SERIALIZATION_SET_HPP
1.5 +#define BOOST_SERIALIZATION_SET_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 +// set.hpp: serialization for stl set templates
1.14 +
1.15 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
1.16 +// Use, modification and distribution is subject to the Boost Software
1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.18 +// http://www.boost.org/LICENSE_1_0.txt)
1.19 +
1.20 +// See http://www.boost.org for updates, documentation, and revision history.
1.21 +
1.22 +#include <set>
1.23 +
1.24 +#include <boost/config.hpp>
1.25 +
1.26 +#include <boost/serialization/collections_save_imp.hpp>
1.27 +#include <boost/serialization/collections_load_imp.hpp>
1.28 +#include <boost/serialization/split_free.hpp>
1.29 +
1.30 +namespace boost {
1.31 +namespace serialization {
1.32 +
1.33 +template<class Archive, class Key, class Compare, class Allocator >
1.34 +inline void save(
1.35 + Archive & ar,
1.36 + const std::set<Key, Compare, Allocator> &t,
1.37 + const unsigned int /* file_version */
1.38 +){
1.39 + boost::serialization::stl::save_collection<
1.40 + Archive, std::set<Key, Compare, Allocator>
1.41 + >(ar, t);
1.42 +}
1.43 +
1.44 +template<class Archive, class Key, class Compare, class Allocator >
1.45 +inline void load(
1.46 + Archive & ar,
1.47 + std::set<Key, Compare, Allocator> &t,
1.48 + const unsigned int /* file_version */
1.49 +){
1.50 + boost::serialization::stl::load_collection<
1.51 + Archive,
1.52 + std::set<Key, Compare, Allocator>,
1.53 + boost::serialization::stl::archive_input_unique<
1.54 + Archive, std::set<Key, Compare, Allocator>
1.55 + >,
1.56 + boost::serialization::stl::no_reserve_imp<std::set<
1.57 + Key, Compare, Allocator>
1.58 + >
1.59 + >(ar, t);
1.60 +}
1.61 +
1.62 +// split non-intrusive serialization function member into separate
1.63 +// non intrusive save/load member functions
1.64 +template<class Archive, class Key, class Compare, class Allocator >
1.65 +inline void serialize(
1.66 + Archive & ar,
1.67 + std::set<Key, Compare, Allocator> & t,
1.68 + const unsigned int file_version
1.69 +){
1.70 + boost::serialization::split_free(ar, t, file_version);
1.71 +}
1.72 +
1.73 +// multiset
1.74 +template<class Archive, class Key, class Compare, class Allocator >
1.75 +inline void save(
1.76 + Archive & ar,
1.77 + const std::multiset<Key, Compare, Allocator> &t,
1.78 + const unsigned int /* file_version */
1.79 +){
1.80 + boost::serialization::stl::save_collection<
1.81 + Archive,
1.82 + std::multiset<Key, Compare, Allocator>
1.83 + >(ar, t);
1.84 +}
1.85 +
1.86 +template<class Archive, class Key, class Compare, class Allocator >
1.87 +inline void load(
1.88 + Archive & ar,
1.89 + std::multiset<Key, Compare, Allocator> &t,
1.90 + const unsigned int /* file_version */
1.91 +){
1.92 + boost::serialization::stl::load_collection<
1.93 + Archive,
1.94 + std::multiset<Key, Compare, Allocator>,
1.95 + boost::serialization::stl::archive_input_multi<
1.96 + Archive, std::multiset<Key, Compare, Allocator>
1.97 + >,
1.98 + boost::serialization::stl::no_reserve_imp<
1.99 + std::multiset<Key, Compare, Allocator>
1.100 + >
1.101 + >(ar, t);
1.102 +}
1.103 +
1.104 +// split non-intrusive serialization function member into separate
1.105 +// non intrusive save/load member functions
1.106 +template<class Archive, class Key, class Compare, class Allocator >
1.107 +inline void serialize(
1.108 + Archive & ar,
1.109 + std::multiset<Key, Compare, Allocator> & t,
1.110 + const unsigned int file_version
1.111 +){
1.112 + boost::serialization::split_free(ar, t, file_version);
1.113 +}
1.114 +
1.115 +} // namespace serialization
1.116 +} // namespace boost
1.117 +
1.118 +#include <boost/serialization/collection_traits.hpp>
1.119 +
1.120 +BOOST_SERIALIZATION_COLLECTION_TRAITS(std::set)
1.121 +BOOST_SERIALIZATION_COLLECTION_TRAITS(std::multiset)
1.122 +
1.123 +#endif // BOOST_SERIALIZATION_SET_HPP