[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/soprano
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-04-27 13:31:31
Message-ID: 20100427133131.B44C1AC8A4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1119616 by trueg:

Added comparison operators for BindingSet

 M  +1 -1      CMakeLists.txt  
 M  +12 -0     soprano/bindingset.cpp  
 M  +14 -0     soprano/bindingset.h  


--- trunk/kdesupport/soprano/CMakeLists.txt #1119615:1119616
@@ -7,7 +7,7 @@
 ##################  Soprano version  ################################
 set(CMAKE_SOPRANO_VERSION_MAJOR 2)
 set(CMAKE_SOPRANO_VERSION_MINOR 4)
-set(CMAKE_SOPRANO_VERSION_RELEASE 62)
+set(CMAKE_SOPRANO_VERSION_RELEASE 63)
 set(CMAKE_SOPRANO_VERSION_STRING \
"${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}")
  
 
--- trunk/kdesupport/soprano/soprano/bindingset.cpp #1119615:1119616
@@ -138,6 +138,18 @@
     }
 }
 
+bool Soprano::BindingSet::operator==( const BindingSet& other ) const
+{
+    return ( d->bindingMap == other.d->bindingMap &&
+             d->names == other.d->names &&
+             d->values == other.d->values );
+}
+
+bool Soprano::BindingSet::operator!=( const BindingSet& other ) const
+{
+    return !operator==( other );
+}
+
 QDebug operator<<( QDebug s, const Soprano::BindingSet& b )
 {
     QStringList n = b.bindingNames();
--- trunk/kdesupport/soprano/soprano/bindingset.h #1119615:1119616
@@ -144,6 +144,20 @@
          */
         void replace( const QString& name, const Node& value );
 
+        /**
+         * Comparison operator.
+         *
+         * \since 2.5
+         */
+        bool operator==( const BindingSet& other ) const;
+
+        /**
+         * Comparison operator.
+         *
+         * \since 2.5
+         */
+        bool operator!=( const BindingSet& other ) const;
+
     private:
         class Private;
         QSharedDataPointer<Private> d;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic