diff options
Diffstat (limited to 'src/interfaces/observable.hpp')
-rw-r--r-- | src/interfaces/observable.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <functional> +#include "interfaces/command.hpp" -using Callback = std::function<void()>; +#include <functional> +#include <memory> template <typename Event> 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<ICommand> &command) noexcept = 0; virtual void notify(const Event &event) const noexcept = 0; }; |