Add inequality operator.
authorScott Cantor <cantor.2@osu.edu>
Wed, 17 May 2006 02:13:00 +0000 (02:13 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 17 May 2006 02:13:00 +0000 (02:13 +0000)
xmltooling/QName.cpp
xmltooling/QName.h

index 2c95801..6ca7f79 100644 (file)
@@ -110,6 +110,11 @@ bool xmltooling::operator==(const QName& op1, const QName& op2)
             !XMLString::compareString(op1.getLocalPart(),op2.getLocalPart()));\r
 }\r
 \r
+bool xmltooling::operator!=(const QName& op1, const QName& op2)\r
+{\r
+    return !(op1==op2);\r
+}\r
+\r
 bool xmltooling::operator<(const QName& op1, const QName& op2)\r
 {\r
     int i=XMLString::compareString(op1.getNamespaceURI(),op2.getNamespaceURI());\r
index 779ce70..c26e900 100644 (file)
@@ -186,6 +186,13 @@ namespace xmltooling {
      */\r
     extern XMLTOOL_API bool operator==(const QName& op1, const QName& op2);\r
 \r
+    /**\r
+     * Returns true iff op1's components are not equal to op2's components, excluding prefix.\r
+     * @param op1   First qname to compare\r
+     * @param op2   Second qname to compare\r
+     */\r
+    extern XMLTOOL_API bool operator!=(const QName& op1, const QName& op2);\r
+\r
 };\r
 \r
 #endif /* __xmltooling_qname_h__ */\r