1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-07-03 03:51:45 +02:00
GiantsTools/Sdk/Include/Core/Public/IEventSource.h
2021-01-23 15:40:09 -08:00

13 lines
339 B
C++

#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;
};