template<typename R, typename... Args>
bpf::Delegate<R(Args...)> class

Template parameters
R the return type
Args the argument types

Represents a delegate function (non const mode)

Constructors, destructors, conversion operators

template<typename T>
Delegate(R(T::*)(Args...) func, memory::ObjectPtr<T>&& thisptr) noexcept
template<typename T>
Delegate(R(T::*)(Args...) func, const memory::ObjectPtr<T>& thisptr)
template<typename T>
Delegate(R(T::*)(Args...) func, T* thisptr)
Delegate() noexcept
operator bool() const noexcept

Public functions

auto operator()(Args && ... args) -> R

Function documentation

template<typename R, typename... Args> template<typename T>
bpf::Delegate<R(Args...)><R, Args>::Delegate(R(T::*)(Args...) func, memory::ObjectPtr<T>&& thisptr) noexcept

Template parameters
T the type of this
Parameters
func the function pointer
thisptr the pointer to this

Constructs a delegate from an ObjectPtr

template<typename R, typename... Args> template<typename T>
bpf::Delegate<R(Args...)><R, Args>::Delegate(R(T::*)(Args...) func, const memory::ObjectPtr<T>& thisptr)

Template parameters
T the type of this
Parameters
func the function pointer
thisptr the pointer to this

Constructs a delegate from an ObjectPtr

template<typename R, typename... Args> template<typename T>
bpf::Delegate<R(Args...)><R, Args>::Delegate(R(T::*)(Args...) func, T* thisptr)

Template parameters
T the type of this
Parameters
func the function pointer
thisptr the pointer to this

Constructs a delegate from a raw pointer

template<typename R, typename... Args>
bpf::Delegate<R(Args...)><R, Args>::Delegate() noexcept

Constructs a null delegate

template<typename R, typename... Args>
bpf::Delegate<R(Args...)><R, Args>::operator bool() const noexcept

Returns true if this delegate is safe to be called, false otherwise

Conversion operator used to check if the delegate is valid

template<typename R, typename... Args>
R bpf::Delegate<R(Args...)><R, Args>::operator()(Args && ... args)

Parameters
args the arguments to pass to the delegate
Returns the return value of the delegate
Exceptions
RuntimeException in case this delegate is null

Invokes the delegate function