First unit test implemented!
[emufront] / src / dataobjects / emufrontobject.cpp
index db036ea..1b94837 100644 (file)
@@ -24,7 +24,7 @@ EmuFrontObject::EmuFrontObject() : id(-1), name("")
 }
 
 EmuFrontObject::EmuFrontObject(const EmuFrontObject &ob)
-    : QObject(), id(ob.id), name(ob.name)
+    : QObject() , id(ob.id), name(ob.name)
 {
     // no need to perform deep copy here, see:
     // http://doc.trolltech.com/4.0/shclass.html
@@ -46,3 +46,14 @@ EmuFrontObject& EmuFrontObject::operator =(const EmuFrontObject &ob)
     return (*this);
 }
 
+
+bool EmuFrontObject::operator ==(const EmuFrontObject &sup)
+{
+    return (id >= 0 && id == sup.id && sup.name == name);
+}
+
+bool EmuFrontObject::operator !=(const EmuFrontObject &sup)
+{
+    return !(*this == sup);
+}
+