LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::Core::LMulticastDelegate< TArgs > Class Template Reference

#include <Delegate.h>

Inheritance diagram for LkEngine::Core::LMulticastDelegate< TArgs >:
LkEngine::Core::LDelegateBase

Public Types

using TDelegate = LDelegate<"MulticastComponent", void, TArgs...>
 

Public Member Functions

 LMulticastDelegate (const LMulticastDelegate &Other)=default
 
 LMulticastDelegate (LMulticastDelegate &&Other) noexcept
 
LMulticastDelegateoperator= (const LMulticastDelegate &Other)=default
 
LMulticastDelegateoperator= (LMulticastDelegate &&Other) noexcept
 
FORCEINLINE void Broadcast (TArgs... Args)
 
FORCEINLINE bool Remove (FDelegateHandle &Handle)
 
FORCEINLINE void RemoveAll ()
 
FORCEINLINE size_t GetSize () const
 
FORCEINLINE std::string_view GetName () const
 
FORCEINLINE std::string ToString () const
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (T *ObjectRef, NonConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (T *ObjectRef, ConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename LambdaType , typename... TArgs2>
FDelegateHandle Add (LambdaType &&InLambda, TArgs2 &&... LambdaArgs)
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (std::shared_ptr< T > ObjectRef, NonConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (std::shared_ptr< T > ObjectRef, ConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (TObjectPtr< T > ObjectRef, NonConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename T , typename... TArgs2>
FDelegateHandle Add (TObjectPtr< T > ObjectRef, ConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename... TArgs2>
FDelegateHandle Add (void(*InFunction)(TArgs..., TArgs2...), TArgs2 &&... Args)
 
- Public Member Functions inherited from LkEngine::Core::LDelegateBase
 LDelegateBase (const LDelegateBase &Other)
 
 LDelegateBase (LDelegateBase &&Other) noexcept
 
FORCEINLINE bool IsBound () const
 Check if the delegate is bound.
 

Additional Inherited Members

- Protected Member Functions inherited from LkEngine::Core::LDelegateBase
LDelegateBaseoperator= (const LDelegateBase &Other)
 
LDelegateBaseoperator= (LDelegateBase &&Other) noexcept
 
FORCEINLINE const void * GetOwner () const
 
FORCEINLINE size_t GetSize () const
 
FORCEINLINE void ClearIfBoundTo (void *InObject)
 
FORCEINLINE void Clear ()
 
FORCEINLINE bool IsBoundTo (void *InObject) const
 
FORCEINLINE void Release ()
 
IDelegateBaseGetDelegate () const
 
- Protected Attributes inherited from LkEngine::Core::LDelegateBase
LInlineAllocator< DelegateCore::INLINE_ALLOCATION_SIZE > Allocator
 

Detailed Description

template<typename... TArgs>
class LkEngine::Core::LMulticastDelegate< TArgs >

LMulticastDelegate

Supports most function types.

Member Function Documentation

◆ Add() [1/8]

template<typename... TArgs>
template<typename LambdaType , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( LambdaType && InLambda,
TArgs2 &&... LambdaArgs )
inline

Lambda.

◆ Add() [2/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( std::shared_ptr< T > ObjectRef,
ConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

Shared Pointer, const function.

◆ Add() [3/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( std::shared_ptr< T > ObjectRef,
NonConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

Shared Pointer, non-const function.

◆ Add() [4/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( T * ObjectRef,
ConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

Raw Pointer, const function.

◆ Add() [5/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( T * ObjectRef,
NonConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

Raw Pointer, non-const function.

◆ Add() [6/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( TObjectPtr< T > ObjectRef,
ConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

TObjectPtr, const function.

◆ Add() [7/8]

template<typename... TArgs>
template<typename T , typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( TObjectPtr< T > ObjectRef,
NonConstMemberFunction< T, TArgs2... > InFunction,
TArgs2 &&... Args )
inline

TObjectPtr, non-const function.

◆ Add() [8/8]

template<typename... TArgs>
template<typename... TArgs2>
FDelegateHandle LkEngine::Core::LMulticastDelegate< TArgs >::Add ( void(* InFunction )(TArgs..., TArgs2...),
TArgs2 &&... Args )
inline

Static Function.

◆ Broadcast()

template<typename... TArgs>
FORCEINLINE void LkEngine::Core::LMulticastDelegate< TArgs >::Broadcast ( TArgs... Args)
inline

Broadcast

Invoke all bound callbacks.

◆ GetSize()

template<typename... TArgs>
FORCEINLINE size_t LkEngine::Core::LMulticastDelegate< TArgs >::GetSize ( ) const
inline

GetSize

Return the count of bound callbacks.

◆ Remove()

template<typename... TArgs>
FORCEINLINE bool LkEngine::Core::LMulticastDelegate< TArgs >::Remove ( FDelegateHandle & Handle)
inline

Remove

Remove a bound delegate.

◆ RemoveAll()

template<typename... TArgs>
FORCEINLINE void LkEngine::Core::LMulticastDelegate< TArgs >::RemoveAll ( )
inline

RemoveAll

Clear all bound callbacks.


The documentation for this class was generated from the following file: