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

15 lines
388 B
C
Raw Normal View History

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