Added EmuFrontObject test and (very) initial PlatformNameDialogTest.
[emufront] / src / dataobjects / emufrontobject.h
index b614c6c..b6f363c 100644 (file)
@@ -1,3 +1,22 @@
+// EmuFront
+// Copyright 2010 Mikko Keinänen
+//
+// This file is part of EmuFront.
+//
+//
+// EmuFront is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation and appearing in the file gpl.txt included in the
+// packaging of this file.
+//
+// EmuFront is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
+
 #ifndef EMUFRONTOBJECT_H
 #define EMUFRONTOBJECT_H
 
 class EmuFrontObject : public QObject
 {
 public:
+    static const int ID_NOT_SET;
     EmuFrontObject();
     EmuFrontObject(int id, QString name);
 
-    // No need for these as long we use QString (see Implicit Data Sharing)
-    //EmuFrontObject(const EmuFrontObject &);
-    //~EmuFrontObject();
-    //EmuFrontObject &operator=(const EmuFrontObject &);
+    EmuFrontObject(const EmuFrontObject &);
+    ~EmuFrontObject();
+    EmuFrontObject &operator=(const EmuFrontObject &);
+    bool operator==(const EmuFrontObject &);
+    bool operator!=(const EmuFrontObject &);
 
-    const QString getName() const
+    virtual const QString getName() const
     { return name; }
-    int getId() const
+    virtual int getId() const
     { return id; }
-    void setName(QString name)
-    { this->name = name; };
-    void setId(int id)
+    virtual void setName(QString name)
+    { this->name = name; }
+    virtual void setId(int id)
     { this->id = id; }
 
 protected: