From fb080f6fb911b1831c176a06259e384772541dd5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 2 May 2022 22:36:21 +0200 Subject: refactor: seperate statusline related concerns --- src/CMakeLists.txt | 2 +- src/bootstrap.cpp | 50 +++++++++-- src/commands/toggle_pause.cpp | 13 +-- src/commands/toggle_pause.hpp | 6 +- src/game/game.cpp | 101 ++++++++++++++++------- src/game/game.hpp | 11 ++- src/game/status_manager.cpp | 43 ++++++++++ src/game/status_manager.hpp | 32 +++++++ src/game/status_updater.cpp | 30 ------- src/game/status_updater.hpp | 25 ------ src/game/statusline.cpp | 55 ++++++++---- src/game/statusline.hpp | 14 ++-- src/game/statusline_subscriber_adapter.hpp | 30 +++++++ src/game/statusline_subscriber_adapter.tpp | 31 +++++++ src/interfaces/status_manager.hpp | 28 +++++++ src/interfaces/status_updater.hpp | 23 ------ src/interfaces/statusline.hpp | 16 +++- src/interfaces/statusline_subscriber_adapter.hpp | 17 ++++ 18 files changed, 364 insertions(+), 163 deletions(-) create mode 100644 src/game/status_manager.cpp create mode 100644 src/game/status_manager.hpp delete mode 100644 src/game/status_updater.cpp delete mode 100644 src/game/status_updater.hpp create mode 100644 src/game/statusline_subscriber_adapter.hpp create mode 100644 src/game/statusline_subscriber_adapter.tpp create mode 100644 src/interfaces/status_manager.hpp delete mode 100644 src/interfaces/status_updater.hpp create mode 100644 src/interfaces/statusline_subscriber_adapter.hpp (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92ce76b..3a75269 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,7 +15,7 @@ file(GLOB SOURCES argument_parser.cpp util/color.cpp game/game.cpp - game/status_updater.cpp + game/status_manager.cpp game/generation_tracker.cpp game/statusline.cpp engine/engine.cpp diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 52d4ab8..70407a2 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -10,8 +10,9 @@ #include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" #include "interfaces/scene.hpp" -#include "interfaces/status_updater.hpp" +#include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" +#include "interfaces/statusline_subscriber_adapter.hpp" #include "interfaces/window.hpp" // Implementations @@ -26,14 +27,19 @@ #include "engine/user/input.hpp" #include "game/game.hpp" #include "game/generation_tracker.hpp" -#include "game/status_updater.hpp" +#include "game/status_manager.hpp" #include "game/statusline.hpp" +#include "game/statusline_subscriber_adapter.hpp" #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" +#include + #include #include +#include #include +#include auto bootstrap() noexcept -> yacppdic::Container { @@ -56,11 +62,14 @@ auto bootstrap() noexcept -> yacppdic::Container std::shared_ptr statusline = container.get()(cursor_controller, window); + std::shared_ptr status_manager = + container.get()(statusline); + std::shared_ptr generation_tracker = container.get()(true); - std::shared_ptr status_updater = - container.get()(statusline, generation_tracker); + auto vector2_statusline_subscriber_adapter_factory = + container.get>(); return std::make_unique( window, @@ -68,7 +77,8 @@ auto bootstrap() noexcept -> yacppdic::Container cursor_controller, statusline, generation_tracker, - status_updater + status_manager, + vector2_statusline_subscriber_adapter_factory ); } ); @@ -107,11 +117,33 @@ auto bootstrap() noexcept -> yacppdic::Container } ); - container.bind().to_factory( - [](const std::shared_ptr &statusline, - const std::shared_ptr &generation_tracker) + container.bind().to_factory( + [](const std::shared_ptr &statusline) { - return std::make_unique(statusline, generation_tracker); + return std::make_unique(statusline); + } + ); + + container.bind>().to_factory( + [](const std::shared_ptr &status_manager, + std::vector sections) + { + return std::make_unique>( + status_manager, + [](std::size_t section_index, const Vector2 &position) + { + switch (section_index) + { + case 0: + return fmt::format("{}", position.get_x()); + case 1: + return fmt::format("{}", position.get_y()); + default: + return std::string(""); + } + }, + sections + ); } ); diff --git a/src/commands/toggle_pause.cpp b/src/commands/toggle_pause.cpp index 434330e..54682c6 100644 --- a/src/commands/toggle_pause.cpp +++ b/src/commands/toggle_pause.cpp @@ -5,10 +5,10 @@ TogglePauseCommand::TogglePauseCommand( std::shared_ptr generation_tracker, - std::shared_ptr statusline + std::shared_ptr status_manager ) noexcept : _generation_tracker(std::move(generation_tracker)), - _statusline(std::move(statusline)) + _status_manager(std::move(status_manager)) { } @@ -18,12 +18,5 @@ void TogglePauseCommand::execute() noexcept _generation_tracker->set_is_paused(onoff); - _statusline->set_status( - StatusLineSection::B, - fmt::format( - "Paused: {} Generation: {}", - _generation_tracker->get_is_paused() ? "yes" : "no", - _generation_tracker->get_current_generation() - ) - ); + _status_manager->set_section_body(StatusLineSection::D, onoff ? "yes" : "no"); } diff --git a/src/commands/toggle_pause.hpp b/src/commands/toggle_pause.hpp index e243cc3..43502f8 100644 --- a/src/commands/toggle_pause.hpp +++ b/src/commands/toggle_pause.hpp @@ -2,7 +2,7 @@ #include "interfaces/command.hpp" #include "interfaces/generation_tracker.hpp" -#include "interfaces/statusline.hpp" +#include "interfaces/status_manager.hpp" #include @@ -11,12 +11,12 @@ class TogglePauseCommand : public ICommand public: explicit TogglePauseCommand( std::shared_ptr generation_tracker, - std::shared_ptr statusline + std::shared_ptr status_manager ) noexcept; void execute() noexcept override; private: std::shared_ptr _generation_tracker; - std::shared_ptr _statusline; + std::shared_ptr _status_manager; }; diff --git a/src/game/game.cpp b/src/game/game.cpp index 1a69e2e..02a0f65 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -15,14 +15,19 @@ Game::Game( std::shared_ptr cursor_controller, std::shared_ptr statusline, std::shared_ptr generation_tracker, - std::shared_ptr status_updater + std::shared_ptr status_manager, + IStatusLineSubscriberAdapterFactory + vector2_statusline_subscriber_adapter_factory ) noexcept : _window(std::move(window)), _scene(std::move(scene)), _cursor_controller(std::move(cursor_controller)), _statusline(std::move(statusline)), _generation_tracker(std::move(generation_tracker)), - _status_updater(std::move(status_updater)) + _status_manager(std::move(status_manager)), + _vector2_statusline_subscriber_adapter_factory( + vector2_statusline_subscriber_adapter_factory + ) { } @@ -30,7 +35,22 @@ void Game::on_start() noexcept { _statusline->initialize_background(); - _cursor_controller->subscribe(CursorEvent::POSITION_CHANGE, _status_updater); + _status_manager->set_section_title(StatusLineSection::A, ""); + _status_manager->set_section_title(StatusLineSection::B, "X: "); + _status_manager->set_section_title(StatusLineSection::C, "Y: "); + _status_manager->set_section_title(StatusLineSection::D, "Paused: "); + _status_manager->set_section_title(StatusLineSection::E, "Generation: "); + + std::shared_ptr> vector2_statusline_subscriber_adapter = + _vector2_statusline_subscriber_adapter_factory( + _status_manager, + { StatusLineSection::B, StatusLineSection::C } + ); + + _cursor_controller->subscribe( + CursorEvent::POSITION_CHANGE, + vector2_statusline_subscriber_adapter + ); const auto window_size = _window->size(); @@ -40,7 +60,22 @@ void Game::on_start() noexcept _cursor_controller->move_to(center_position); - _status_updater->update(center_position); + _status_manager->set_section_body( + StatusLineSection::B, + fmt::format("{}", center_position.get_x()) + ); + + _status_manager->set_section_body( + StatusLineSection::C, + fmt::format("{}", center_position.get_y()) + ); + + _status_manager->set_section_body( + StatusLineSection::D, + _generation_tracker->get_is_paused() ? "yes" : "no" + ); + + _status_manager->set_section_body(StatusLineSection::E, "0"); } void Game::on_update() noexcept {} @@ -63,32 +98,34 @@ void Game::on_exit() const noexcept auto Game::get_input_config() const noexcept -> std::unordered_map> { - return { { 'q', std::make_shared() }, - { 'i', std::make_shared(_cursor_controller, _scene) }, - { 'p', - std::make_shared(_generation_tracker, _statusline) }, - { 'k', - std::make_shared( - Vector2::up(), - _cursor_controller, - _window - ) }, - { 'j', - std::make_shared( - Vector2::down(), - _cursor_controller, - _window - ) }, - { 'h', - std::make_shared( - Vector2::left(), - _cursor_controller, - _window - ) }, - { 'l', - std::make_shared( - Vector2::right(), - _cursor_controller, - _window - ) } }; + return { + { 'q', std::make_shared() }, + { 'i', std::make_shared(_cursor_controller, _scene) }, + { 'p', + std::make_shared(_generation_tracker, _status_manager) }, + { 'k', + std::make_shared( + Vector2::up(), + _cursor_controller, + _window + ) }, + { 'j', + std::make_shared( + Vector2::down(), + _cursor_controller, + _window + ) }, + { 'h', + std::make_shared( + Vector2::left(), + _cursor_controller, + _window + ) }, + { 'l', + std::make_shared( + Vector2::right(), + _cursor_controller, + _window + ) } + }; } diff --git a/src/game/game.hpp b/src/game/game.hpp index 9f08158..9689215 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -4,8 +4,9 @@ #include "interfaces/game.hpp" #include "interfaces/generation_tracker.hpp" #include "interfaces/scene.hpp" -#include "interfaces/status_updater.hpp" +#include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" +#include "interfaces/statusline_subscriber_adapter.hpp" #include "interfaces/window.hpp" #include @@ -19,7 +20,9 @@ public: std::shared_ptr cursor_controller, std::shared_ptr statusline, std::shared_ptr generation_tracker, - std::shared_ptr status_updater + std::shared_ptr status_manager, + IStatusLineSubscriberAdapterFactory + vector2_statusline_subscriber_adapter_factory ) noexcept; void on_start() noexcept override; @@ -37,5 +40,7 @@ private: std::shared_ptr _cursor_controller; std::shared_ptr _statusline; std::shared_ptr _generation_tracker; - std::shared_ptr _status_updater; + std::shared_ptr _status_manager; + IStatusLineSubscriberAdapterFactory + _vector2_statusline_subscriber_adapter_factory; }; diff --git a/src/game/status_manager.cpp b/src/game/status_manager.cpp new file mode 100644 index 0000000..727452c --- /dev/null +++ b/src/game/status_manager.cpp @@ -0,0 +1,43 @@ +#include "status_manager.hpp" + +#include + +#include + +StatusManager::StatusManager(std::shared_ptr statusline) noexcept + : _statusline(std::move(statusline)) + +{ + _statusline->set_section_length(StatusLineSection::A, 5U); + _statusline->set_section_length(StatusLineSection::B, 15U); + _statusline->set_section_length(StatusLineSection::C, 15U); + _statusline->set_section_length(StatusLineSection::D, 20U); + _statusline->set_section_length(StatusLineSection::E, 15U); + _statusline->set_section_length(StatusLineSection::F, 15U); +} + +void StatusManager::set_section_title( + const StatusLineSection §ion, + const std::string_view &title +) noexcept +{ + if (_title_lengths.count(section) != 0) + { + fmt::print(stderr, "Error: can't set statusbar section title more than once"); + return; + } + + _statusline->set_status(section, title); + + _title_lengths[section] = title.length(); +} + +void StatusManager::set_section_body( + const StatusLineSection §ion, + const std::string_view &body +) noexcept +{ + auto section_title_length = _title_lengths[section]; + + _statusline->set_status(section, body, section_title_length + 1); +} diff --git a/src/game/status_manager.hpp b/src/game/status_manager.hpp new file mode 100644 index 0000000..62b5bc7 --- /dev/null +++ b/src/game/status_manager.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "interfaces/generation_tracker.hpp" +#include "interfaces/status_manager.hpp" +#include "interfaces/statusline.hpp" +#include "interfaces/subscriber.hpp" + +#include "engine/data/vector2.hpp" + +#include +#include + +class StatusManager : public IStatusManager +{ +public: + explicit StatusManager(std::shared_ptr statusline) noexcept; + + void set_section_title( + const StatusLineSection §ion, + const std::string_view &title + ) noexcept override; + + void set_section_body( + const StatusLineSection §ion, + const std::string_view &body + ) noexcept override; + +private: + std::shared_ptr _statusline; + + std::unordered_map _title_lengths; +}; diff --git a/src/game/status_updater.cpp b/src/game/status_updater.cpp deleted file mode 100644 index 1cfd1d2..0000000 --- a/src/game/status_updater.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "status_updater.hpp" - -#include -#include - -StatusUpdater::StatusUpdater( - std::shared_ptr statusline, - std::shared_ptr generation_tracker -) noexcept - : _statusline(std::move(statusline)), - _generation_tracker(std::move(generation_tracker)) -{ -} - -void StatusUpdater::update(const Vector2 &context) noexcept -{ - _statusline->set_status( - StatusLineSection::A, - fmt::format("X: {} Y {}", context.get_x(), context.get_y()) - ); - - _statusline->set_status( - StatusLineSection::B, - fmt::format( - "Paused: {} Generation: {}", - _generation_tracker->get_is_paused() ? "yes" : "no", - _generation_tracker->get_current_generation() - ) - ); -} diff --git a/src/game/status_updater.hpp b/src/game/status_updater.hpp deleted file mode 100644 index 0fd38a7..0000000 --- a/src/game/status_updater.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "interfaces/generation_tracker.hpp" -#include "interfaces/status_updater.hpp" -#include "interfaces/statusline.hpp" -#include "interfaces/subscriber.hpp" - -#include "engine/data/vector2.hpp" - -#include - -class StatusUpdater : public IStatusUpdater -{ -public: - explicit StatusUpdater( - std::shared_ptr statusline, - std::shared_ptr generation_tracker - ) noexcept; - - void update(const Vector2 &context) noexcept override; - -private: - std::shared_ptr _statusline; - std::shared_ptr _generation_tracker; -}; diff --git a/src/game/statusline.cpp b/src/game/statusline.cpp index d764d60..58a317b 100644 --- a/src/game/statusline.cpp +++ b/src/game/statusline.cpp @@ -3,9 +3,13 @@ #include "engine/escape.hpp" #include "util/color.hpp" +#include #include +#include +#include #include #include +#include StatusLine::StatusLine( std::shared_ptr cursor_controller, @@ -13,11 +17,6 @@ StatusLine::StatusLine( ) noexcept : _cursor_controller(std::move(cursor_controller)), _window(std::move(window)) { - constexpr uint32_t SECTION_A_LENGTH = 20; - constexpr uint32_t SECTION_B_LENGTH = 30; - - _sections_lengths[StatusLineSection::A] = SECTION_A_LENGTH; - _sections_lengths[StatusLineSection::B] = SECTION_B_LENGTH; } void StatusLine::initialize_background() noexcept @@ -33,23 +32,27 @@ void StatusLine::initialize_background() noexcept } void StatusLine::set_status( - StatusLineSection section, - const std::string_view &statusline_str + const StatusLineSection §ion, + const std::string_view &status, + std::size_t start ) noexcept { - _clear_section(section); + _clear_section(section, start); - int32_t section_start = _get_section_start_x(section); + auto section_start = _get_section_start_x(section); - const auto previous_position = _move_to_statusline(section_start); + const auto previous_position = + _move_to_statusline(section_start + static_cast(start)); auto background_color = get_background_esc_seq(STATUSBAR_COLOR); auto section_length = _sections_lengths[section]; - auto status = statusline_str.length() > section_length - ? statusline_str.substr(0, section_length) - : statusline_str; + /* + auto status = status.length() > section_length + ? status_str.substr(0, section_length) + : status_str; + */ fmt::print("{}{}", background_color, status); fmt::print(RESET_ALL_MODES, fmt::arg("esc", ESC)); @@ -57,6 +60,14 @@ void StatusLine::set_status( _move_back(previous_position); } +void StatusLine::set_section_length( + const StatusLineSection §ion, + uint32_t length +) noexcept +{ + _sections_lengths[section] = length; +} + auto StatusLine::_move_to_statusline(int32_t x) noexcept -> Vector2 { const auto previous_position = _cursor_controller->where(); @@ -78,7 +89,8 @@ void StatusLine::_move_back(Vector2 previous_position) noexcept _cursor_controller->show(); } -auto StatusLine::_get_section_start_x(StatusLineSection section) const noexcept -> int32_t +auto StatusLine::_get_section_start_x(const StatusLineSection §ion) const noexcept + -> int32_t { int32_t section_start = 0; @@ -96,17 +108,24 @@ auto StatusLine::_get_section_start_x(StatusLineSection section) const noexcept return section_start; } -void StatusLine::_clear_section(StatusLineSection section) noexcept +void StatusLine::_clear_section( + const StatusLineSection §ion, + std::size_t start +) noexcept { auto section_start = _get_section_start_x(section); - const auto previous_position = _move_to_statusline(section_start); + auto start_int32 = static_cast(start); + + const auto previous_position = _move_to_statusline(section_start + start_int32); auto background_color = get_background_esc_seq(STATUSBAR_COLOR); - auto section_length = _sections_lengths.at(section); + auto section_length = _sections_lengths[section]; + + auto start_uint32 = static_cast(start); - fmt::print("{}{}", background_color, std::string(section_length, ' ')); + fmt::print("{}{}", background_color, std::string(section_length - start_uint32, ' ')); fmt::print(RESET_ALL_MODES, fmt::arg("esc", ESC)); _move_back(previous_position); diff --git a/src/game/statusline.hpp b/src/game/statusline.hpp index 66ce2c4..7883051 100644 --- a/src/game/statusline.hpp +++ b/src/game/statusline.hpp @@ -25,10 +25,14 @@ public: void initialize_background() noexcept override; void set_status( - StatusLineSection section, - const std::string_view &status_str + const StatusLineSection §ion, + const std::string_view &status, + std::size_t start ) noexcept override; + void set_section_length(const StatusLineSection §ion, uint32_t length) noexcept + override; + private: std::unordered_map _sections_lengths; @@ -39,8 +43,8 @@ private: void _move_back(Vector2 previous_position) noexcept; - [[nodiscard]] auto _get_section_start_x(StatusLineSection section) const noexcept - -> int32_t; + [[nodiscard]] auto _get_section_start_x(const StatusLineSection §ion + ) const noexcept -> int32_t; - void _clear_section(StatusLineSection section) noexcept; + void _clear_section(const StatusLineSection §ion, std::size_t start) noexcept; }; diff --git a/src/game/statusline_subscriber_adapter.hpp b/src/game/statusline_subscriber_adapter.hpp new file mode 100644 index 0000000..d53ae04 --- /dev/null +++ b/src/game/statusline_subscriber_adapter.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "interfaces/statusline.hpp" +#include "interfaces/statusline_subscriber_adapter.hpp" +#include "interfaces/subscriber.hpp" + +#include +#include +#include + +template +class StatusLineSubscriberAdapter : public ISubscriber +{ +public: + StatusLineSubscriberAdapter( + std::shared_ptr status_manager, + std::string (*format_func)(std::size_t section_index, const Context &context), + const std::vector §ions + ) noexcept; + + void update(const Context &context) noexcept override; + +private: + std::shared_ptr _status_manager; + + std::string (*_format_func)(std::size_t section_index, const Context &context); + std::vector _sections; +}; + +#include "statusline_subscriber_adapter.tpp" diff --git a/src/game/statusline_subscriber_adapter.tpp b/src/game/statusline_subscriber_adapter.tpp new file mode 100644 index 0000000..1de459c --- /dev/null +++ b/src/game/statusline_subscriber_adapter.tpp @@ -0,0 +1,31 @@ +#pragma once + +#include "statusline_subscriber_adapter.hpp" + +#include + +template +StatusLineSubscriberAdapter::StatusLineSubscriberAdapter( + std::shared_ptr status_manager, + std::string (*format_func)(std::size_t section_index, const Context &context), + const std::vector §ions + +) noexcept + : _status_manager(std::move(status_manager)), + _format_func(format_func), + _sections(sections) +{ +} + +template +void StatusLineSubscriberAdapter::update(const Context &context) noexcept +{ + for (std::size_t index = 0; const auto §ion : _sections) + { + auto status = _format_func(index, context); + + _status_manager->set_section_body(_sections[index], status); + + index++; + } +} diff --git a/src/interfaces/status_manager.hpp b/src/interfaces/status_manager.hpp new file mode 100644 index 0000000..afc8416 --- /dev/null +++ b/src/interfaces/status_manager.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "interfaces/statusline.hpp" + +#include + +#include +#include + +// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) +class IStatusManager +{ +public: + virtual ~IStatusManager() = default; + + virtual void set_section_title( + const StatusLineSection §ion, + const std::string_view &title + ) noexcept = 0; + + virtual void set_section_body( + const StatusLineSection §ion, + const std::string_view &body + ) noexcept = 0; +}; + +using IStatusManagerFactory = yacppdic::Factory< + std::unique_ptr(const std::shared_ptr &statusline)>; diff --git a/src/interfaces/status_updater.hpp b/src/interfaces/status_updater.hpp deleted file mode 100644 index 4b2ceb1..0000000 --- a/src/interfaces/status_updater.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "interfaces/generation_tracker.hpp" -#include "interfaces/statusline.hpp" -#include "interfaces/subscriber.hpp" - -#include "engine/data/vector2.hpp" - -#include - -#include - -// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) -class IStatusUpdater : public ISubscriber -{ -public: - void update(const Vector2 &context) noexcept override = 0; -}; - -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 0da295e..2b61d24 100644 --- a/src/interfaces/statusline.hpp +++ b/src/interfaces/statusline.hpp @@ -9,8 +9,12 @@ enum StatusLineSection { - A, - B + A = 0, + B = 1, + C = 2, + D = 3, + E = 4, + F = 5 }; // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) @@ -22,9 +26,13 @@ public: virtual void initialize_background() noexcept = 0; virtual void set_status( - StatusLineSection section, - const std::string_view &status_str + const StatusLineSection §ion, + const std::string_view &status, + std::size_t start = 1UL ) noexcept = 0; + + virtual void + set_section_length(const StatusLineSection §ion, uint32_t length) noexcept = 0; }; using IStatusLineFactory = yacppdic::Factory( diff --git a/src/interfaces/statusline_subscriber_adapter.hpp b/src/interfaces/statusline_subscriber_adapter.hpp new file mode 100644 index 0000000..53543f7 --- /dev/null +++ b/src/interfaces/statusline_subscriber_adapter.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "interfaces/status_manager.hpp" +#include "interfaces/statusline.hpp" +#include "interfaces/subscriber.hpp" + +#include + +#include +#include + +template +using IStatusLineSubscriberAdapterFactory = + yacppdic::Factory>( + const std::shared_ptr &status_manager, + std::vector sections + )>; -- cgit v1.2.3-18-g5258