diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-08-15 17:06:16 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-08-15 17:20:20 -0400 |
commit | 0d1d5016b57c59817fa0619e5cf4c6df046b28c3 (patch) | |
tree | eae9fc8b180f49dd5e3834f7238c9c9cad93cfd9 /src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp | |
parent | 492d97468b1121228f208489a645759b390f023e (diff) | |
download | mongo-0d1d5016b57c59817fa0619e5cf4c6df046b28c3.tar.gz |
SERVER-8994: Boost 1.56.0
Initial import of source
Libraries: algorithm array asio bind chrono config container date_time
filesystem function integer intrusive noncopyable optional
program_options random smart_ptr static_assert thread unordered utility
Diffstat (limited to 'src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp')
-rw-r--r-- | src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp b/src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp new file mode 100644 index 00000000000..c8ad96b3d7c --- /dev/null +++ b/src/third_party/boost-1.56.0/boost/archive/impl/archive_serializer_map.ipp @@ -0,0 +1,71 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// archive_serializer_map.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +////////////////////////////////////////////////////////////////////// +// implementation of basic_text_iprimitive overrides for the combination +// of template parameters used to implement a text_iprimitive + +#include <boost/config.hpp> +#include <boost/archive/detail/archive_serializer_map.hpp> +#include <boost/archive/detail/basic_serializer_map.hpp> +#include <boost/serialization/singleton.hpp> + +namespace boost { +namespace archive { +namespace detail { + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace extra_detail { // anon + template<class Archive> + class map : public basic_serializer_map + {}; +} + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +template<class Archive> +BOOST_ARCHIVE_OR_WARCHIVE_DECL(bool) +archive_serializer_map<Archive>::insert(const basic_serializer * bs){ + return boost::serialization::singleton< + extra_detail::map<Archive> + >::get_mutable_instance().insert(bs); +} + +template<class Archive> +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +archive_serializer_map<Archive>::erase(const basic_serializer * bs){ + if(boost::serialization::singleton< + extra_detail::map<Archive> + >::is_destroyed()) + return; + boost::serialization::singleton< + extra_detail::map<Archive> + >::get_mutable_instance().erase(bs); +} + +template<class Archive> +BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_serializer *) +archive_serializer_map<Archive>::find( + const boost::serialization::extended_type_info & eti +) { + return boost::serialization::singleton< + extra_detail::map<Archive> + >::get_const_instance().find(eti); +} + +} // namespace detail +} // namespace archive +} // namespace boost |