aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/status_updater.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-04-10 17:20:49 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:58 +0200
commitb36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (patch)
tree7749fc877652bb2cf7bbd2b7c1fed5e3abe397fc /src/interfaces/status_updater.hpp
parentb828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff)
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/interfaces/status_updater.hpp')
-rw-r--r--src/interfaces/status_updater.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/status_updater.hpp b/src/interfaces/status_updater.hpp
index 2770d5e..e5081ef 100644
--- a/src/interfaces/status_updater.hpp
+++ b/src/interfaces/status_updater.hpp
@@ -4,6 +4,7 @@
#include "interfaces/statusline.hpp"
#include "interfaces/subscriber.hpp"
+#include "DI/factory.hpp"
#include "engine/data/vector2.hpp"
#include <memory>
@@ -15,6 +16,6 @@ public:
void update(const Vector2 &context) noexcept override = 0;
};
-using IStatusUpdaterFactory = std::shared_ptr<IStatusUpdater> (*)(
+using IStatusUpdaterFactory = Factory<std::unique_ptr<IStatusUpdater>(
const std::shared_ptr<IStatusLine> &statusline,
- const std::shared_ptr<IGenerationTracker> &generation_tracker);
+ const std::shared_ptr<IGenerationTracker> &generation_tracker)>;