Rebel Fork Framework
Urho3D::Detail::SignalBase< Priority, Sender, Args > Class Template Reference

Base signal type. More...

#include <Urho3D/Core/Signal.h>

Public Types

using Handler = ea::fixed_function<HandlerSize, bool(RefCounted*, Sender*, Args...)>
 Signal handler type.
using Subscription
 Subscription type.
using SubscriptionVector
 Subscription collection type.

Public Member Functions

void Unsubscribe (RefCounted *receiver)
 Unsubscribe all handlers of specified receiver from this signal.
template<typename... InvokeArgs>
void operator() (Sender *sender, InvokeArgs &&... args)
 Invoke signal.
bool HasSubscriptions () const
 Returns true when event has at least one subscription.

Static Public Attributes

static const unsigned HandlerSize = 4 * sizeof(void*)
 Small object optimization buffer size.
static constexpr bool HasPriority = !ea::is_same_v<Priority, void>
 Whether the signal is prioritized.

Protected Member Functions

void RemoveExpiredElements ()
template<class Receiver, class Callback>
Handler WrapHandler (Callback handler)
template<class Receiver, class Callback>
Handler WrapHandlerWithSender (Callback handler)

Protected Attributes

SubscriptionVector subscriptions_
 Vector of subscriptions. May contain expired elements.
bool invocationInProgress_ {}
 Whether the invocation is in progress. If true, cannot execute RemoveExpiredElements().

Detailed Description

template<class Priority, class Sender, class... Args>
class Urho3D::Detail::SignalBase< Priority, Sender, Args >

Base signal type.

Member Typedef Documentation

◆ Subscription

template<class Priority, class Sender, class... Args>
using Urho3D::Detail::SignalBase< Priority, Sender, Args >::Subscription
Initial value:
ea::conditional_t<HasPriority,
static constexpr bool HasPriority
Whether the signal is prioritized.
Definition Signal.h:79
Signal subscription data with priority.
Definition Signal.h:46
Signal subscription data without priority.
Definition Signal.h:26

Subscription type.

◆ SubscriptionVector

template<class Priority, class Sender, class... Args>
using Urho3D::Detail::SignalBase< Priority, Sender, Args >::SubscriptionVector
Initial value:
ea::conditional_t<HasPriority,
ea::vector_multiset<Subscription>,
ea::vector<Subscription>>

Subscription collection type.


The documentation for this class was generated from the following file:
  • Urho3D/Core/Signal.h