blob: d2e061af9fd7f3886adf33c556512a01b43528f6 (
plain)
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
|
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version
2 of the License, or (at your option) any later version.
*/
#include <QDataStream>
#include "mappingdata.h"
MappingData::MappingData() : mappingId(-1), descId(-1) {}
bool MappingData::operator ==(const MappingData &other){
bool retval = (
mappingId == other.mappingId &&
descId == other.descId &&
name == other.name &&
parents == other.parents &&
path == other.path
);
return retval;
}
QDataStream &operator <<(QDataStream &out, const MappingData &v){
out << v.mappingId << v.descId << v.name << v.parents << v.path;
return out;
}
QDataStream &operator >>(QDataStream &in, MappingData &v){
in >> v.mappingId;
in >> v.descId;
in >> v.name;
in >> v.parents;
in >> v.path;
return in;
}
bool MappingData::isValid(){
return !(mappingId == -1 && descId == -1);
}
|