Renamed Ptr types
authorMichael Andres <ma@suse.de>
Wed, 23 Nov 2005 21:09:48 +0000 (21:09 +0000)
committerMichael Andres <ma@suse.de>
Wed, 23 Nov 2005 21:09:48 +0000 (21:09 +0000)
        FooPtr / constFooPtr    (deprecated old)
to
        Foo_Ptr / Foo_constPtr  (new)

To be more consistent with Ptr types declared within a class as
        Foo::Ptr / Foo::constPtr

zypp/base/PtrTypes.h:
Renamed ImplPtr (we have too much Impl's) into 'RW_pointer'.
This indicates it's smart pointerness. Updated doc for it and
added code example.

24 files changed:
zypp/CapFactory.cc
zypp/CapFactory.h
zypp/Capability.cc
zypp/Capability.h
zypp/Dependencies.cc
zypp/Edition.h
zypp/Rel.h
zypp/Resolvable.h
zypp/SolverContext.cc
zypp/SolverContext.h
zypp/base/PtrTypes.h
zypp/detail/ResObjectFactory.h
zypp/parser/yum/YUMFileListParser.cc
zypp/parser/yum/YUMFileListParser.h
zypp/parser/yum/YUMGroupParser.cc
zypp/parser/yum/YUMGroupParser.h
zypp/parser/yum/YUMOtherParser.cc
zypp/parser/yum/YUMOtherParser.h
zypp/parser/yum/YUMPatchParser.cc
zypp/parser/yum/YUMPatchParser.h
zypp/parser/yum/YUMPrimaryParser.cc
zypp/parser/yum/YUMPrimaryParser.h
zypp/parser/yum/YUMRepomdParser.cc
zypp/parser/yum/YUMRepomdParser.h

index b67a656..0eb38e8 100644 (file)
@@ -25,17 +25,17 @@ using namespace std;
 namespace
 { /////////////////////////////////////////////////////////////////
 
-  typedef zypp::capability::CapabilityImplPtr CapabilityImplPtr;
+  typedef zypp::capability::CapabilityImpl_Ptr CapabilityImpl_Ptr;
 
   /** \todo check set ordering to assert no dups */
-  struct USetOrder : public std::binary_function<CapabilityImplPtr, CapabilityImplPtr, bool>
+  struct USetOrder : public std::binary_function<CapabilityImpl_Ptr, CapabilityImpl_Ptr, bool>
   {
-    bool operator()( const CapabilityImplPtr & lhs,
-                     const CapabilityImplPtr & rhs ) const
+    bool operator()( const CapabilityImpl_Ptr & lhs,
+                     const CapabilityImpl_Ptr & rhs ) const
     { return lhs->asString() < rhs->asString(); }
   };
 
-  typedef std::set<CapabilityImplPtr,USetOrder> USet;
+  typedef std::set<CapabilityImpl_Ptr,USetOrder> USet;
 
   USet _uset;
 
@@ -102,7 +102,7 @@ namespace zypp
     // fix it!
     if ( strval_r.empty() )
       throw "no Resolvable::Kind";
-    CapabilityImplPtr newcap( new capability::NamedCap( defaultRefers_r, strval_r ) );
+    CapabilityImpl_Ptr newcap( new capability::NamedCap( defaultRefers_r, strval_r ) );
     USet::iterator in( _uset.insert( newcap ).first );
     return Capability( *in );
   }
@@ -118,7 +118,7 @@ namespace zypp
                                 Rel op_r,
                                 const Edition & edition_r ) const
   {
-    CapabilityImplPtr newcap( new capability::NamedCap( refers_r, name_r ) );
+    CapabilityImpl_Ptr newcap( new capability::NamedCap( refers_r, name_r ) );
     USet::iterator in( _uset.insert( newcap ).first );
     return Capability( *in );
   }
index ee93619..57cbfcf 100644 (file)
@@ -65,7 +65,7 @@ namespace zypp
     /** Implementation */
     struct Impl;
     /** Pointer to implementation */
-    base::ImplPtr<Impl> _pimpl;
+    base::RW_pointer<Impl> _pimpl;
   };
   ///////////////////////////////////////////////////////////////////
 
index bf0e9c4..f9f607b 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp
   //   METHOD NAME : Capability::Capability
   //   METHOD TYPE : Ctor
   //
-  Capability::Capability( ImplPtr impl_r )
+  Capability::Capability( Impl_Ptr impl_r )
   : _pimpl( impl_r )
   {}
 
