1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-25 07:35:36 +01:00
GiantsTools/Sdk/Include/Core/Public/IEventSource.h
2021-02-28 00:46:21 -08:00

15 lines
388 B
C++

#pragma once
#include <functional>
#include <guiddef.h>
#include "EventListenerResult.h"
template<typename TEventType, typename TEvent>
struct IEventSource
{
virtual ~IEventSource() = default;
virtual GUID Listen(TEventType event, std::function<EventListenerResult(const TEvent&)> function) noexcept = 0;
virtual void Unlisten(TEventType event, GUID uuid) noexcept = 0;
};