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