![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MessageRouter.h>
Inheritance diagram for FMessageRouter:Protected Member Functions | |
| FTimespan | CalculateWaitTime () |
| FORCEINLINE bool | EnqueueCommand (CommandDelegate Command) |
| void | FilterSubscriptions (TArray< TSharedPtr< IMessageSubscription, ESPMode::ThreadSafe > > &Subscriptions, const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context, TArray< TSharedPtr< IMessageReceiver, ESPMode::ThreadSafe > > &OutRecipients) |
| void | FilterRecipients (const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context, TArray< TSharedPtr< IMessageReceiver, ESPMode::ThreadSafe > > &OutRecipients) |
| void | DispatchMessage (const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Message) |
| void | ProcessCommands () |
| void | ProcessDelayedMessages () |
| virtual void | Tick () override |
Implements a topic-based message router.
| FMessageRouter::FMessageRouter | ( | ) |
Default constructor.
| FMessageRouter::~FMessageRouter | ( | ) |
Destructor.
|
inline |
Adds a message interceptor.
| Interceptor | The interceptor to add. |
| MessageType | The type of messages to intercept. |
|
inline |
Add a listener to the bus registration events
| Listener | The listener to as to the registration notifications |
|
inline |
Adds a recipient.
| Address | The address of the recipient to add. |
| Recipient | The recipient. |
|
inline |
Adds a subscription.
| Subscription | The subscription to add. |
|
protected |
Calculates the time that the thread will wait for new work.
|
protected |
Dispatches a single message to its recipients.
| Message | The message to dispatch. |
|
inlineprotected |
Queues up a router command.
| Command | The command to queue up. |
|
protected |
Filters recipients from the given message context to gather actual recipients.
| Context | The message context to filter by. |
| OutRecipients | Will hold the collection of recipients. |
|
protected |
Filters a collection of subscriptions using the given message context.
| Subscriptions | The subscriptions to filter. |
| Context | The message context to filter by. |
| OutRecipients | Will hold the collection of recipients. |
|
overridevirtual |
Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. If the interface is not implemented, this runnable will not be ticked when FPlatformProcess::SupportsMultithreading() is false.
Reimplemented from FRunnable.
|
inline |
Gets the message tracer.
|
protected |
Process all queued commands.
|
protected |
Processes all delayed messages.
|
inline |
Removes a message interceptor.
| Interceptor | The interceptor to remove. |
| MessageType | The type of messages to stop intercepting. |
|
inline |
Remove a listener to the bus registration events
| Listener | The listener to remove from the registration notifications |
|
inline |
Removes a recipient.
| Address | The address of the recipient to remove. |
|
inline |
Removes a subscription.
| Subscriber | The subscriber to stop routing messages to. |
| MessageType | The type of message to unsubscribe from (NAME_None = all types). |
|
inline |
Routes a message to the specified recipients.
| Context | The context of the message to route. |
|
overridevirtual |
|
overrideprotectedvirtual |
Implements FSingleThreadRunnable.