class

Delegate

Module
Core
Header
#include "Core/Delegate.h"
Namespace
Mowo
Template
template<typename Ret, typename... Args>

Type aliases

AliasDescription
using ReturnType = Ret
using StubType = Ret (*)(void*, Args...)

Constructors

SignatureNameDescription
Delegate() = defaultDelegate
explicit Delegate(Ret (*func)(Args...))Delegate
template<typename T> Delegate(Ret (T::*method)(Args...), T* instance)Delegate
template<typename T> Delegate(Ret (T::*method)(Args...) const, const T* instance…Delegate
template<typename Functor, typename = std::enable_if_t<!std::is_same_v<std::deca…Delegate
Delegate(const Delegate& other)Delegate
Delegate(Delegate&& other) noexceptDelegate
~Delegate()~Delegate

Public functions

ReturnsNameDescription
Delegate&operator=
Delegate&operator=
voidBind
voidBind
voidBind
voidBind
voidClear
boolIsBound
operatorbool
RetExecute
Retoperator()
RetExecuteIfBoundReturns a value-initialised Ret when unbound.
booloperator==Stub + payload bytes: two delegates on the same member function of two DIFFERENT objects share a stub, so comparing stubs alone made MulticastDelegate::Remove drop the wrong listener.
booloperator!=
DelegateCreateStatic
DelegateCreateMember
DelegateCreateMember
DelegateCreateLambda

Function details

Delegate

C++
Delegate() = default

Delegate

C++
explicit Delegate(Ret (*func)(Args...))

Delegate

C++
template<typename T> Delegate(Ret (T::*method)(Args...), T* instance)

Delegate

C++
template<typename T> Delegate(Ret (T::*method)(Args...) const, const T* instance)

Delegate

C++
template<typename Functor, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Functor>, Delegate>>> Delegate(Functor&& functor)

Delegate

C++
Delegate(const Delegate& other)

Delegate

C++
Delegate(Delegate&& other) noexcept

~Delegate

C++
~Delegate()

operator=

C++
Delegate& operator=(const Delegate& other)

operator=

C++
Delegate& operator=(Delegate&& other) noexcept

Bind

C++
void Bind(Ret (*func)(Args...))

Bind

C++
template<typename T> void Bind(Ret (T::*method)(Args...), T* instance)

Bind

C++
template<typename T> void Bind(Ret (T::*method)(Args...) const, const T* instance)

Bind

C++
template<typename Functor> void Bind(Functor&& functor)

Clear

C++
void Clear()

IsBound

C++
bool IsBound() const

operatorbool

C++
explicit operator bool() const

Execute

C++
Ret Execute(Args... args) const

operator()

C++
Ret operator()(Args... args) const

ExecuteIfBound

C++
Ret ExecuteIfBound(Args... args) const

Returns a value-initialised Ret when unbound.

operator==

C++
bool operator==(const Delegate& other) const

Stub + payload bytes: two delegates on the same member function of two DIFFERENT objects share a stub, so comparing stubs alone made MulticastDelegate::Remove drop the wrong listener.

operator!=

C++
bool operator!=(const Delegate& other) const

CreateStatic

C++
static Delegate CreateStatic(Ret (*func)(Args...))

CreateMember

C++
template<typename T> static Delegate CreateMember(Ret (T::*method)(Args...), T* instance)

CreateMember

C++
template<typename T> static Delegate CreateMember(Ret (T::*method)(Args...) const, const T* instance)

CreateLambda

C++
template<typename Functor> static Delegate CreateLambda(Functor&& functor)
Generated from Core/Delegate.h via core.json · Nov 5, 2026Version 1.0.0