A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
BaseManager.h File Reference
#include <unordered_map>
#include "CoreMinimal.h"
#include "EventLogService.h"
#include "UObject/Object.h"
#include "BaseManager.generated.h"
Include dependency graph for BaseManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UBaseManager::THandlerComp
 
struct  UBaseManager::THandlerHash
 
class  UBaseManager
 It provides functionalities for handling events, sending events, and managing a private owner. It includes a Handlers map to store event handlers for different event types. More...
 

Macros

#define DECLARE_EVENT_HANDLER(TEvent)   protected: void HandleEvent_Impl(class TEvent* Event);
 
#define DEFINE_EVENT_HANDLER(TEventType)
 

Functions

template<typename TManagerType >
PRAGMA_ENABLE_OPTIMIZATION FUNCTION_NON_NULL_RETURN_START TManagerType * NewManager (APlayerController *Owner, UClass *TargetManagerClass) FUNCTION_NON_NULL_RETURN_END
 

Macro Definition Documentation

◆ DECLARE_EVENT_HANDLER

#define DECLARE_EVENT_HANDLER ( TEvent)    protected: void HandleEvent_Impl(class TEvent* Event);

Definition at line 11 of file BaseManager.h.

◆ DEFINE_EVENT_HANDLER

#define DEFINE_EVENT_HANDLER ( TEventType)
Value:
static_assert(std::is_base_of<UBaseEvent, TEventType>::value, "Trying to create definiton for invalid event"); \
Handlers[TEventType::StaticClass()] = [this](UBaseEvent* Event) -> void \
{ \
HandleEvent_Impl(Cast<TEventType>(Event)); \
};
The UBaseEvent class serves as the base class for all events for our event-managers system....
Definition BaseEvent.h:83

Definition at line 13 of file BaseManager.h.

Function Documentation

◆ NewManager()

template<typename TManagerType >
PRAGMA_ENABLE_OPTIMIZATION FUNCTION_NON_NULL_RETURN_START TManagerType * NewManager ( APlayerController * Owner,
UClass * TargetManagerClass )

Definition at line 84 of file BaseManager.h.