File indexing completed on 2024-06-23 08:47:20

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "genericdata.h"
0007 
0008 namespace Latte {
0009 namespace Data {
0010 
0011 Generic::Generic(Generic &&o)
0012     : id(o.id),
0013       name(o.name)
0014 {
0015 }
0016 
0017 Generic::Generic(const Generic &o)
0018     : id(o.id),
0019       name(o.name)
0020 {
0021 }
0022 
0023 Generic::Generic(const QString &newid, const QString &newname)
0024     : id(newid),
0025       name(newname)
0026 {
0027 }
0028 
0029 Generic &Generic::operator=(const Generic &rhs)
0030 {
0031     id = rhs.id;
0032     name = rhs.name;
0033 
0034     return (*this);
0035 }
0036 
0037 Generic &Generic::operator=(Generic &&rhs)
0038 {
0039     id = rhs.id;
0040     name = rhs.name;
0041 
0042     return (*this);
0043 }
0044 
0045 bool Generic::operator==(const Generic &rhs) const
0046 {
0047     return (id == rhs.id)
0048             && (name == rhs.name);
0049 }
0050 
0051 bool Generic::operator!=(const Generic &rhs) const
0052 {
0053     return !(*this == rhs);
0054 }
0055 
0056 }
0057 }