Use camel cased dumpAsXmlOn
authorMichael Andres <ma@suse.de>
Fri, 24 Jan 2014 09:51:27 +0000 (10:51 +0100)
committerMichael Andres <ma@suse.de>
Fri, 24 Jan 2014 09:51:27 +0000 (10:51 +0100)
zypp/RepoInfo.cc
zypp/RepoInfo.h
zypp/ServiceInfo.cc
zypp/ServiceInfo.h
zypp/repo/RepoInfoBase.cc
zypp/repo/RepoInfoBase.h
zypp/sat/FileConflicts.cc
zypp/sat/FileConflicts.h

index 78ffb6c..470da71 100644 (file)
@@ -463,10 +463,7 @@ namespace zypp
     return str;
   }
 
-  std::ostream & RepoInfo::dumpAsXMLOn( std::ostream & str) const
-  { return dumpAsXMLOn(str, ""); }
-
-  std::ostream & RepoInfo::dumpAsXMLOn( std::ostream & str, const std::string & content) const
+  std::ostream & RepoInfo::dumpAsXmlOn( std::ostream & str, const std::string & content ) const
   {
     string tmpstr;
     str
index 71eb895..47b111f 100644 (file)
@@ -311,9 +311,9 @@ namespace zypp
 
       /** Whether the repo license has to be accepted, e.g. there is no
        * no acceptance needed for openSUSE.
-       */ 
+       */
       bool needToAcceptLicense() const;
-    
+
       /** Return the best license for the current (or a specified) locale. */
       std::string getLicense( const Locale & lang_r = Locale() );
 
@@ -345,17 +345,15 @@ namespace zypp
 
       /**
        * Write an XML representation of this RepoInfo object.
-       */
-      virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
-
-      /**
-       * Write an XML representation of this RepoInfo object.
        *
        * \param str
        * \param content this argument is ignored (used in other classed derived
        *                from RepoInfoBase.
        */
-      virtual std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content ) const;
+      virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
+
+      /** \deprecated Use camel cased dumpAsXmlOn */
+      ZYPP_DEPRECATED std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content = "" ) const { return dumpAsXmlOn( str, content ); }
 
       class Impl;
     private:
index 175caf2..48c5597 100644 (file)
@@ -178,10 +178,7 @@ namespace zypp
     return str;
   }
 
-  std::ostream & ServiceInfo::dumpAsXMLOn(std::ostream & str) const
-  { return dumpAsXMLOn(str, ""); }
-
-  ostream & ServiceInfo::dumpAsXMLOn( ostream & str, const string & content) const
+  ostream & ServiceInfo::dumpAsXmlOn( ostream & str, const string & content ) const
   {
     str
       << "<service"
index 17e609d..d5e0bb2 100644 (file)
@@ -147,18 +147,15 @@ namespace zypp
 
     /**
      * Write an XML representation of this ServiceInfo object.
-     */
-    virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
-
-    /**
-     * Write an XML representation of this ServiceInfo object.
      *
      * \param str
      * \param content if not empty, produces <service ...>content</service>
      *                otherwise <service .../>
      */
-    virtual std::ostream & dumpAsXMLOn(
-        std::ostream & str, const std::string & content) const;
+    virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
+
+    /** \deprecated Use camel cased dumpAsXmlOn */
+    ZYPP_DEPRECATED std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content = "" ) const { return dumpAsXmlOn( str, content ); }
 
     class Impl;
 
index bac195b..d0ac421 100644 (file)
@@ -169,10 +169,7 @@ namespace zypp
     return str;
   }
 
-  std::ostream & RepoInfoBase::dumpAsXMLOn(std::ostream & str) const
-  { return dumpAsXMLOn(str, ""); }
-
-  std::ostream & RepoInfoBase::dumpAsXMLOn( std::ostream & str, const std::string & content) const
+  std::ostream & RepoInfoBase::dumpAsXmlOn( std::ostream & str, const std::string & content ) const
   {
     return str << "<!-- there's no XML representation of RepoInfoBase -->" << endl;
   }
