Closed EreliaStudio closed 1 year ago
The Memento is a templated class that must allow user to take "snapshot" of the template type, and must allow the user to "load" those snapshot back. The idea is to create a system allowing rewind of a set of event.
Interface proposition:
template <typename TType> class Memento { public: class Snapshot { public: void save(const TType* p_objectToCapture) = 0; void load(TType* p_objectToRestore) = 0; }; private: public: Snapshot* takeSnapshot(); void restoreSnapshot(const Snapshot* p_snapshot); };
Pull request accepted, we can close this Issue
The Memento is a templated class that must allow user to take "snapshot" of the template type, and must allow the user to "load" those snapshot back. The idea is to create a system allowing rewind of a set of event.
Interface proposition: