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/statusline.hpp | |
parent | b828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff) |
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/interfaces/statusline.hpp')
-rw-r--r-- | src/interfaces/statusline.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/statusline.hpp b/src/interfaces/statusline.hpp index f07c1a0..bbd8e4a 100644 --- a/src/interfaces/statusline.hpp +++ b/src/interfaces/statusline.hpp @@ -3,6 +3,8 @@ #include "interfaces/cursor.hpp" #include "interfaces/window.hpp" +#include "DI/factory.hpp" + #include <string_view> enum StatusLineSection @@ -23,6 +25,6 @@ public: const std::string_view &str) noexcept = 0; }; -using IStatusLineFactory = std::shared_ptr<IStatusLine> (*)( +using IStatusLineFactory = Factory<std::unique_ptr<IStatusLine>( const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window); + const std::shared_ptr<IWindow> &window)>; |