add compare operators so we can use it as a map key
authorKlaus Kaempf <kkaempf@suse.de>
Wed, 8 Feb 2006 21:51:24 +0000 (21:51 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Wed, 8 Feb 2006 21:51:24 +0000 (21:51 +0000)
zypp/NVRAD.h

index 275ee85..41d544e 100644 (file)
@@ -63,6 +63,25 @@ namespace zypp
     NVRAD( Resolvable::constPtr res_r );
   };
   ///////////////////////////////////////////////////////////////////
+  inline bool operator<( const NVRAD & lhs, const NVRAD & rhs )
+  { if (lhs.name >= rhs.name
+       && lhs.edition >= rhs.edition
+       && lhs.arch == rhs.arch)
+    {
+       return false;
+    }
+    return true;
+  }
+
+  inline bool operator==( const NVRAD & lhs, const NVRAD & rhs )
+  { if (lhs.name == rhs.name
+       && lhs.edition == rhs.edition
+       && lhs.arch == rhs.arch)
+    {
+       return true;
+    }
+    return false;
+  }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp