Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54963 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2009-07-15 02:47:03


Author: ramey
Date: 2009-07-15 02:47:03 EDT (Wed, 15 Jul 2009)
New Revision: 54963
URL: http://svn.boost.org/trac/boost/changeset/54963

Log:
Fixing error - pure virtual function call
Text files modified:
   trunk/boost/serialization/extended_type_info.hpp | 9 ++++++++-
   trunk/boost/serialization/extended_type_info_no_rtti.hpp | 5 -----
   trunk/boost/serialization/extended_type_info_typeid.hpp | 5 -----
   trunk/boost/serialization/singleton.hpp | 3 ---
   4 files changed, 8 insertions(+), 14 deletions(-)

Modified: trunk/boost/serialization/extended_type_info.hpp
==============================================================================
--- trunk/boost/serialization/extended_type_info.hpp (original)
+++ trunk/boost/serialization/extended_type_info.hpp 2009-07-15 02:47:03 EDT (Wed, 15 Jul 2009)
@@ -24,6 +24,8 @@
 #include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/serialization/config.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
 
 #include <boost/config/abi_prefix.hpp> // must be the last header
 #ifdef BOOST_MSVC
@@ -39,6 +41,8 @@
     private boost::noncopyable
 {
 private:
+ boost::shared_ptr<const extended_type_info> m_this;
+
     // used to uniquely identify the type of class derived from this one
     // so that different derivations of this class can be simultaneously
     // included in implementation of sets and maps.
@@ -67,6 +71,10 @@
     bool operator!=(const extended_type_info &rhs) const {
         return !(operator==(rhs));
     }
+ boost::weak_ptr<const extended_type_info>
+ get_weak_ptr() const {
+ return m_this;
+ }
     static const extended_type_info * find(const char *key);
     // for plugins
     virtual void * construct(unsigned int /*count*/ = 0, ...) const {
@@ -76,7 +84,6 @@
     virtual void destroy(void const * const /*p*/) const {
         assert(false); // must be implemented if used
     }
- virtual bool & get_is_destroyed() const = 0;
 };
 
 } // namespace serialization

Modified: trunk/boost/serialization/extended_type_info_no_rtti.hpp
==============================================================================
--- trunk/boost/serialization/extended_type_info_no_rtti.hpp (original)
+++ trunk/boost/serialization/extended_type_info_no_rtti.hpp 2009-07-15 02:47:03 EDT (Wed, 15 Jul 2009)
@@ -62,11 +62,6 @@
     public detail::extended_type_info_no_rtti_0,
     public singleton<extended_type_info_no_rtti<T> >
 {
- bool & get_is_destroyed() const{
- return singleton<
- extended_type_info_no_rtti<T>
- >::get_is_destroyed();
- }
 public:
     extended_type_info_no_rtti() :
         detail::extended_type_info_no_rtti_0()

Modified: trunk/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- trunk/boost/serialization/extended_type_info_typeid.hpp (original)
+++ trunk/boost/serialization/extended_type_info_typeid.hpp 2009-07-15 02:47:03 EDT (Wed, 15 Jul 2009)
@@ -70,11 +70,6 @@
     public detail::extended_type_info_typeid_0,
     public singleton<extended_type_info_typeid<T> >
 {
- virtual bool & get_is_destroyed() const {
- return singleton<
- extended_type_info_typeid<T>
- >::get_is_destroyed();
- }
 public:
     extended_type_info_typeid() :
         detail::extended_type_info_typeid_0()

Modified: trunk/boost/serialization/singleton.hpp
==============================================================================
--- trunk/boost/serialization/singleton.hpp (original)
+++ trunk/boost/serialization/singleton.hpp 2009-07-15 02:47:03 EDT (Wed, 15 Jul 2009)
@@ -136,9 +136,6 @@
     BOOST_DLLEXPORT static bool is_destroyed(){
         return detail::singleton_wrapper<T>::m_is_destroyed;
     }
- BOOST_DLLEXPORT static bool & get_is_destroyed(){
- return detail::singleton_wrapper<T>::m_is_destroyed;
- }
 };
 
 template<class T>


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