MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
DummyDynamicDelegates.h
Go to the documentation of this file.
1/** @noop License Comment
2 * @file
3 * @copyright
4 * This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5 * If a copy of the MPL was not distributed with this file You can obtain one at
6 * https://mozilla.org/MPL/2.0/
7 *
8 * @author David Mórász
9 * @date 2025
10*/
11
12#pragma once
13
14#include "CoreMinimal.h"
15#include "Mcro/Common.h"
16
17#include "DummyDynamicDelegates.generated.h"
18
19using FTestDelegateWithArray = TDelegate<int32(TArray<FString>&)>;
20
21DECLARE_DYNAMIC_DELEGATE_OneParam(FTestDynamicDelegate, int32, Argument);
22DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(int32, FTestDynamicDelegateRetVal, int32, Argument);
23DECLARE_DYNAMIC_MULTICAST_DELEGATE(FTestDynamicMulticastDelegate);
24
25UCLASS()
26class UDynamicDelegateTestClass : public UObject
27{
28 GENERATED_BODY()
29
30public:
31 void Initialize();
32
35 int32 MemberFuncTest(TArray<FString>& results, const TCHAR* append) const;
36
37 TArray<FString> TestResult;
38
39 UPROPERTY()
40 FTestDynamicDelegate DynamicDelegate;
41 TDelegate<void(int32)> ResultDynamicDelegate;
42
43 UPROPERTY()
44 FTestDynamicDelegateRetVal DynamicDelegateRetVal;
45 TDelegate<int32(int32)> ResultDynamicDelegateRetVal;
46
47 UPROPERTY()
48 FTestDynamicMulticastDelegate Event;
49
50 UFUNCTION()
51 void DynamicDelegateBinding();
52};
This header is a central include for all common utilities MCRO offers including higher level features...
TDelegate< int32(TArray< FString > &)> FTestDelegateWithArray
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FTestDynamicMulticastDelegate)
DECLARE_DYNAMIC_DELEGATE_OneParam(FTestDynamicDelegate, int32, Argument)
DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(int32, FTestDynamicDelegateRetVal, int32, Argument)
FTestDelegateWithArray GetTestLambda() const
int32 MemberFuncTest(TArray< FString > &results, const TCHAR *append) const
FTestDelegateWithArray GetTestMember() const