index e348b87..55f9f83 100644 (file)
@@ -15,7 +15,7 @@
 #include <iosfwd>
 
 #include "zypp/base/PtrTypes.h"
-
+#include "zypp/APIConfig.h"
 #include "zypp/Pathname.h"
 
 ///////////////////////////////////////////////////////////////////
@@ -141,16 +141,12 @@ namespace zypp
       virtual std::ostream & dumpAsIniOn( std::ostream & str ) const;
 
       /**
-       * Write an XML representation of this object. Implement in
-       * derived classes.
-       */
-      virtual std::ostream & dumpAsXMLOn(std::ostream & str) const;
-
-      /**
        * Write an XML representation of this object with content (if available).
        */
-      virtual std::ostream & dumpAsXMLOn(
-          std::ostream & str, const std::string & content) const;
+      virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;
+
+      /** \deprecated Use camel cased dumpAsXmlOn */
+      ZYPP_DEPRECATED std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content = "" ) const { return dumpAsXmlOn( str, content ); }
 
       class Impl;
     private:
index 2f22670..dd71505 100644 (file)
@@ -131,14 +131,14 @@ namespace zypp
     }
 
 
-    std::ostream & dumpAsXMLOn( std::ostream & str, const FileConflicts & obj )
+    std::ostream & dumpAsXmlOn( std::ostream & str, const FileConflicts & obj )
     {
       xmlout::Node guard( str, "fileconflicts", { "size", obj.size() } );
       if ( ! obj.empty() )
       {
        *guard << "\n";
        for ( const auto & el : obj )
-         dumpAsXMLOn( *guard, el ) << "\n";
+         dumpAsXmlOn( *guard, el ) << "\n";
       }
       return str;
     }
@@ -146,7 +146,7 @@ namespace zypp
     namespace
     {
       /// \todo
-      std::ostream & dumpAsXMLHelper( std::ostream & str, const std::string & tag_r, IdString filename_r, IdString md5sum_r, Solvable solv_r )
+      std::ostream & dumpAsXmlHelper( std::ostream & str, const std::string & tag_r, IdString filename_r, IdString md5sum_r, Solvable solv_r )
       {
        xmlout::Node guard( str, tag_r );
        *xmlout::Node( *guard, "file" ) << filename_r;
@@ -172,11 +172,11 @@ namespace zypp
       }
     }
 
-    std::ostream & dumpAsXMLOn( std::ostream & str, const FileConflicts::Conflict & obj )
+    std::ostream & dumpAsXmlOn( std::ostream & str, const FileConflicts::Conflict & obj )
     {
       xmlout::Node guard( str, "fileconflict" );
-      dumpAsXMLHelper( *guard<<"\n", "lhs", obj.lhsFilename(), obj.lhsFilemd5(), obj.lhsSolvable() );
-      dumpAsXMLHelper( *guard<<"\n", "rhs", obj.rhsFilename(), obj.rhsFilemd5(), obj.rhsSolvable() );
+      dumpAsXmlHelper( *guard<<"\n", "lhs", obj.lhsFilename(), obj.lhsFilemd5(), obj.lhsSolvable() );
+      dumpAsXmlHelper( *guard<<"\n", "rhs", obj.rhsFilename(), obj.rhsFilemd5(), obj.rhsSolvable() );
       return str;
     }
 
index 90d9ffe..783d6c8 100644 (file)
@@ -76,10 +76,10 @@ namespace zypp
     std::ostream & operator<<( std::ostream & str, const FileConflicts::Conflict & obj );
 
     /** \relates FileConflicts XML output */
-    std::ostream & dumpAsXMLOn( std::ostream & str, const FileConflicts & obj );
+    std::ostream & dumpAsXmlOn( std::ostream & str, const FileConflicts & obj );
 
     /** \relates FileConflicts::Conflict XML output */
-    std::ostream & dumpAsXMLOn( std::ostream & str, const FileConflicts::Conflict & obj );
+    std::ostream & dumpAsXmlOn( std::ostream & str, const FileConflicts::Conflict & obj );
 
     /** \relates FileConflicts */
     inline bool operator==( const FileConflicts & lhs, const FileConflicts & rhs )