diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-10 17:20:49 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (patch) | |
tree | 7749fc877652bb2cf7bbd2b7c1fed5e3abe397fc /src/interfaces/generation_tracker.hpp | |
parent | b828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff) |
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/interfaces/generation_tracker.hpp')
-rw-r--r-- | src/interfaces/generation_tracker.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/interfaces/generation_tracker.hpp b/src/interfaces/generation_tracker.hpp index fcd2426..fd2c130 100644 --- a/src/interfaces/generation_tracker.hpp +++ b/src/interfaces/generation_tracker.hpp @@ -1,5 +1,7 @@ #pragma once +#include "DI/factory.hpp" + #include <cstdint> #include <memory> @@ -16,4 +18,5 @@ public: virtual void set_is_paused(bool is_paused) noexcept = 0; }; -using IGenerationTrackerFactory = std::shared_ptr<IGenerationTracker> (*)(bool is_paused); +using IGenerationTrackerFactory = + Factory<std::unique_ptr<IGenerationTracker>(bool is_paused)>; |