File indexing completed on 2024-04-21 05:30:46

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