1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-23 14:45:37 +01:00
GiantsTools/Sdk/Include/IEventSource.h

10 lines
331 B
C
Raw Normal View History

2020-09-22 07:30:26 +02:00
#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;
};