index df08b7a..57482c0 100644 (file)
@@ -53,11 +53,11 @@ namespace zypp
 
   private:
     typedef capability::CapabilityImpl          Impl;
-    typedef capability::CapabilityImpl_Ptr      ImplPtr ;
-    typedef capability::CapabilityImpl_constPtr ImplconstPtr;
+    typedef capability::CapabilityImpl_Ptr      Impl_Ptr ;
+    typedef capability::CapabilityImpl_constPtr Impl_constPtr;
     /** Factory ctor */
     explicit
-    Capability( ImplPtr impl_r );
+    Capability( Impl_Ptr impl_r );
   public:
     /** Factory */
     typedef CapFactory Factory;
@@ -77,7 +77,7 @@ namespace zypp
 
   private:
     /** Pointer to implementation */
-    base::ImplPtr<Impl,ImplPtr> _pimpl;
+    base::RW_pointer<Impl,Impl_Ptr> _pimpl;
   };
   ///////////////////////////////////////////////////////////////////
 
index bd7f041..fdd4ab4 100644 (file)
@@ -50,14 +50,14 @@ namespace zypp
       /**  */
       CapSet _freshens;
 
-      static DependenciesImplPtr nodeps()
+      static DependenciesImpl_Ptr nodeps()
       {
         if ( !_nodeps ) { _nodeps = new DependenciesImpl; _nodeps->ref(); }
         return _nodeps;
       }
 
     private:
-      static DependenciesImplPtr _nodeps;
+      static DependenciesImpl_Ptr _nodeps;
     };
     ///////////////////////////////////////////////////////////////////
     IMPL_PTR_TYPE(DependenciesImpl)
@@ -149,7 +149,7 @@ namespace zypp
 #define ZYPP_DEPENDENCIES_COW \
 if(_pimpl->refCount()>1) \
 { \
-  detail::DependenciesImplPtr _cow_tmp = new detail::DependenciesImpl; \
+  detail::DependenciesImpl_Ptr _cow_tmp = new detail::DependenciesImpl; \
   _cow_tmp->_provides = _pimpl->_provides; \
   _cow_tmp->_prerequires = _pimpl->_prerequires; \
   _cow_tmp->_requires = _pimpl->_requires; \
index 6235dbb..eb94cd3 100644 (file)
@@ -82,7 +82,7 @@ namespace zypp
     /** Hides implementation */
     struct Impl;
     /** Pointer to implementation */
-    base::ImplPtr<Impl> _pimpl;
+    base::RW_pointer<Impl> _pimpl;
   };
   ///////////////////////////////////////////////////////////////////
 
index cd534d0..89cfbe1 100644 (file)
@@ -42,7 +42,7 @@ namespace zypp
   {
     /** \name Relational operators
      * These are the \em real relational operator contants to
-     * use. Don't mind that it's not an enum. See also: \ref inSwitch
+     * use. Don't mind that it's not an enum. See also: \ref zypp::Rel::inSwitch
     */
     //@{
     static const Rel EQ;
index f184b84..1694b83 100644 (file)
@@ -73,7 +73,7 @@ namespace zypp
     /** Implementation */
     struct Impl;
     /** Pointer to implementation */
-    base::ImplPtr<Impl> _pimpl;
+    base::RW_pointer<Impl> _pimpl;
   };
   ///////////////////////////////////////////////////////////////////
 
index 7d97df8..8d42a73 100644 (file)
@@ -70,7 +70,7 @@ namespace zypp
   //   METHOD NAME : SolverContext::SolverContext
   //   METHOD TYPE : Ctor
   //
-  SolverContext::SolverContext( detail::SolverContextImplPtr impl_r )
+  SolverContext::SolverContext( detail::SolverContextImpl_Ptr impl_r )
   : _pimpl( impl_r )
   {}
 
@@ -85,9 +85,9 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : SolverContext::sayFriend
-  //   METHOD TYPE : detail::constSolverContextImplPtr
+  //   METHOD TYPE : detail::constSolverContextImpl_Ptr
   //
-  detail::constSolverContextImplPtr SolverContext::sayFriend() const
+  detail::SolverContextImpl_constPtr SolverContext::sayFriend() const
   { return _pimpl; }
 
   /******************************************************************
index 36a5bba..c8dbe60 100644 (file)
@@ -39,16 +39,16 @@ namespace zypp
     SolverContext();
     /** Factory ctor */
     explicit
-    SolverContext( detail::SolverContextImplPtr impl_r );
+    SolverContext( detail::SolverContextImpl_Ptr impl_r );
     /** Dtor */
     ~SolverContext();
 
   private:
     /** Pointer to implementation */
