From b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 10 Apr 2022 17:20:49 +0200 Subject: refactor: add factory class & make DI container return unique ptrs --- src/interfaces/game.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/interfaces/game.hpp') diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp index 46d79e4..0f5c895 100644 --- a/src/interfaces/game.hpp +++ b/src/interfaces/game.hpp @@ -5,6 +5,8 @@ #include "interfaces/scene.hpp" #include "interfaces/window.hpp" +#include "DI/factory.hpp" + #include #include @@ -24,6 +26,12 @@ public: -> std::unordered_map> = 0; }; -using IGameFactory = std::shared_ptr (*)( +/* +using IGameFactory = std::unique_ptr (*)( const std::shared_ptr &window, const std::shared_ptr &scene, const std::shared_ptr &cursor_controller); + */ + +using IGameFactory = Factory( + const std::shared_ptr &window, const std::shared_ptr &scene, + const std::shared_ptr &cursor_controller)>; -- cgit v1.2.3-18-g5258