![]() |
QxOrm
1.2.3
C++ Object Relational Mapping library
|
00001 /**************************************************************************** 00002 ** 00003 ** http://www.qxorm.com/ 00004 ** http://sourceforge.net/projects/qxorm/ 00005 ** Original file by Lionel Marty 00006 ** 00007 ** This file is part of the QxOrm library 00008 ** 00009 ** This software is provided 'as-is', without any express or implied 00010 ** warranty. In no event will the authors be held liable for any 00011 ** damages arising from the use of this software. 00012 ** 00013 ** GNU Lesser General Public License Usage 00014 ** This file must be used under the terms of the GNU Lesser 00015 ** General Public License version 2.1 as published by the Free Software 00016 ** Foundation and appearing in the file 'license.lgpl.txt' included in the 00017 ** packaging of this file. Please review the following information to 00018 ** ensure the GNU Lesser General Public License version 2.1 requirements 00019 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 00020 ** 00021 ** If you have questions regarding the use of this file, please contact : 00022 ** contact@qxorm.com 00023 ** 00024 ****************************************************************************/ 00025 00026 #ifndef _QX_SERIALIZATION_BOOST_UNORDERED_SET_H_ 00027 #define _QX_SERIALIZATION_BOOST_UNORDERED_SET_H_ 00028 00029 #ifdef _MSC_VER 00030 #pragma once 00031 #endif 00032 00033 #include <boost/unordered_set.hpp> 00034 00035 #include <boost/serialization/serialization.hpp> 00036 #include <boost/serialization/collections_save_imp.hpp> 00037 #include <boost/serialization/collections_load_imp.hpp> 00038 #include <boost/serialization/split_free.hpp> 00039 #include <boost/serialization/utility.hpp> 00040 #include <boost/serialization/nvp.hpp> 00041 00042 namespace boost { 00043 namespace serialization { 00044 00045 template <class Archive, class Key> 00046 inline void save(Archive & ar, const boost::unordered_set<Key> & t, const unsigned int /* file_version */) 00047 { 00048 boost::serialization::stl::save_collection< Archive, boost::unordered_set<Key> >(ar, t); 00049 } 00050 00051 template <class Archive, class Key> 00052 inline void load(Archive & ar, boost::unordered_set<Key> & t, const unsigned int /* file_version */) 00053 { 00054 boost::serialization::stl::load_collection< Archive, boost::unordered_set<Key>, 00055 boost::serialization::stl::archive_input_set< Archive, boost::unordered_set<Key> >, 00056 boost::serialization::stl::no_reserve_imp<boost::unordered_set< Key > > >(ar, t); 00057 } 00058 00059 template <class Archive, class Key> 00060 inline void serialize(Archive & ar, boost::unordered_set<Key> & t, const unsigned int file_version) 00061 { 00062 boost::serialization::split_free(ar, t, file_version); 00063 } 00064 00065 template <class Archive, class Key> 00066 inline void save(Archive & ar, const boost::unordered_multiset<Key> & t, const unsigned int /* file_version */) 00067 { 00068 boost::serialization::stl::save_collection< Archive, boost::unordered_multiset<Key> >(ar, t); 00069 } 00070 00071 template <class Archive, class Key> 00072 inline void load(Archive & ar, boost::unordered_multiset<Key> & t, const unsigned int /* file_version */) 00073 { 00074 #if (BOOST_VERSION >= 104200) 00075 boost::serialization::stl::load_collection< Archive, boost::unordered_multiset<Key>, 00076 boost::serialization::stl::archive_input_set< Archive, boost::unordered_multiset<Key> >, 00077 boost::serialization::stl::no_reserve_imp< boost::unordered_multiset<Key> > >(ar, t); 00078 #else // (BOOST_VERSION >= 104200) 00079 boost::serialization::stl::load_collection< Archive, boost::unordered_multiset<Key>, 00080 boost::serialization::stl::archive_input_multiset< Archive, boost::unordered_multiset<Key> >, 00081 boost::serialization::stl::no_reserve_imp< boost::unordered_multiset<Key> > >(ar, t); 00082 #endif // (BOOST_VERSION >= 104200) 00083 } 00084 00085 template <class Archive, class Key> 00086 inline void serialize(Archive & ar, boost::unordered_multiset<Key> & t, const unsigned int file_version) 00087 { 00088 boost::serialization::split_free(ar, t, file_version); 00089 } 00090 00091 } // namespace serialization 00092 } // namespace boost 00093 00094 #endif // _QX_SERIALIZATION_BOOST_UNORDERED_SET_H_