File indexing completed on 2024-04-28 09:25:25

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