Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
FOperatingSystemDeviceMessengerSystem Class Reference

#include "OperatingSystemDeviceMessenger.h"

Inheritance diagram for FOperatingSystemDeviceMessengerSystem:
[legend]
Collaboration diagram for FOperatingSystemDeviceMessengerSystem:
[legend]

Public Member Functions

 ~FOperatingSystemDeviceMessengerSystem ()
 
void Broadcast (const FName &EventName, UObject *Payload)
 Broadcasts an event to all registered delegates or a specific event to its registered delegates.
 
void BeginListening (const FName &ListenToEventName, const FOperatingSystemDeviceMessageDelegate &Callback)
 Starts listening for a specific event with the given callback delegate.
 
void StopListening (const FName &EventName)
 Stops listening to a specific event.
 
FORCEINLINE void ClearAll ()
 Clears all mapped delegates in the messaging system.
 

Detailed Description

A class that provides messaging functionality for an operating system device.

This class is responsible for broadcasting and listening to events in the operating system device. It allows communication between different components of the device.

Constructor & Destructor Documentation

◆ ~FOperatingSystemDeviceMessengerSystem()

FOperatingSystemDeviceMessengerSystem::~FOperatingSystemDeviceMessengerSystem ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ BeginListening()

void FOperatingSystemDeviceMessengerSystem::BeginListening ( const FName & ListenToEventName,
const FOperatingSystemDeviceMessageDelegate & Callback )

Starts listening for a specific event with the given callback delegate.

This method adds the provided callback delegate to the list of delegates associated with the specified event name. When the event with the given name is broadcasted, the registered callback will be invoked.

Parameters
ListenToEventNameThe name of the event to start listening to.
CallbackThe callback delegate to be invoked when the specified event is broadcasted.

◆ Broadcast()

void FOperatingSystemDeviceMessengerSystem::Broadcast ( const FName & EventName,
UObject * Payload )

Broadcasts an event to all registered delegates or a specific event to its registered delegates.

This method is used to broadcast an event to all registered delegates or a specific event to its registered delegates. If the EventName parameter is empty, the method will broadcast the event to all registered delegates. If the EventName parameter is not empty, the method will broadcast the event only to the delegates registered for that specific event.

Parameters
EventNameThe name of the event to broadcast. If empty, the method will broadcast the event to all registered delegates.
PayloadThe payload object to pass to the delegates. This can be any UObject-derived class or nullptr.

◆ ClearAll()

FORCEINLINE void FOperatingSystemDeviceMessengerSystem::ClearAll ( )
inline

Clears all mapped delegates in the messaging system.

This method clears all the mapped delegates in the messaging system. It empties the map, compacts it, and then shrinks it to free up memory.

Here is the caller graph for this function:

◆ StopListening()

void FOperatingSystemDeviceMessengerSystem::StopListening ( const FName & EventName)

Stops listening to a specific event.

This method removes all delegates associated with the specified event name. If the EventName parameter is empty, all delegates for all events will be removed.

Parameters
EventNameThe name of the event to stop listening to. If empty, all events will be stopped.
Here is the call graph for this function:

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