diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-11 21:04:30 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-11 21:04:30 +0100 |
commit | 359ad8db97305856f4cfdade1cd1dada78a7a635 (patch) | |
tree | a6d5dce34c2aa5406744c414baccf6a2450dd8a5 /src/crepe/Component.h | |
parent | 313da47b72aafa0b40ac2cd2b586d525ed17fbd4 (diff) |
more replay system WIP
Diffstat (limited to 'src/crepe/Component.h')
-rw-r--r-- | src/crepe/Component.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/crepe/Component.h b/src/crepe/Component.h index 47c5c34..fc0268c 100644 --- a/src/crepe/Component.h +++ b/src/crepe/Component.h @@ -1,5 +1,7 @@ #pragma once +#include <memory> + #include "types.h" namespace crepe { @@ -32,15 +34,16 @@ protected: //! Only ComponentManager can create components friend class ComponentManager; - // create snapshot - Component(const Component &) = default; - // restore snapshot - virtual Component & operator=(const Component &); - // components are never moved Component(Component &&) = delete; virtual Component & operator=(Component &&) = delete; +protected: + virtual std::unique_ptr<Component> save() const; + Component(const Component &) = default; + virtual void restore(const Component & snapshot); + virtual Component & operator=(const Component &); + public: virtual ~Component() = default; |