From 78f5d8cf644383adf20933ad64c160c07c2c54fb Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 13:17:16 +0100 Subject: refactor: improve input configuring structure --- src/interfaces/observable.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/interfaces/observable.hpp') diff --git a/src/interfaces/observable.hpp b/src/interfaces/observable.hpp index 1777b7d..21fed76 100644 --- a/src/interfaces/observable.hpp +++ b/src/interfaces/observable.hpp @@ -1,8 +1,9 @@ #pragma once -#include +#include "interfaces/command.hpp" -using Callback = std::function; +#include +#include template class IObservable @@ -12,7 +13,8 @@ public: virtual void listen() const noexcept = 0; - virtual void attach(const Event &event, Callback callback) noexcept = 0; + virtual void attach(const char &event, + const std::shared_ptr &command) noexcept = 0; virtual void notify(const Event &event) const noexcept = 0; }; -- cgit v1.2.3-18-g5258