[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:34 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=e3b114a

The following commit has been merged in the master branch:
commit e3b114a9f55bcea16b895c33da7091050c30b065
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Aug 16 09:30:37 2004 +0000

    Implemented StringValueBase and derived AsciiValue and StringValue from that
---
 src/value.cpp |  63 ++++++++++++++++++----------
 src/value.hpp | 129 ++++++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 127 insertions(+), 65 deletions(-)

diff --git a/src/value.cpp b/src/value.cpp
index e8dd998..722e29a 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -20,7 +20,7 @@
  */
 /*
   File:      value.cpp
-  Version:   $Name:  $ $Revision: 1.11 $
+  Version:   $Name:  $ $Revision: 1.12 $
   Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
   History:   26-Jan-04, ahu: created
              11-Feb-04, ahu: isolated as a component
@@ -28,7 +28,7 @@
  */
 // *****************************************************************************
 #include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.11 $ $RCSfile: value.cpp,v $");
+EXIV2_RCSID("@(#) $Name:  $ $Revision: 1.12 $ $RCSfile: value.cpp,v $");
 
 // *****************************************************************************
 // included header files
@@ -65,10 +65,10 @@ namespace Exiv2 {
             value = new DataValue(unsignedByte);
             break;
         case asciiString:
-            value =  new AsciiValue;
+            value = new AsciiValue;
             break;
         case string:
-            value =  new StringValue;
+            value = new StringValue;
             break;
         case unsignedShort:
             value = new ValueType<uint16>;
@@ -165,7 +165,7 @@ namespace Exiv2 {
         return os;
     }
 
-    StringValue& StringValue::operator=(const StringValue& rhs)
+    StringValueBase& StringValueBase::operator=(const StringValueBase& rhs)
     {
         if (this == &rhs) return *this;
         Value::operator=(rhs);
@@ -173,45 +173,65 @@ namespace Exiv2 {
         return *this;
     }
 
-    void StringValue::read(const byte* buf, long len, ByteOrder byteOrder)
+    void StringValueBase::read(const std::string& buf)
     {
-        // byteOrder not needed 
-        value_ = std::string(reinterpret_cast<const char*>(buf), len);
+        value_ = buf;
     }
 
-    void StringValue::read(const std::string& buf)
+    void StringValueBase::read(const byte* buf, long len, ByteOrder byteOrder)
     {
-        value_ = buf;
+        // byteOrder not needed 
+        value_ = std::string(reinterpret_cast<const char*>(buf), len);
     }
 
-    long StringValue::copy(byte* buf, ByteOrder byteOrder) const
+    long StringValueBase::copy(byte* buf, ByteOrder byteOrder) const
     {
         // byteOrder not needed
         return static_cast<long>(
-                value_.copy(reinterpret_cast<char*>(buf), value_.size())
-                );
+            value_.copy(reinterpret_cast<char*>(buf), value_.size())
+            );
     }
 
-    long StringValue::size() const
+    long StringValueBase::size() const
     {
         return static_cast<long>(value_.size());
     }
 
+    std::ostream& StringValueBase::write(std::ostream& os) const
+    {
+        return os << value_;
+    }
+
+    StringValue& StringValue::operator=(const StringValue& rhs)
+    {
+        if (this == &rhs) return *this;
+        StringValueBase::operator=(rhs);
+        return *this;
+    }
+
     StringValue* StringValue::clone() const
     {
         return new StringValue(*this);
     }
 
-    std::ostream& StringValue::write(std::ostream& os) const
+    AsciiValue& AsciiValue::operator=(const AsciiValue& rhs)
     {
-        return os << value_;
+        if (this == &rhs) return *this;
+        StringValueBase::operator=(rhs);
+        return *this;
+    }
+
+    void AsciiValue::read(const byte* buf, long len, ByteOrder byteOrder)
+    {
+        // byteOrder not needed 
+        value_ = std::string(reinterpret_cast<const char*>(buf), len);
+        if (value_[value_.size()-1] != '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list