Fixed serialization
This commit is contained in:
parent
48ad2f1817
commit
7d60d579b6
5 changed files with 26 additions and 16 deletions
|
|
@ -8,16 +8,6 @@ class ISerializable {
|
|||
public:
|
||||
virtual void serialize(QDataStream &output) = 0;
|
||||
virtual void deserialize(QDataStream &input) = 0;
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &output, ISerializable &s) {
|
||||
s.serialize(output);
|
||||
return output;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &input, ISerializable &s) {
|
||||
s.deserialize(input);
|
||||
return input;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // ISERIALIZABLE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue