File indexing completed on 2025-01-18 09:28:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <boost/config.hpp>
0016 #include <boost/archive/detail/archive_serializer_map.hpp>
0017 #include <boost/archive/detail/basic_serializer_map.hpp>
0018 #include <boost/serialization/singleton.hpp>
0019
0020 namespace boost {
0021 namespace archive {
0022 namespace detail {
0023
0024 #ifdef BOOST_MSVC
0025 # pragma warning(push)
0026 # pragma warning(disable : 4511 4512)
0027 #endif
0028
0029 namespace extra_detail {
0030 template<class Archive>
0031 class map : public basic_serializer_map
0032 {};
0033 }
0034
0035 #ifdef BOOST_MSVC
0036 # pragma warning(pop)
0037 #endif
0038
0039 template<class Archive>
0040 BOOST_ARCHIVE_OR_WARCHIVE_DECL bool
0041 archive_serializer_map<Archive>::insert(const basic_serializer * bs){
0042 return boost::serialization::singleton<
0043 extra_detail::map<Archive>
0044 >::get_mutable_instance().insert(bs);
0045 }
0046
0047 template<class Archive>
0048 BOOST_ARCHIVE_OR_WARCHIVE_DECL void
0049 archive_serializer_map<Archive>::erase(const basic_serializer * bs){
0050
0051
0052
0053
0054 if(boost::serialization::singleton<
0055 extra_detail::map<Archive>
0056 >::is_destroyed())
0057 return;
0058 boost::serialization::singleton<
0059 extra_detail::map<Archive>
0060 >::get_mutable_instance().erase(bs);
0061 }
0062
0063 template<class Archive>
0064 BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer *
0065 archive_serializer_map<Archive>::find(
0066 const boost::serialization::extended_type_info & eti
0067 ) {
0068 return boost::serialization::singleton<
0069 extra_detail::map<Archive>
0070 >::get_const_instance().find(eti);
0071 }
0072
0073 }
0074 }
0075 }