A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
BaseManager.cpp
Go to the documentation of this file.
1
// Copyright(c) Pixo Group. All Rights Reserved.
2
3
#include "
EventSystem/BaseManager.h
"
4
#include "
EventSystem/Events/BaseEvent.h
"
5
6
UBaseManager::UBaseManager
(): Super()
7
{
8
DEFINE_EVENT_HANDLER
(
UBaseEvent
);
9
}
10
11
void
UBaseManager::HandleEvent
(
UBaseEvent
*
Event
)
12
{
13
if
(ensure(
Event
))
14
{
15
auto
HandlerIter =
Handlers
.find(
Event
->GetClass());
16
if
(HandlerIter !=
Handlers
.end())
17
{
18
// std::pair<THadnlerKey, THandler>
19
(*HandlerIter).second(
Event
);
20
}
21
}
22
}
23
24
void
UBaseManager::HandleEvent_Impl
(
UBaseEvent
*
Event
)
25
{
26
LowLevelFatalError(TEXT(
"Valid DEFINE_EVENT_HANDLER(%s) was not found. Add proper call to the Manager class."
), *
Event
->GetClass()->GetName())
27
}
BaseEvent.h
BaseManager.h
DEFINE_EVENT_HANDLER
#define DEFINE_EVENT_HANDLER(TEventType)
Definition
BaseManager.h:13
EDlgEventType::Event
@ Event
UBaseEvent
The UBaseEvent class serves as the base class for all events for our event-managers system....
Definition
BaseEvent.h:83
UBaseManager::UBaseManager
UBaseManager()
Definition
BaseManager.cpp:6
UBaseManager::HandleEvent_Impl
void HandleEvent_Impl(class UBaseEvent *Event)
Definition
BaseManager.cpp:24
UBaseManager::HandleEvent
void HandleEvent(UBaseEvent *Event)
Definition
BaseManager.cpp:11
UBaseManager::Handlers
THandlers Handlers
Definition
BaseManager.h:77
SDKDemo
Plugins
UnrealEngineSDK
PixoCore
Source
PixoCore
Private
EventSystem
BaseManager.cpp
Generated
Wed Oct 9 2024 19:52:53
by Doxygen version
1.10.0