Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::BusInternal::EBusBroadcastEnumerator< Bus, Traits > Struct Template Reference

Provides functionality that requires enumerating over all handlers that are connected to an EBus. More...

Inherited by AZ::BusInternal::EBusImpl< Bus, Traits, NullBusId >.

Static Public Member Functions

template<class Callback >
static void EnumerateHandlers (Callback callback)
 Calls a user-defined function on all handlers that are connected to the EBus. More...
 
static Traits::InterfaceType * FindFirstHandler ()
 Finds the first handler that is connected to the EBus. More...
 

Detailed Description

template<class Bus, class Traits>
struct AZ::BusInternal::EBusBroadcastEnumerator< Bus, Traits >

Provides functionality that requires enumerating over all handlers that are connected to an EBus.

To enumerate over handlers that are connected to a specific address on the EBus, use a function from EBusEventEnumerator.

Template Parameters
BusThe EBus type.
TraitsA class that inherits from EBusTraits and configures the EBus. This parameter may be left unspecified if the Interface class inherits from EBusTraits.

Member Function Documentation

◆ EnumerateHandlers()

template<class Bus , class Traits >
template<class Callback >
void AZ::BusInternal::EBusBroadcastEnumerator< Bus, Traits >::EnumerateHandlers ( Callback  callback)
static

Calls a user-defined function on all handlers that are connected to the EBus.

The function signature must be bool callback(InterfaceType* handler). The function must return true to continue enumerating handlers, or return false to stop.

Parameters
callbackFunction to call.

◆ FindFirstHandler()

template<class Bus , class Traits >
Traits::InterfaceType * AZ::BusInternal::EBusBroadcastEnumerator< Bus, Traits >::FindFirstHandler ( )
static

Finds the first handler that is connected to the EBus.

This function is only for special cases where you know that a particular component's handler is guaranteed to exist. Even if the returned pointer is valid (not null), it might point to a handler that was deleted. Prefer dispatching events using EBusEventer.

Returns
A pointer to the first handler on the EBus, even if the handler was deleted.

The documentation for this struct was generated from the following file:
  • C:/lumberyard-root/dev/Code/Framework/AzCore/AzCore/EBus/BusImpl.h