MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
EventMultiplex.h File Reference
#include "CoreMinimal.h"
#include "Mcro/FunctionTraits.h"
#include "Mcro/Delegates/EventDelegate.h"

Go to the source code of this file.

Data Structures

class  Mcro::Delegates::Detail::TEventMultiplexBase< Return, Args >
 
class  Mcro::Delegates::TEventMultiplex< Return(Args...)>
 
class  Mcro::Delegates::TEventMultiplex< void(Args...)>
 
struct  Mcro::Delegates::TReturnOverride_Struct< Dynamic >
 
struct  Mcro::Delegates::TNativeMultiplex_Struct< Dynamic, Return >
 

Namespaces

namespace  Mcro
 
namespace  Mcro::Delegates
 
namespace  Mcro::Delegates::Detail
 

Macros

#define MCRO_DYNAMIC_EVENT_MULTIPLEX(functionName)
 
#define MCRO_DYNAMIC_RETURN(delegate, type)
 

Typedefs

template<typename Dynamic >
using Mcro::Delegates::TReturnOverride = typename TReturnOverride_Struct<Dynamic>::Type
 
template<typename Dynamic , typename Return = TReturnOverride<Dynamic>>
using Mcro::Delegates::TNativeMultiplex = typename TNativeMultiplex_Struct<Dynamic, Return>::Type
 

Detailed Description

Author
David Mórász
Date
2025

Definition in file EventMultiplex.h.

Macro Definition Documentation

◆ MCRO_DYNAMIC_EVENT_MULTIPLEX

#define MCRO_DYNAMIC_EVENT_MULTIPLEX ( functionName)
Value:
{ \
Mcro::Delegates::From(this, &MCRO_THIS_TYPE::functionName), \
Mcro::Delegates::From(functionName##Event) \
} \
typename TNativeMultiplex_Struct< Dynamic, Return >::Type TNativeMultiplex

Glue together a regular function, a native event delegate and a dynamic multicast delegate, so a given API can serve

  • events via function override
  • C++ listeners via a native event delegate
  • Blueprint listeners via a dynamic multicast delegate with calling only a single class member.
Parameters
functionNameThe base name of the function which can be listened to with multiplexing

Definition at line 28 of file EventMultiplex.h.

◆ MCRO_DYNAMIC_RETURN

#define MCRO_DYNAMIC_RETURN ( delegate,
type )
Value:

In case the multiplexed function returns a value instead of just returning void, add this macro below the dynamic multicast delegate declaration

Parameters
delegateThe name of the dynamic multicast delegate
typeThe return type of the multiplexed function

Definition at line 42 of file EventMultiplex.h.