LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::Core::LDelegate< DelegateName, TReturnValue, TArgs > Class Template Reference

#include <Delegate.h>

Inheritance diagram for LkEngine::Core::LDelegate< DelegateName, TReturnValue, TArgs >:
LkEngine::Core::LDelegateBase

Public Member Functions

FORCEINLINE TReturnValue Execute (TArgs... Args) const
 
FORCEINLINE TReturnValue ExecuteIfBound (TArgs... Args) const
 
template<typename T , typename... TArgs2>
void Bind (T *ObjectRef, NonConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename T , typename... TArgs2>
void Bind (T *ObjectRef, ConstMemberFunction< T, TArgs2... > InFunction, TArgs2 &&... Args)
 
template<typename... TArgs2>
void Bind (TReturnValue(*InFunction)(TArgs..., TArgs2...), TArgs2 &&... Args)
 
template<typename LambdaType , typename... Args2>
void Bind (LambdaType &&InLambda, Args2 &&... args)
 
template<typename T , typename... Args2>
void Bind (std::shared_ptr< T > ObjectRef, NonConstMemberFunction< T, Args2... > InFunction, Args2 &&... args)
 
template<typename T , typename... Args2>
void Bind (std::shared_ptr< T > ObjectRef, ConstMemberFunction< T, Args2... > InFunction, Args2 &&... 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.
 

Friends

class LMulticastDelegate
 

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<TStringLiteral DelegateName, typename TReturnValue, typename... TArgs>
class LkEngine::Core::LDelegate< DelegateName, TReturnValue, TArgs >

LDelegate

Supports binding to all types of functions.

Member Function Documentation

◆ Execute()

template<TStringLiteral DelegateName, typename TReturnValue , typename... TArgs>
FORCEINLINE TReturnValue LkEngine::Core::LDelegate< DelegateName, TReturnValue, TArgs >::Execute ( TArgs... Args) const
inlinenodiscard

Execute

Direct execution of the delegate, will cause crash if not properly bound.

◆ ExecuteIfBound()

template<TStringLiteral DelegateName, typename TReturnValue , typename... TArgs>
FORCEINLINE TReturnValue LkEngine::Core::LDelegate< DelegateName, TReturnValue, TArgs >::ExecuteIfBound ( TArgs... Args) const
inlinenodiscard

ExecuteIfBound

Attempt to execute the delegate if it bound, otherwise ignore. A safe way to execute.

Friends And Related Symbol Documentation

◆ LMulticastDelegate

template<TStringLiteral DelegateName, typename TReturnValue , typename... TArgs>
friend class LMulticastDelegate
friend

Allow access to the Create<TFunction> functions.


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