Still experimenting with unit testing code.
[emufront] / src / dataobjects / platform.cpp
index 334c15b..490a349 100644 (file)
@@ -5,32 +5,42 @@
 //
 //
 // EmuFront is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
+// 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.
 //
-// Foobar is distributed in the hope that it will be useful,
+// 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 Foobar.  If not, see <http://www.gnu.org/licenses/>.
+// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "platform.h"
+#include <QDebug>
 
-Platform::Platform() : EmuFrontObject()
+Platform::Platform() : EmuFrontFileObject() { }
+
+Platform::Platform(int id, QString name)
+        : EmuFrontFileObject(id, name, 0) { }
+
+Platform::Platform(int id, QString name, EmuFrontFile *file)
+        : EmuFrontFileObject(id, name, file)
 {
 }
 
-Platform::Platform(int id, QString name, QString filename)
-        : EmuFrontObject(id, name), filename(filename)
+Platform::Platform(const Platform &p)
+        : EmuFrontFileObject(p)
 {
 }
 
-// we make deep copies of name and filename strings
-/*Platform::Platform(const Platform &pl) : EmuFrontObject(pl.id, pl.name), filename(pl.filename)
+Platform::~Platform()
 {
-    // no need to perform deep copy here, see:
-    // http://doc.trolltech.com/4.0/shclass.html
-}*/
+    if (file) {
+        qDebug() << "file: " << file->getName();
+    }
+    qDebug() << "Platform " << name << " @ "
+        << this << "dying.";
+}
+