mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-05 14:55:38 +01:00
15 lines
388 B
C++
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;
|
|
}; |