3 ** Copyright 2010 Mikko Keinänen
5 ** This file is part of EmuFront.
8 ** EmuFront is free software: you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License version 2 as published by
10 ** the Free Software Foundation and appearing in the file gpl.txt included in the
11 ** packaging of this file.
13 ** EmuFront is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
18 ** You should have received a copy of the GNU General Public License
19 ** along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
21 #include "emufrontobject.h"
24 const int EmuFrontObject::ID_NOT_SET = -1;
26 EmuFrontObject::EmuFrontObject() : id(EmuFrontObject::ID_NOT_SET), name("")
30 EmuFrontObject::EmuFrontObject(const EmuFrontObject &ob)
31 : QObject() , id(ob.id), name(ob.name)
33 // no need to perform deep copy here, see:
34 // http://doc.trolltech.com/4.0/shclass.html
37 EmuFrontObject::EmuFrontObject(int id, QString name)
41 EmuFrontObject::~EmuFrontObject()
43 // qDebug() << "EmuFrontObject " << name << " dying.";
46 EmuFrontObject& EmuFrontObject::operator =(const EmuFrontObject &ob)
48 if (this == &ob) return (*this);
55 bool EmuFrontObject::operator ==(const EmuFrontObject &sup)
57 return (id == sup.id && sup.name == name);
60 bool EmuFrontObject::operator !=(const EmuFrontObject &sup)
62 return !(*this == sup);