From 40d02748924aa7c48b04cf948204d8dacdfbbc74 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 30 Apr 2022 16:28:13 +0200 Subject: refactor: replace DI files with the yacppdic library --- src/interfaces/game.hpp | 4 ++-- src/interfaces/generation_tracker.hpp | 4 ++-- src/interfaces/matrix.hpp | 6 ++++-- src/interfaces/randomization.hpp | 4 ++-- src/interfaces/scene.hpp | 4 ++-- src/interfaces/status_updater.hpp | 5 +++-- src/interfaces/statusline.hpp | 4 ++-- 7 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp index 6d247d9..dee2218 100644 --- a/src/interfaces/game.hpp +++ b/src/interfaces/game.hpp @@ -5,7 +5,7 @@ #include "interfaces/scene.hpp" #include "interfaces/window.hpp" -#include "DI/factory.hpp" +#include #include #include @@ -32,7 +32,7 @@ using IGameFactory = std::unique_ptr (*)( const std::shared_ptr &cursor_controller); */ -using IGameFactory = Factory( +using IGameFactory = yacppdic::Factory( const std::shared_ptr &window, const std::shared_ptr &scene, const std::shared_ptr &cursor_controller diff --git a/src/interfaces/generation_tracker.hpp b/src/interfaces/generation_tracker.hpp index fd2c130..ca2e36b 100644 --- a/src/interfaces/generation_tracker.hpp +++ b/src/interfaces/generation_tracker.hpp @@ -1,6 +1,6 @@ #pragma once -#include "DI/factory.hpp" +#include #include #include @@ -19,4 +19,4 @@ public: }; using IGenerationTrackerFactory = - Factory(bool is_paused)>; + yacppdic::Factory(bool is_paused)>; diff --git a/src/interfaces/matrix.hpp b/src/interfaces/matrix.hpp index 7fea003..5a01943 100644 --- a/src/interfaces/matrix.hpp +++ b/src/interfaces/matrix.hpp @@ -1,10 +1,11 @@ #pragma once -#include "DI/factory.hpp" #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include "engine/matrix_iterator.hpp" +#include + #include template @@ -39,4 +40,5 @@ public: }; template -using IMatrixFactory = Factory>(const Bounds &bounds)>; +using IMatrixFactory = + yacppdic::Factory>(const Bounds &bounds)>; diff --git a/src/interfaces/randomization.hpp b/src/interfaces/randomization.hpp index 26426e3..06f7d49 100644 --- a/src/interfaces/randomization.hpp +++ b/src/interfaces/randomization.hpp @@ -1,6 +1,6 @@ #pragma once -#include "DI/factory.hpp" +#include #include @@ -30,4 +30,4 @@ public: }; using IRandomNumberGeneratorFactory = - Factory(const uint32_t &seed)>; + yacppdic::Factory(const uint32_t &seed)>; diff --git a/src/interfaces/scene.hpp b/src/interfaces/scene.hpp index 88cb3b1..105b173 100644 --- a/src/interfaces/scene.hpp +++ b/src/interfaces/scene.hpp @@ -4,7 +4,7 @@ #include "interfaces/matrix.hpp" #include "interfaces/window.hpp" -#include "DI/factory.hpp" +#include #include @@ -22,7 +22,7 @@ public: -> const std::shared_ptr> & = 0; }; -using ISceneFactory = Factory( +using ISceneFactory = yacppdic::Factory( const std::shared_ptr &cursor_controller, const std::shared_ptr &window )>; diff --git a/src/interfaces/status_updater.hpp b/src/interfaces/status_updater.hpp index 83b2bf2..4b2ceb1 100644 --- a/src/interfaces/status_updater.hpp +++ b/src/interfaces/status_updater.hpp @@ -4,9 +4,10 @@ #include "interfaces/statusline.hpp" #include "interfaces/subscriber.hpp" -#include "DI/factory.hpp" #include "engine/data/vector2.hpp" +#include + #include // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) @@ -16,7 +17,7 @@ public: void update(const Vector2 &context) noexcept override = 0; }; -using IStatusUpdaterFactory = Factory( +using IStatusUpdaterFactory = yacppdic::Factory( const std::shared_ptr &statusline, const std::shared_ptr &generation_tracker )>; diff --git a/src/interfaces/statusline.hpp b/src/interfaces/statusline.hpp index c104fad..0da295e 100644 --- a/src/interfaces/statusline.hpp +++ b/src/interfaces/statusline.hpp @@ -3,7 +3,7 @@ #include "interfaces/cursor.hpp" #include "interfaces/window.hpp" -#include "DI/factory.hpp" +#include #include @@ -27,7 +27,7 @@ public: ) noexcept = 0; }; -using IStatusLineFactory = Factory( +using IStatusLineFactory = yacppdic::Factory( const std::shared_ptr &cursor_controller, const std::shared_ptr &window )>; -- cgit v1.2.3-18-g5258