Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::EventHandler< Params > Class Template Reference

A handler class that can connect to an Event. More...

#include <Event.h>

Public Types

using Callback = AZStd::function< void(Params...)>
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (EventHandler< Params... >, AZ::SystemAllocator)
 
 EventHandler (std::nullptr_t)
 
 EventHandler (Callback callback)
 
 EventHandler (const EventHandler &rhs)
 
 EventHandler (EventHandler &&rhs)
 
EventHandleroperator= (const EventHandler &rhs)
 
EventHandleroperator= (EventHandler &&rhs)
 
void Connect (Event< Params... > &event)
 
void Disconnect ()
 Disconnects the handler from its connected event, does nothing if the event is not connected.
 
bool IsConnected () const
 

Friends

class Event< Params... >
 

Detailed Description

template<typename... Params>
class AZ::EventHandler< Params >

A handler class that can connect to an Event.

Member Function Documentation

◆ Connect()

template<typename... Params>
void AZ::EventHandler< Params >::Connect ( Event< Params... > &  event)

Connects the handler to the provided event.

Parameters
eventthe Event to connect to

◆ IsConnected()

template<typename... Params>
bool AZ::EventHandler< Params >::IsConnected

Returns true if this handler is connected to an event.

Returns
boolean true if this handler is connected to an event

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