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 = ea::conditional_t< HasPriority, PrioritySignalSubscription< Handler, Priority >, SignalSubscription< Handler > >
 Subscription type.
 
using SubscriptionVector = ea::conditional_t< HasPriority, ea::vector_multiset< Subscription >, ea::vector< Subscription > >
 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.


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