WIP Undo / Redo : serialization / deserialization of object selection.

This commit is contained in:
bubnikv 2019-07-04 14:35:04 +02:00
parent 5a2ace1a6e
commit 1798e2a84c
6 changed files with 85 additions and 58 deletions

View file

@ -24,6 +24,8 @@ class ObjectID
{
public:
ObjectID(size_t id) : id(id) {}
// Default constructor constructs an invalid ObjectID.
ObjectID() : id(0) {}
bool operator==(const ObjectID &rhs) const { return this->id == rhs.id; }
bool operator!=(const ObjectID &rhs) const { return this->id != rhs.id; }
@ -38,8 +40,6 @@ public:
size_t id;
private:
ObjectID() {}
friend class cereal::access;
template<class Archive> void serialize(Archive &ar) { ar(id); }
};