1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-10-02 19:32:12 +02:00
GiantsTools/Sdk/Include/Core/Public/IEventSource.h

13 lines
339 B
C
Raw Normal View History

2021-01-24 00:40:09 +01:00
#pragma once
#include <functional>
#include <guiddef.h>
template<typename TEventType, typename TEvent>
struct IEventSource
{
virtual ~IEventSource() = default;
virtual GUID Listen(TEventType event, std::function<void(const TEvent&)> function) noexcept = 0;
virtual void Unlisten(TEventType event, GUID uuid) noexcept = 0;
};