-    detail::SolverContextImplPtr _pimpl;
+    detail::SolverContextImpl_Ptr _pimpl;
   public:
     /** Avoid a bunch of friend decl. */
-    detail::constSolverContextImplPtr sayFriend() const;
+    detail::SolverContextImpl_constPtr sayFriend() const;
   };
   ///////////////////////////////////////////////////////////////////
 
index fdcc142..b10f259 100644 (file)
@@ -38,6 +38,9 @@ namespace zypp
      * \li \c shared_ptr Object ownership shared among multiple pointers
      *
      * \li \c weak_ptr Non-owning observers of an object owned by shared_ptr.
+     *
+     * And \ref zypp::base::RW_pointer, as wrapper around a smart pointer,
+     * poviding \c const correct read/write access to the object it refers.
     */
     /*@{*/
 
@@ -52,42 +55,60 @@ namespace zypp
 
     /** Use boost::intrusive_ptr as Ptr type*/
     using boost::intrusive_ptr;
+
     using boost::static_pointer_cast;
     using boost::const_pointer_cast;
     using boost::dynamic_pointer_cast;
 
     ///////////////////////////////////////////////////////////////////
     //
-    // CLASS NAME : ImplPtr
+    // CLASS NAME : RW_pointer
     //
     /** Wrapper for \c const correct access via \ref ZYPP_BASE_SMART_PTR.
      *
-     * zypp::base::ImplPtr<tt>\<_D,_Ptr></tt> stores a \ref ZYPP_BASE_SMART_PTR
+     * zypp::base::RW_pointer<tt>\<_D,_Ptr></tt> stores a \ref ZYPP_BASE_SMART_PTR
      * of type \c _Ptr, which must be convertible into a <tt>_D *</tt>. Pointer
      * style access (via \c -> and \c *) offers a <tt>const _D *</tt> in const
-     * a context, otherwise a <tt>_D *</tt>.
+     * a context, otherwise a <tt>_D *</tt>. Thus \em RW_ means \em read/write,
+     * as you get a different type, dependent on whether you're allowed to
+     * read or write.
      *
      * Forwarding access from an interface to an implemantation class, an
-     * ImplPtr prevents const interface methods from accidentally calling
+     * RW_pointer prevents const interface methods from accidentally calling
      * nonconst implementation methods. In case you have to do so, call
      * unconst to get the <tt>_D *</tt>.
      *
      * The second template argument defaults to <tt>_Ptr = shared_ptr<_D></tt>.
+     * \code
+     * #include "zypp/base/PtrTypes.h"
+     *
+     * class Foo
+     * {
+     *   ...
+     *   private:
+     *     // Implementation class
+     *     struct Impl;
+     *     // Pointer to implementation; actually a shared_ptr<Impl>
+     *     base::RW_pointer<Impl> _pimpl;
      *
+     *     void baa()       { _pimpl->... } // is Impl *
+     *     void baa() const { _pimpl->... } // is Impl const *
+     * };
+     * \endcode
      * \todo refine ctor and assign.
     */
     template<class _D, class _Ptr = shared_ptr<_D> >
-      struct ImplPtr
+      struct RW_pointer
       {
         typedef _D element_type;
 
         explicit
-        ImplPtr( typename _Ptr::element_type * dptr = 0 )
+        RW_pointer( typename _Ptr::element_type * dptr = 0 )
         : _dptr( dptr )
         {}
 
         explicit
-        ImplPtr( _Ptr dptr )
+        RW_pointer( _Ptr dptr )
         : _dptr( dptr )
         {}
 
@@ -100,18 +121,17 @@ namespace zypp
 
         _D * unconst() const { return _dptr.get(); }
 
-
         _Ptr _dptr;
       };
 
-    /** \relates ImplPtr Stream output.
+    /** \relates RW_pointer Stream output.
      *
-     * Print the \r _D object the ImplPtr refers, or \c "NULL"
+     * Print the \c _D object the RW_pointer refers, or \c "NULL"
      * if the pointer is \c NULL.
     */
     template<class _D, class _Ptr>
       inline std::ostream &
