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/scene.hpp | |
parent | b828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff) |
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/interfaces/scene.hpp')
-rw-r--r-- | src/interfaces/scene.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/scene.hpp b/src/interfaces/scene.hpp index 3960985..0a51b6e 100644 --- a/src/interfaces/scene.hpp +++ b/src/interfaces/scene.hpp @@ -4,6 +4,8 @@ #include "interfaces/matrix.hpp" #include "interfaces/window.hpp" +#include "DI/factory.hpp" + #include <memory> // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) @@ -20,6 +22,6 @@ public: -> const std::shared_ptr<IMatrix<std::string_view>> & = 0; }; -using ISceneFactory = std::shared_ptr<IScene> (*)( +using ISceneFactory = Factory<std::unique_ptr<IScene>( const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window); + const std::shared_ptr<IWindow> &window)>; |