aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r--src/bootstrap.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp
index 7962910..b11f199 100644
--- a/src/bootstrap.cpp
+++ b/src/bootstrap.cpp
@@ -56,8 +56,7 @@ auto bootstrap() noexcept -> yacppdic::Container
[&container](
const std::shared_ptr<IWindow> &window,
const std::shared_ptr<IScene> &scene,
- const std::shared_ptr<ICursorController> &cursor_controller
- )
+ const std::shared_ptr<ICursorController> &cursor_controller)
{
std::shared_ptr<IStatusLine> statusline =
container.get<IStatusLineFactory>()(cursor_controller, window);
@@ -78,51 +77,43 @@ auto bootstrap() noexcept -> yacppdic::Container
statusline,
generation_tracker,
status_manager,
- vector2_statusline_subscriber_adapter_factory
- );
- }
- );
+ vector2_statusline_subscriber_adapter_factory);
+ });
container.bind<IRandomNumberGeneratorFactory>().to_factory(
[](const uint32_t &seed)
{
return std::make_unique<RandomNumberGenerator>(seed);
- }
- );
+ });
container.bind<IMatrixFactory<std::string_view>>().to_factory(
[](const Bounds &bounds)
{
return std::make_unique<Matrix<std::string_view>>(bounds);
- }
- );
+ });
container.bind<ISceneFactory>().to_factory(
[&container](
const std::shared_ptr<ICursorController> &cursor_controller,
- const std::shared_ptr<IWindow> &window
- )
+ const std::shared_ptr<IWindow> &window)
{
auto matrix_factory = container.get<IMatrixFactory<std::string_view>>();
return std::make_unique<Scene>(matrix_factory, cursor_controller, window);
- }
- );
+ });
container.bind<IStatusLineFactory>().to_factory(
[](const std::shared_ptr<ICursorController> &cursor_controller,
const std::shared_ptr<IWindow> &window)
{
return std::make_unique<StatusLine>(cursor_controller, window);
- }
- );
+ });
container.bind<IStatusManagerFactory>().to_factory(
[](const std::shared_ptr<IStatusLine> &statusline)
{
return std::make_unique<StatusManager>(statusline);
- }
- );
+ });
container.bind<IStatusLineSubscriberAdapterFactory<Vector2>>().to_factory(
[](const std::shared_ptr<IStatusManager> &status_manager,
@@ -142,17 +133,14 @@ auto bootstrap() noexcept -> yacppdic::Container
return std::string("");
}
},
- sections
- );
- }
- );
+ sections);
+ });
container.bind<IGenerationTrackerFactory>().to_factory(
[](bool is_paused)
{
return std::make_unique<GenerationTracker>(is_paused);
- }
- );
+ });
return container;
}