-      operator<<( std::ostream & str, const ImplPtr<_D, _Ptr> & obj )
+      operator<<( std::ostream & str, const RW_pointer<_D, _Ptr> & obj )
       {
         if ( obj.get() )
           return str << *obj.get();
@@ -121,7 +141,7 @@ namespace zypp
     ///////////////////////////////////////////////////////////////////
     /** Wrapper for \c const correct access via pointer.
      *
-     * Template specialization of ImplPtr, storing a raw <tt>_P *</tt>,
+     * Template specialization of RW_pointer, storing a raw <tt>_P *</tt>,
      * which must be convertible into a <tt>_D *</tt>.
      *
      * \note The object pointed to will \b not be deleted. If you need
@@ -129,12 +149,12 @@ namespace zypp
      * raw pointer.
     */
     template<class _D,class _P>
-      struct ImplPtr<_D,_P*>
+      struct RW_pointer<_D,_P*>
       {
         typedef _D element_type;
 
         explicit
-        ImplPtr( _P * dptr = 0 )
+        RW_pointer( _P * dptr = 0 )
         : _dptr( dptr )
         {}
 
@@ -147,7 +167,6 @@ namespace zypp
 
         _D * unconst() const { return _dptr; }
 
-
         _P * _dptr;
       };
 
@@ -167,8 +186,6 @@ namespace zypp
 class NAME;                                                      \
 extern void intrusive_ptr_add_ref( const NAME * );               \
 extern void intrusive_ptr_release( const NAME * );               \
-typedef zypp::base::intrusive_ptr<NAME>       NAME##Ptr;         \
-typedef zypp::base::intrusive_ptr<const NAME> const##NAME##Ptr;  \
 typedef zypp::base::intrusive_ptr<NAME>       NAME##_Ptr;        \
 typedef zypp::base::intrusive_ptr<const NAME> NAME##_constPtr;
 
index 1226afc..b72b61e 100644 (file)
@@ -34,8 +34,8 @@ namespace zypp
         public:
           typedef ResImplConnect                  Self;
           typedef typename _Res::Impl             Impl;
-          typedef base::shared_ptr<Impl>          ImplPtr;
-          // Ptr typed not needed
+          typedef base::shared_ptr<Impl>          Impl_Ptr;
+          // Ptr types not needed
           // typedef base::intrusive_ptr<Self>       Ptr;
           // typedef base::intrusive_ptr<const Self> constPtr;
         public:
@@ -43,14 +43,14 @@ namespace zypp
           ResImplConnect( const std::string & name_r,
                           const Edition & edition_r,
                           const Arch & arch_r,
-                          ImplPtr impl_r )
+                          Impl_Ptr impl_r )
           : _Res( name_r, edition_r, arch_r )
           , _impl( impl_r )
           { _impl->_backRef = this; }
           virtual ~ResImplConnect()
           { _impl->_backRef = 0; }
         private:
-          ImplPtr _impl;
+          Impl_Ptr _impl;
           virtual Impl &       pimpl()       { return *_impl; }
           virtual const Impl & pimpl() const { return *_impl; }
         };
