mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-24 07:05: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;
|
||
|
};
|