aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/observable.hpp
blob: 21fed7628b51dbc9fe02e0292e1266779061e190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "interfaces/command.hpp"

#include <functional>
#include <memory>

template <typename Event>
class IObservable
{
public:
	virtual ~IObservable() noexcept = default;

	virtual void listen() const 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;
};