Navigation
API > API/Plugins > API/Plugins/AsyncMessageSystem
Base abstract implementation of an async message system which can be used to easily pass signals and messages across different threads in Unreal.
| Name | FAsyncMessageSystemBase |
| Type | class |
| Header File | /Engine/Plugins/Experimental/AsyncMessageSystem/Source/AsyncMessageSystem/Public/AsyncMessageSystemBase.h |
| Include Path | #include "AsyncMessageSystemBase.h" |
Syntax
class FAsyncMessageSystemBase : public TSharedFromThis< FAsyncMessageSystemBase >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FAsyncMessageSystemBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAsyncMessageSystemBase
(
const FAsyncMessageSystemBase& |
AsyncMessageSystemBase.h | ||
| AsyncMessageSystemBase.h | |||
| We have a protected constructor on the message system because you should always use the "CreateMessageSystem" function above to make one. | AsyncMessageSystemBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FAsyncMessageSystemBase() |
AsyncMessageSystemBase.h |
Structs
| Name | Remarks |
|---|---|
| FPendingBoundListener | Stores data about a listener which has been bound but cannot be added at the time of which FAsyncMessageSystemBase::BindListener_Impl would be called, and needs to be deferred. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FMessageCallbackFunc | TFunction< void(const FAsyncMessage &)> | AsyncMessageSystemBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
UObject* InReferencer, |
AsyncMessageSystemBase.h | ||
FAsyncMessageHandle BindListener
(
const FAsyncMessageId MessageId, |
Binds the given callback to this message so that when an message of type MessageId is broadcast, it will be executed. | AsyncMessageSystemBase.h | |
FAsyncMessageHandle BindListener
(
const FAsyncMessageId MessageId, |
Binds the given callback to this message so that when an message of type MessageId is broadcast, it will be executed. | AsyncMessageSystemBase.h | |
FAsyncMessageHandle BindListener
(
const FAsyncMessageId MessageId, |
Binds the given callback to this message so that when an message of type MessageId is broadcast, it will be executed. | AsyncMessageSystemBase.h | |
void ProcessMessageQueueForBinding
(
const FAsyncMessageBindingOptions& Options |
Processes all async message on within the queue for the given binding options. | AsyncMessageSystemBase.h | |
bool QueueMessageForBroadcast
(
const FAsyncMessageId MessageId, |
Queues the given async message for broadcast the next time that this message system processes its message queue | AsyncMessageSystemBase.h | |
void Shutdown () |
Manual shutdown of this message system. | AsyncMessageSystemBase.h | |
void UnbindListener
(
const FAsyncMessageHandle& HandleToUnbind |
Unbinds the given listener from its message so that it will no longer receive callbacks when that message is broadcast. | AsyncMessageSystemBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool BindListener_Impl
(
const FAsyncMessageHandle& HandleToBindTo, |
Handles binding the message callback to the given async message handle. | AsyncMessageSystemBase.h | |
FAsyncMessageHandle GenerateNextValidMessageHandle
(
const FAsyncMessageId ForMessageId, |
Generates a new async message handle by atomically incrementing the NextMessageHandleId. | AsyncMessageSystemBase.h | |
void PostQueueMessage
(
const FAsyncMessageId MessageId, |
Called after an message was queued (from QueueMessageForBroadcast_Impl). | AsyncMessageSystemBase.h | |
virtual void PreProcessMessagesQueue
(
const FAsyncMessageBindingOptions& Options |
Allow an opportunity to pre-process any messages or bindings which may have occurred before the actual processing of the message queue | AsyncMessageSystemBase.h | |
void ProcessListenersPendingBinding () |
Iterate through the PendingBoundListenerQueue and bind the callback functions as necessary. | AsyncMessageSystemBase.h | |
virtual void ProcessMessageQueueForBinding_Impl
(
const FAsyncMessageBindingOptions& Options |
Actual implementation of how we process the message queue. | AsyncMessageSystemBase.h | |
void ProcessUnbindHandleRequests() |
Unbind any handles which have been flagged for removal in "UnbindListener" | AsyncMessageSystemBase.h | |
virtual bool QueueMessageForBroadcast_Impl
(
const FAsyncMessageId MessageId, |
Actually queues the message for broadcasting. | AsyncMessageSystemBase.h | |
void Shutdown_Impl() |
Allows you to clean up anything you may need to with which was created during startup. | AsyncMessageSystemBase.h | |
void Startup () |
Provides an opportunity for this message system to run any startup logic which it may need to. | AsyncMessageSystemBase.h | |
void Startup_Impl() |
Provides an opportunity to run any startup logic that subclasses of this Base message system may need, such as creating tick groups for specific binding options. | AsyncMessageSystemBase.h | |
virtual void UnbindListener_Impl
(
const FAsyncMessageHandle& HandleToUnbind |
Marks the given handle as ready to be unbound. | AsyncMessageSystemBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedPtr< TMessageSystemType, ESPMode::ThreadSafe > CreateMessageSystem
(
TArgs&&... Args |
Template Definitions. | AsyncMessageSystemBase.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAsyncMessageSystemBase & operator=
(
const FAsyncMessageSystemBase& |
AsyncMessageSystemBase.h | ||
| AsyncMessageSystemBase.h |