class
Delegate
- Module
- Core
- Header
#include "Core/Delegate.h"- Namespace
Mowo- Template
template<typename Ret, typename... Args>
Type aliases
| Alias | Description |
|---|---|
using ReturnType = Ret | |
using StubType = Ret (*)(void*, Args...) |
Constructors
| Signature | Name | Description |
|---|---|---|
Delegate() = default | Delegate | |
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) noexcept | Delegate | |
~Delegate() | ~Delegate |
Public functions
| Returns | Name | Description |
|---|---|---|
Delegate& | operator= | |
Delegate& | operator= | |
void | Bind | |
void | Bind | |
void | Bind | |
void | Bind | |
void | Clear | |
bool | IsBound | |
operatorbool | ||
Ret | Execute | |
Ret | operator() | |
Ret | ExecuteIfBound | Returns a value-initialised Ret when unbound. |
bool | operator== | 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. |
bool | operator!= | |
Delegate | CreateStatic | |
Delegate | CreateMember | |
Delegate | CreateMember | |
Delegate | CreateLambda |
Function details
Delegate
C++
Delegate() = defaultDelegate
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) noexceptBind
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() constoperatorbool
C++
explicit operator bool() constExecute
C++
Ret Execute(Args... args) constoperator()
C++
Ret operator()(Args... args) constExecuteIfBound
C++
Ret ExecuteIfBound(Args... args) constReturns a value-initialised Ret when unbound.
operator==
C++
bool operator==(const Delegate& other) constStub + 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) constCreateStatic
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