- use shared_ptr instead of the intrusive one
authorJan Kupec <jkupec@suse.cz>
Fri, 5 Sep 2008 08:03:05 +0000 (08:03 +0000)
committerJan Kupec <jkupec@suse.cz>
Fri, 5 Sep 2008 08:03:05 +0000 (08:03 +0000)
zypp/RepoInfo.cc
zypp/RepoInfo.h
zypp/ServiceInfo.cc
zypp/ServiceInfo.h
zypp/repo/RepoInfoBase.cc
zypp/repo/RepoInfoBase.h

index e51b0c4..89cf329 100644 (file)
@@ -91,8 +91,6 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-  IMPL_PTR_TYPE(RepoInfo);
-
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : RepoInfo::RepoInfo
index 36d35ce..029991c 100644 (file)
@@ -28,8 +28,6 @@
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
-  DEFINE_PTR_TYPE(RepoInfo);
-
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : RepoInfo
@@ -341,6 +339,8 @@ namespace zypp
   inline bool operator<( const RepoInfo& lhs, const RepoInfo & rhs )
   { return lhs.alias() < rhs.alias(); }
 
+  typedef shared_ptr<RepoInfo> RepoInfo_Ptr;
+
   typedef std::list<RepoInfo> RepoInfoList;
 
   /////////////////////////////////////////////////////////////////
index 11d5023..c6ac1d2 100644 (file)
@@ -68,8 +68,6 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-  IMPL_PTR_TYPE(ServiceInfo);
-
   const ServiceInfo ServiceInfo::noService;
   
   ServiceInfo::ServiceInfo() : _pimpl( new Impl() ) {}
index 9a30b32..2350fb3 100644 (file)
@@ -23,8 +23,6 @@
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
-  DEFINE_PTR_TYPE(ServiceInfo);
-
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : ServiceInfo
@@ -93,6 +91,8 @@ namespace zypp
   };
   ///////////////////////////////////////////////////////////////////
 
+  typedef shared_ptr<ServiceInfo> ServiceInfo_Ptr;
+
   /** \relates ServiceInfo Stream output */
   std::ostream & operator<<( std::ostream & str, const ServiceInfo & obj );
 
index 8637419..e6fc49a 100644 (file)
@@ -59,8 +59,6 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-  IMPL_PTR_TYPE(RepoInfoBase);
-
   ///////////////////////////////////////////////////////////////////
   //
   //    METHOD NAME : RepoInfoBase::RepoInfoBase
index d08f37f..d6fbef2 100644 (file)
@@ -15,7 +15,6 @@
 #include <iosfwd>
 
 #include "zypp/base/PtrTypes.h"
-#include "zypp/base/ReferenceCounted.h"
 
 #include "zypp/Pathname.h"
 
@@ -26,8 +25,6 @@ namespace zypp
   namespace repo
   { /////////////////////////////////////////////////////////////////
     
-    DEFINE_PTR_TYPE(RepoInfoBase);
-
     ///////////////////////////////////////////////////////////////////
     //
     //    CLASS NAME : RepoInfoBase
@@ -36,7 +33,7 @@ namespace zypp
      * \short Base class implementing common features of \ref RepoInfo and
      *        \ref ServiceInfo.
      */
-    class RepoInfoBase : public base::ReferenceCounted
+    class RepoInfoBase
     {
       friend std::ostream & operator<<( std::ostream & str, const RepoInfoBase & obj );
 
@@ -155,6 +152,8 @@ namespace zypp
     inline bool operator<( const RepoInfoBase & lhs, const RepoInfoBase & rhs )
     { return lhs.alias() < rhs.alias(); }
 
+    typedef shared_ptr<RepoInfoBase> RepoInfoBase_Ptr;
+
 
     /////////////////////////////////////////////////////////////////
   } // namespace repo