1 /*
2     SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com>
3     SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #include "errorinformationdata.h"
7 
8 namespace Latte {
9 namespace Data {
10 
ErrorInformation()11 ErrorInformation::ErrorInformation()
12     : Generic()
13 {
14 }
15 
ErrorInformation(ErrorInformation && o)16 ErrorInformation::ErrorInformation(ErrorInformation &&o)
17     : Generic(o),
18       containment(o.containment),
19       applet(o.applet)
20 {
21 }
22 
ErrorInformation(const ErrorInformation & o)23 ErrorInformation::ErrorInformation(const ErrorInformation &o)
24     : Generic(o),
25       containment(o.containment),
26       applet(o.applet)
27 {
28 }
29 
operator =(const ErrorInformation & rhs)30 ErrorInformation &ErrorInformation::operator=(const ErrorInformation &rhs)
31 {
32     id = rhs.id;
33     name = rhs.name;
34     containment = rhs.containment;
35     applet = rhs.applet;
36 
37     return (*this);
38 }
39 
operator =(ErrorInformation && rhs)40 ErrorInformation &ErrorInformation::operator=(ErrorInformation &&rhs)
41 {
42     id = rhs.id;
43     name = rhs.name;
44     containment = rhs.containment;
45     applet = rhs.applet;
46 
47     return (*this);
48 }
49 
operator ==(const ErrorInformation & rhs) const50 bool ErrorInformation::operator==(const ErrorInformation &rhs) const
51 {
52     return (id == rhs.id)
53             && (name == rhs.name)
54             && (containment == rhs.containment)
55             && (applet == rhs.applet);
56 }
57 
operator !=(const ErrorInformation & rhs) const58 bool ErrorInformation::operator!=(const ErrorInformation &rhs) const
59 {
60     return !(*this == rhs);
61 }
62 
isValid() const63 bool ErrorInformation::isValid() const
64 {
65     return containment.isValid() || applet.isValid();
66 }
67 
68 }
69 }
70