index e4e01c0..eccefc7 100644 (file)
@@ -33,7 +33,7 @@ namespace zypp {
 
 
       YUMFileListParser::YUMFileListParser(istream &is, const string& baseUrl)
-      : XMLNodeIterator<YUMFileListDataPtr>(is, baseUrl,FILELISTSCHEMA)
+      : XMLNodeIterator<YUMFileListData_Ptr>(is, baseUrl,FILELISTSCHEMA)
       {
         fetchNext();
       }
@@ -41,8 +41,8 @@ namespace zypp {
       YUMFileListParser::YUMFileListParser()
       { }
       
-      YUMFileListParser::YUMFileListParser(YUMFileListDataPtr& entry)
-      : XMLNodeIterator<YUMFileListDataPtr>(entry)
+      YUMFileListParser::YUMFileListParser(YUMFileListData_Ptr& entry)
+      : XMLNodeIterator<YUMFileListData_Ptr>(entry)
       { }
       
       
@@ -65,11 +65,11 @@ namespace zypp {
       
       
       // do the actual processing
-      YUMFileListDataPtr
+      YUMFileListData_Ptr
       YUMFileListParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMFileListDataPtr dataPtr = new YUMFileListData;
+        YUMFileListData_Ptr dataPtr = new YUMFileListData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
       
index d80f61c..e4e7e85 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp {
       /**
       * @short Parser for YUM filelists files
       * Use this class as an iterator that produces, one after one,
-      * YUMFileListDataPtr(s) for the XML package elements.
+      * YUMFileListData_Ptr(s) for the XML package elements.
       * Here's an example:
       * 
       * for (YUMFileListParser iter(anIstream, baseUrl),
@@ -44,7 +44,7 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMFileListParser : public XMLNodeIterator<YUMFileListDataPtr>
+      class YUMFileListParser : public XMLNodeIterator<YUMFileListData_Ptr>
       {
       public:
         /**
@@ -54,7 +54,7 @@ namespace zypp {
          */
         YUMFileListParser(std::istream &is, const std::string &baseUrl);
         YUMFileListParser();
-        YUMFileListParser(YUMFileListDataPtr& entry);
+        YUMFileListParser(YUMFileListData_Ptr& entry);
     
         
         /**
@@ -75,7 +75,7 @@ namespace zypp {
          * @param reader 
          * @return 
          */
-        virtual YUMFileListDataPtr process(const xmlTextReaderPtr reader);
+        virtual YUMFileListData_Ptr process(const xmlTextReaderPtr reader);
     
         /**
          * converts the xml stuff to c++ stuff and filters the right namespaces
index f7789a1..d9402de 100644 (file)
@@ -28,8 +28,8 @@ namespace zypp {
       YUMGroupParser::YUMGroupParser()
       { }
       
-      YUMGroupParser::YUMGroupParser(YUMGroupDataPtr& entry)
-      : XMLNodeIterator<YUMGroupDataPtr>(entry)
+      YUMGroupParser::YUMGroupParser(YUMGroupData_Ptr& entry)
+      : XMLNodeIterator<YUMGroupData_Ptr>(entry)
       { }
       
       
@@ -45,11 +45,11 @@ namespace zypp {
       }
       
       // do the actual processing
-      YUMGroupDataPtr
+      YUMGroupData_Ptr
       YUMGroupParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMGroupDataPtr dataPtr = new YUMGroupData;
+        YUMGroupData_Ptr dataPtr = new YUMGroupData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
         
@@ -92,7 +92,7 @@ namespace zypp {
         return dataPtr;
       } /* end process */
       
-      void YUMGroupParser::parseGrouplist(YUMGroupDataPtr dataPtr,
+      void YUMGroupParser::parseGrouplist(YUMGroupData_Ptr dataPtr,
                                                 xmlNodePtr node)
       {
         assert(dataPtr);
@@ -117,7 +117,7 @@ namespace zypp {
       }
       
       
-      void YUMGroupParser::parsePackageList(YUMGroupDataPtr dataPtr,
+      void YUMGroupParser::parsePackageList(YUMGroupData_Ptr dataPtr,
                                                   xmlNodePtr node)
       {
         assert(dataPtr);
@@ -147,7 +147,7 @@ namespace zypp {
       
       
       YUMGroupParser::YUMGroupParser(istream &is, const string &baseUrl)
-      : XMLNodeIterator<YUMGroupDataPtr>(is, baseUrl,GROUPSCHEMA)
+      : XMLNodeIterator<YUMGroupData_Ptr>(is, baseUrl,GROUPSCHEMA)
       { 
         fetchNext();
       }
index fdd5eea..9bfcf6d 100644 (file)
@@ -29,7 +29,7 @@ namespace zypp {
       * @short Parser for YUM group files.
       *
       * Use this class as an iterator that produces, one after one,
-      * YUMGroupDataPtr(s) for the XML group elements.
+      * YUMGroupData_Ptr(s) for the XML group elements.
       * Here's an example:
       *
       * for (YUMGroupParser iter(anIstream, baseUrl),
@@ -46,20 +46,20 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMGroupParser : public XMLNodeIterator<YUMGroupDataPtr>
+      class YUMGroupParser : public XMLNodeIterator<YUMGroupData_Ptr>
       {
       public:
         YUMGroupParser(std::istream &is, const std::string &baseUrl);
         YUMGroupParser();
-        YUMGroupParser(YUMGroupDataPtr& entry);
+        YUMGroupParser(YUMGroupData_Ptr& entry);
         virtual ~YUMGroupParser();
         
       private:
         virtual bool isInterested(const xmlNodePtr nodePtr);
-        virtual YUMGroupDataPtr process(const xmlTextReaderPtr reader);
-        void parseGrouplist(YUMGroupDataPtr dataPtr,
+        virtual YUMGroupData_Ptr process(const xmlTextReaderPtr reader);
+        void parseGrouplist(YUMGroupData_Ptr dataPtr,
                             xmlNodePtr node);
-        void parsePackageList(YUMGroupDataPtr dataPtr,
+        void parsePackageList(YUMGroupData_Ptr dataPtr,
                               xmlNodePtr node);
         
         LibXMLHelper _helper;
index f41e1a6..4292164 100644 (file)
@@ -30,7 +30,7 @@ namespace zypp {
 
 
       YUMOtherParser::YUMOtherParser(istream &is, const string& baseUrl)
-      : XMLNodeIterator<YUMOtherDataPtr>(is, baseUrl,OTHERSCHEMA)
+      : XMLNodeIterator<YUMOtherData_Ptr>(is, baseUrl,OTHERSCHEMA)
       {
         fetchNext();
       }
@@ -38,8 +38,8 @@ namespace zypp {
       YUMOtherParser::YUMOtherParser()
       { }
       
-      YUMOtherParser::YUMOtherParser(YUMOtherDataPtr& entry)
-      : XMLNodeIterator<YUMOtherDataPtr>(entry)
+      YUMOtherParser::YUMOtherParser(YUMOtherData_Ptr& entry)
+      : XMLNodeIterator<YUMOtherData_Ptr>(entry)
       { }
       
       
@@ -62,11 +62,11 @@ namespace zypp {
       
       
       // do the actual processing
-      YUMOtherDataPtr
+      YUMOtherData_Ptr
       YUMOtherParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMOtherDataPtr dataPtr = new YUMOtherData;
+        YUMOtherData_Ptr dataPtr = new YUMOtherData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
       
index 9087468..cc3263b 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp {
       /**
       * @short Parser for YUM other.xml files
       * Use this class as an iterator that produces, one after one,
-      * YUMOtherDataPtr(s) for the XML package elements.
+      * YUMOtherData_Ptr(s) for the XML package elements.
       * Here's an example:
       * 
       * for (YUMOtherParser iter(anIstream, baseUrl),
@@ -44,7 +44,7 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMOtherParser : public XMLNodeIterator<YUMOtherDataPtr>
+      class YUMOtherParser : public XMLNodeIterator<YUMOtherData_Ptr>
       {
       public:
         /**
@@ -55,7 +55,7 @@ namespace zypp {
         YUMOtherParser(std::istream &is, const std::string &baseUrl);
     
         YUMOtherParser();
-        YUMOtherParser(YUMOtherDataPtr& entry);
+        YUMOtherParser(YUMOtherData_Ptr& entry);
         
         /**
          * Destructor.
@@ -75,7 +75,7 @@ namespace zypp {
          * @param reader 
          * @return 
          */
-        virtual YUMOtherDataPtr process(const xmlTextReaderPtr reader);
+        virtual YUMOtherData_Ptr process(const xmlTextReaderPtr reader);
     
         /**
          * converts the xml stuff to c++ stuff and filters the right namespaces
index ae1cc8a..0506e04 100644 (file)
@@ -30,7 +30,7 @@ namespace zypp {
       { }
       
       YUMPatchParser::YUMPatchParser(istream &is, const string& baseUrl)
-      : XMLNodeIterator<YUMPatchDataPtr>(is, baseUrl,PATCHSCHEMA)
+      : XMLNodeIterator<YUMPatchData_Ptr>(is, baseUrl,PATCHSCHEMA)
       {
         fetchNext();
       }
@@ -38,8 +38,8 @@ namespace zypp {
       YUMPatchParser::YUMPatchParser()
       { }
       
-      YUMPatchParser::YUMPatchParser(YUMPatchDataPtr& entry)
-      : XMLNodeIterator<YUMPatchDataPtr>(entry)
+      YUMPatchParser::YUMPatchParser(YUMPatchData_Ptr& entry)
+      : XMLNodeIterator<YUMPatchData_Ptr>(entry)
       { }
       
       
@@ -51,11 +51,11 @@ namespace zypp {
       }
       
       // do the actual processing
-      YUMPatchDataPtr
+      YUMPatchData_Ptr
       YUMPatchParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMPatchDataPtr patchPtr = new YUMPatchData;
+        YUMPatchData_Ptr patchPtr = new YUMPatchData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
         patchPtr->timestamp = _helper.attribute(dataNode,"timestamp");
@@ -133,7 +133,7 @@ namespace zypp {
       
       
       void 
-      YUMPatchParser::parseAtomsNode(YUMPatchDataPtr dataPtr,
+      YUMPatchParser::parseAtomsNode(YUMPatchData_Ptr dataPtr,
                                      xmlNodePtr formatNode)
       {
         assert(formatNode);
@@ -368,7 +368,7 @@ namespace zypp {
       
       
       void
-      YUMPatchParser::parsePackageNode(YUMPatchDataPtr dataPtr,
+      YUMPatchParser::parsePackageNode(YUMPatchData_Ptr dataPtr,
                                      xmlNodePtr formatNode)
       {
        shared_ptr<YUMPatchPackage> package(new YUMPatchPackage);
@@ -441,7 +441,7 @@ namespace zypp {
       }
       
       void
-      YUMPatchParser::parseScriptNode(YUMPatchDataPtr dataPtr,
+      YUMPatchParser::parseScriptNode(YUMPatchData_Ptr dataPtr,
                                      xmlNodePtr formatNode)
       {
        shared_ptr<YUMPatchScript> script(new YUMPatchScript);
@@ -494,7 +494,7 @@ namespace zypp {
       }
       
       void
-      YUMPatchParser::parseMessageNode(YUMPatchDataPtr dataPtr,
+      YUMPatchParser::parseMessageNode(YUMPatchData_Ptr dataPtr,
                                      xmlNodePtr formatNode)
       {
        shared_ptr<YUMPatchMessage> message(new YUMPatchMessage);
index 2030938..40d78c9 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp {
       /**
       * @short Parser for YUM primary.xml files (containing package metadata)
       * Use this class as an iterator that produces, one after one,
-      * YUMPatchDataPtr(s) for the XML package elements in the input.
+      * YUMPatchData_Ptr(s) for the XML package elements in the input.
       * Here's an example:
       *
       * for (YUMPatchParser iter(anIstream, baseUrl),
@@ -44,21 +44,21 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMPatchParser : public XMLNodeIterator<YUMPatchDataPtr>
+      class YUMPatchParser : public XMLNodeIterator<YUMPatchData_Ptr>
       {
       public:
         YUMPatchParser(std::istream &is, const std::string &baseUrl);
         YUMPatchParser();
-        YUMPatchParser(YUMPatchDataPtr& entry);
+        YUMPatchParser(YUMPatchData_Ptr& entry);
         virtual ~YUMPatchParser();
     
       private:
         virtual bool isInterested(const xmlNodePtr nodePtr);
-        virtual YUMPatchDataPtr process(const xmlTextReaderPtr reader);
-        void parseAtomsNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
-        void parsePackageNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
-        void parseMessageNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
-        void parseScriptNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
+        virtual YUMPatchData_Ptr process(const xmlTextReaderPtr reader);
+        void parseAtomsNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+        void parsePackageNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+        void parseMessageNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+        void parseScriptNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
         void parseFormatNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
         void parsePkgFilesNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
         void parsePkgPlainRpmNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
index 77aa190..1631622 100644 (file)
@@ -29,7 +29,7 @@ namespace zypp {
       
       
       YUMPrimaryParser::YUMPrimaryParser(istream &is, const string& baseUrl)
-        : XMLNodeIterator<YUMPrimaryDataPtr>(is, baseUrl,PRIMARYSCHEMA)
+        : XMLNodeIterator<YUMPrimaryData_Ptr>(is, baseUrl,PRIMARYSCHEMA)
       {
         fetchNext();
       }
@@ -37,8 +37,8 @@ namespace zypp {
       YUMPrimaryParser::YUMPrimaryParser()
       { }
       
-      YUMPrimaryParser::YUMPrimaryParser(YUMPrimaryDataPtr& entry)
-      : XMLNodeIterator<YUMPrimaryDataPtr>(entry)
+      YUMPrimaryParser::YUMPrimaryParser(YUMPrimaryData_Ptr& entry)
+      : XMLNodeIterator<YUMPrimaryData_Ptr>(entry)
       { }
       
       
@@ -60,11 +60,11 @@ namespace zypp {
       
       
       // do the actual processing
-      YUMPrimaryDataPtr
+      YUMPrimaryData_Ptr
       YUMPrimaryParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMPrimaryDataPtr dataPtr = new YUMPrimaryData;
+        YUMPrimaryData_Ptr dataPtr = new YUMPrimaryData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
       
@@ -131,7 +131,7 @@ namespace zypp {
       
       
       void 
-      YUMPrimaryParser::parseFormatNode(YUMPrimaryDataPtr dataPtr,
+      YUMPrimaryParser::parseFormatNode(YUMPrimaryData_Ptr dataPtr,
                                               xmlNodePtr formatNode)
       {
         assert(formatNode);
index 752c6bd..02c7f68 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp {
       /**
       * @short Parser for YUM primary.xml files (containing package metadata)
       * Use this class as an iterator that produces, one after one,
-      * YUMPrimaryDataPtr(s) for the XML package elements in the input.
+      * YUMPrimaryData_Ptr(s) for the XML package elements in the input.
       * Here's an example:
       *
       * for (YUMPrimaryParser iter(anIstream, baseUrl),
@@ -44,20 +44,20 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMPrimaryParser : public XMLNodeIterator<YUMPrimaryDataPtr>
+      class YUMPrimaryParser : public XMLNodeIterator<YUMPrimaryData_Ptr>
       {
       public:
         YUMPrimaryParser(std::istream &is, const std::string &baseUrl);
         YUMPrimaryParser();
-        YUMPrimaryParser(YUMPrimaryDataPtr& entry);
+        YUMPrimaryParser(YUMPrimaryData_Ptr& entry);
         virtual ~YUMPrimaryParser();
     
       private:
         // FIXME move needed method to a common class, inherit it
         friend class YUMPatchParser;
         virtual bool isInterested(const xmlNodePtr nodePtr);
-        virtual YUMPrimaryDataPtr process(const xmlTextReaderPtr reader);
-        void parseFormatNode(YUMPrimaryDataPtr dataPtr,
+        virtual YUMPrimaryData_Ptr process(const xmlTextReaderPtr reader);
+        void parseFormatNode(YUMPrimaryData_Ptr dataPtr,
                              xmlNodePtr formatNode);
         void parseDependencyEntries(std::list<YUMDependency> *depList, 
                                     xmlNodePtr depNode);
index 67a7aa9..9f86c6a 100644 (file)
@@ -31,8 +31,8 @@ namespace zypp {
       YUMRepomdParser::YUMRepomdParser()
       { }
       
-      YUMRepomdParser::YUMRepomdParser(YUMRepomdDataPtr& entry)
-      : XMLNodeIterator<YUMRepomdDataPtr>(entry)
+      YUMRepomdParser::YUMRepomdParser(YUMRepomdData_Ptr& entry)
+      : XMLNodeIterator<YUMRepomdData_Ptr>(entry)
       { }
       
       
@@ -44,11 +44,11 @@ namespace zypp {
       }
       
       // do the actual processing
-      YUMRepomdDataPtr
+      YUMRepomdData_Ptr
       YUMRepomdParser::process(const xmlTextReaderPtr reader)
       {
         assert(reader);
-        YUMRepomdDataPtr repoPtr = new YUMRepomdData;
+        YUMRepomdData_Ptr repoPtr = new YUMRepomdData;
         xmlNodePtr dataNode = xmlTextReaderExpand(reader);
         assert(dataNode);
         repoPtr->type = _helper.attribute(dataNode,"type");
@@ -83,7 +83,7 @@ namespace zypp {
       
         
       YUMRepomdParser::YUMRepomdParser(istream &is, const string &baseUrl)
-      : XMLNodeIterator<YUMRepomdDataPtr>(is, baseUrl,REPOMDSCHEMA)
+      : XMLNodeIterator<YUMRepomdData_Ptr>(is, baseUrl,REPOMDSCHEMA)
       {
         fetchNext();
       }
index ddaabcb..792cee4 100644 (file)
@@ -26,7 +26,7 @@ namespace zypp {
       /**
       * @short Parser for YUM repomd.xml files (describing the repository)
       * Use this class as an iterator that produces, one after one,
-      * YUMRepomdDataPtr(s) for the XML package elements.
+      * YUMRepomdData_Ptr(s) for the XML package elements.
       * Here's an example:
       *
       * for (YUMRepomdParser iter(anIstream, baseUrl),
@@ -43,17 +43,17 @@ namespace zypp {
       * continue parsing, XMLNodeIterator will log it and consider the input as finished.
       * You can query the exit status with errorStatus().
       */
-      class YUMRepomdParser : public XMLNodeIterator<YUMRepomdDataPtr>
+      class YUMRepomdParser : public XMLNodeIterator<YUMRepomdData_Ptr>
       {
       public:
         YUMRepomdParser(std::istream &is, const std::string &baseUrl);
         YUMRepomdParser();
-        YUMRepomdParser(YUMRepomdDataPtr& entry);
+        YUMRepomdParser(YUMRepomdData_Ptr& entry);
         virtual ~YUMRepomdParser();
     
       private:
         virtual bool isInterested(const xmlNodePtr nodePtr);
-        virtual YUMRepomdDataPtr process(const xmlTextReaderPtr reader);
+        virtual YUMRepomdData_Ptr process(const xmlTextReaderPtr reader);
     
         LibXMLHelper _helper;
       };