mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-23 14:45:37 +01:00
10 lines
331 B
C
10 lines
331 B
C
|
#pragma once
|
||
|
|
||
|
template<typename TEventType, typename TEvent>
|
||
|
struct IEventSource
|
||
|
{
|
||
|
virtual ~IEventSource() = default;
|
||
|
|
||
|
virtual UUID STDMETHODCALLTYPE Listen(TEventType event, std::function<void(const TEvent&)> function) noexcept = 0;
|
||
|
virtual void STDMETHODCALLTYPE Unlisten(TEventType event, UUID uuid) noexcept = 0;
|
||
|
};
|