Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54935 - trunk/boost/archive/impl
From: ramey_at_[hidden]
Date: 2009-07-13 17:40:15


Author: ramey
Date: 2009-07-13 17:40:15 EDT (Mon, 13 Jul 2009)
New Revision: 54935
URL: http://svn.boost.org/trac/boost/changeset/54935

Log:
Simplification for pointer serialization
Correct error in exported pointers for polymorphic archives
Removed:
   trunk/boost/archive/impl/archive_pointer_iserializer.ipp
   trunk/boost/archive/impl/archive_pointer_oserializer.ipp

Deleted: trunk/boost/archive/impl/archive_pointer_iserializer.ipp
==============================================================================
--- trunk/boost/archive/impl/archive_pointer_iserializer.ipp 2009-07-13 17:40:15 EDT (Mon, 13 Jul 2009)
+++ (empty file)
@@ -1,72 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// pointer_iserializer.ipp:
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to 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.
-
-#include <utility>
-#include <cassert>
-#include <cstddef>
-#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::size_t;
-} // namespace std
-#endif
-
-#include <boost/serialization/singleton.hpp>
-#include <boost/archive/detail/basic_serializer_map.hpp>
-#include <boost/archive/detail/archive_pointer_iserializer.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-template<class Archive>
-basic_serializer_map archive_pointer_iserializer<Archive>::m_map;
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_iserializer<Archive>::archive_pointer_iserializer(
- const boost::serialization::extended_type_info & eti
-) :
- basic_pointer_iserializer(eti)
-{
- // only insert the first one. Assumes that DLLS are unloaded in
- // the reverse sequence
- // std::pair<
- // BOOST_DEDUCED_TYPENAME basic_serializer_map<Archive>::iterator,
- // bool
- // > result =
- m_map.insert(this);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_iserializer *)
-archive_pointer_iserializer<Archive>::find(
- const boost::serialization::extended_type_info & eti
-){
- const basic_serializer_arg bs(eti);
- basic_serializer_map::const_iterator it;
- it = m_map.find(& bs);
- assert(it != m_map.end());
- return static_cast<const basic_pointer_iserializer *>(*it);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_iserializer<Archive>::~archive_pointer_iserializer(){
- basic_serializer_map::iterator it;
- it = m_map.find(this);
- assert(it != m_map.end());
- if(*it == static_cast<const basic_serializer *>(this))
- m_map.erase(it);
-}
-
-} // namespace detail
-} // namespace archive
-} // namespace boost

Deleted: trunk/boost/archive/impl/archive_pointer_oserializer.ipp
==============================================================================
--- trunk/boost/archive/impl/archive_pointer_oserializer.ipp 2009-07-13 17:40:15 EDT (Mon, 13 Jul 2009)
+++ (empty file)
@@ -1,67 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// archive_pointer_oserializer.ipp:
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to 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.
-
-#include <utility>
-#include <cassert>
-
-#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
-
-#include <boost/archive/detail/archive_pointer_oserializer.hpp>
-#include <boost/archive/detail/basic_serializer_map.hpp>
-#include <boost/serialization/singleton.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-template<class Archive>
-basic_serializer_map archive_pointer_oserializer<Archive>::m_map;
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_oserializer<Archive>::archive_pointer_oserializer(
- const boost::serialization::extended_type_info & eti
-) :
- basic_pointer_oserializer(eti)
-{
- // only insert the first one. Assumes that DLLS are unloaded in
- // the reverse sequence
- //std::pair<
- // BOOST_DEDUCED_TYPENAME oserializer_map<Archive>::iterator,
- // bool
- // > result =
- m_map.insert(this);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *)
-archive_pointer_oserializer<Archive>::find(
- const boost::serialization::extended_type_info & eti
-){
- const basic_serializer_arg bs(eti);
- basic_serializer_map::const_iterator it;
- it = m_map.find(& bs);
- assert(it != m_map.end());
- return static_cast<const basic_pointer_oserializer *>(*it);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_oserializer<Archive>::~archive_pointer_oserializer(){
- basic_serializer_map::iterator it;
- it = m_map.find(this);
- assert(it != m_map.end());
- if(*it == static_cast<const basic_serializer *>(this))
- m_map.erase(it);
-}
-
-} // namespace detail
-} // namespace archive
-} // namespace boost


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk