diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-08 16:06:03 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:57:01 +0200 |
commit | 3f9004b598fc8006576db9b8d2ae4e080101101b (patch) | |
tree | 97108db2a08253417139bd76741add2dd126f58d /src/interfaces | |
parent | 2d9661790db30eb169d07d36b485943c598253b9 (diff) |
refactor: give game responsibility of statusline
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/status_manager.hpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/interfaces/status_manager.hpp b/src/interfaces/status_manager.hpp index 9c7234e..7c56df1 100644 --- a/src/interfaces/status_manager.hpp +++ b/src/interfaces/status_manager.hpp @@ -2,8 +2,6 @@ #include "interfaces/statusline.hpp" -#include <yacppdic/factory.hpp> - #include <memory> #include <string_view> @@ -13,7 +11,7 @@ class IStatusManager public: virtual ~IStatusManager() = default; - virtual void initialize() noexcept = 0; + virtual void bind(const std::shared_ptr<IStatusLine> &statusline) noexcept = 0; virtual void set_section_title( const StatusLineSection §ion, @@ -22,10 +20,5 @@ public: virtual void set_section_body( const StatusLineSection §ion, const std::string_view &body) noexcept = 0; - - [[nodiscard]] virtual auto get_statusline() const noexcept - -> std::shared_ptr<IStatusLine> = 0; }; -using IStatusManagerFactory = yacppdic::Factory<std::unique_ptr<IStatusManager>( - const std::shared_ptr<IStatusLine> &statusline)>; |