- Add CheckSum::asString.
authorMichael Andres <ma@suse.de>
Fri, 7 Nov 2008 18:53:54 +0000 (18:53 +0000)
committerMichael Andres <ma@suse.de>
Fri, 7 Nov 2008 18:53:54 +0000 (18:53 +0000)
VERSION.cmake
package/libzypp.changes
zypp/CheckSum.cc
zypp/CheckSum.h

index 14067cd..f1312f9 100644 (file)
@@ -60,7 +60,7 @@
 #
 SET(LIBZYPP_MAJOR "5")
 SET(LIBZYPP_COMPATMINOR "20")
-SET(LIBZYPP_MINOR "20")
+SET(LIBZYPP_MINOR "21")
 SET(LIBZYPP_PATCH "0")
 #
 # LAST RELEASED: 5.20.0 (20)
index 0b0c553..dbbcf37 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Nov  7 19:51:00 CET 2008 - ma@suse.de
+
+- Add CheckSum::asString.
+- revision 11634
+
+-------------------------------------------------------------------
 Fri Nov  7 17:55:48 CET 2008 - ma@suse.de
 
 - revision 11631
index 08876df..ac34c42 100644 (file)
@@ -10,6 +10,7 @@
  *
 */
 #include <iostream>
+#include <sstream>
 
 #include "zypp/base/Logger.h"
 #include "zypp/base/Gettext.h"
@@ -131,6 +132,13 @@ namespace zypp
   bool CheckSum::empty() const
   { return (checksum().empty() || type().empty()); }
 
+  std::string CheckSum::asString() const
+  {
+    std::ostringstream str;
+    str << *this;
+    return str.str();
+  }
+
   std::ostream & operator<<( std::ostream & str, const CheckSum & obj )
   {
     if ( obj.checksum().empty() )
index 99236dd..5004ee3 100644 (file)
@@ -69,6 +69,9 @@ namespace zypp
     std::string checksum() const;
     bool empty() const;
 
+  public:
+    std::string asString() const;
+
   private:
     std::string _type;
     std::string _checksum;