Menu
Lumberyard
C++ API Reference (Version 1.10)

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

Enqueues asynchronous events to dispatch to handlers that are connected to a specific address on an EBus. More...

Inherits AZ::BusInternal::EBusBroadcastQueue< Bus, Traits >.

Public Types

using BusIdType
 The type of ID that is used to address the EBus. More...
 
using BusPtr
 Pointer to an address on the bus. More...
 
- Public Types inherited from AZ::BusInternal::EBusBroadcastQueue< Bus, Traits >
using BusPtr
 Pointer to an address on the bus. More...
 

Static Public Member Functions

template<class Function , class ... InputArgs>
static void QueueEvent (const BusIdType &id, Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to handlers at a specific address. More...
 
template<class Function , class ... InputArgs>
static void QueueEvent (const BusPtr &ptr, Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to handlers at a cached address. More...
 
template<class Function , class ... InputArgs>
static void QueueEventReverse (const BusIdType &id, Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to handlers at a specific address in reverse order. More...
 
template<class Function , class ... InputArgs>
static void QueueEventReverse (const BusPtr &ptr, Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to handlers at a cached address in reverse order. More...
 
- Static Public Member Functions inherited from AZ::BusInternal::EBusBroadcastQueue< Bus, Traits >
static void ExecuteQueuedEvents ()
 Executes queued events and functions. More...
 
static void ClearQueuedEvents ()
 Clears the queue without calling events or functions. More...
 
static void AllowFunctionQueuing (bool isAllowed)
 Sets whether function queuing is allowed. More...
 
static bool IsFunctionQueuing ()
 Returns whether function queuing is allowed. More...
 
template<class Function , class ... InputArgs>
static void QueueBroadcast (Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to all handlers. More...
 
template<class Function , class ... InputArgs>
static void QueueBroadcastReverse (Function func, InputArgs &&... args)
 Enqueues an asynchronous event to dispatch to all handlers in reverse order. More...
 
template<class Function , class ... InputArgs>
static void QueueFunction (Function func, InputArgs &&... args)
 Enqueues an arbitrary callable function to be executed asynchronously. More...
 

Detailed Description

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

Enqueues asynchronous events to dispatch to handlers that are connected to a specific address on an EBus.

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 Typedef Documentation

◆ BusIdType

template<class Bus , class Traits >
using AZ::BusInternal::EBusEventQueue< Bus, Traits >::BusIdType = typename Traits::BusIdType

The type of ID that is used to address the EBus.

Used only when the address policy is AZ::EBusAddressPolicy::ById or AZ::EBusAddressPolicy::ByIdAndOrdered. The type must support AZStd::hash<ID> and bool operator==(const ID&, const ID&).

◆ BusPtr

template<class Bus , class Traits >
using AZ::BusInternal::EBusEventQueue< Bus, Traits >::BusPtr = typename Traits::BusPtr

Pointer to an address on the bus.

Member Function Documentation

◆ QueueEvent() [1/2]

template<class Bus , class Traits >
template<class Function , class ... InputArgs>
void AZ::BusInternal::EBusEventQueue< Bus, Traits >::QueueEvent ( const BusIdType id,
Function  func,
InputArgs &&...  args 
)
inlinestatic

Enqueues an asynchronous event to dispatch to handlers at a specific address.

The event is not executed until ExecuteQueuedEvents() is called.

Parameters
idAddress ID. Handlers that are connected to this ID will receive the event.
funcFunction pointer of the event to dispatch.
argsFunction arguments that are passed to each handler.

◆ QueueEvent() [2/2]

template<class Bus , class Traits >
template<class Function , class ... InputArgs>
void AZ::BusInternal::EBusEventQueue< Bus, Traits >::QueueEvent ( const BusPtr ptr,
Function  func,
InputArgs &&...  args 
)
inlinestatic

Enqueues an asynchronous event to dispatch to handlers at a cached address.

The event is not executed until ExecuteQueuedEvents() is called.

Parameters
ptrCached address ID. Handlers that are connected to this ID will receive the event.
funcFunction pointer of the event to dispatch.
argsFunction arguments that are passed to each handler.

◆ QueueEventReverse() [1/2]

template<class Bus , class Traits >
template<class Function , class ... InputArgs>
void AZ::BusInternal::EBusEventQueue< Bus, Traits >::QueueEventReverse ( const BusIdType id,
Function  func,
InputArgs &&...  args 
)
inlinestatic

Enqueues an asynchronous event to dispatch to handlers at a specific address in reverse order.

The event is not executed until ExecuteQueuedEvents() is called.

Parameters
idAddress ID. Handlers that are connected to this ID will receive the event.
funcFunction pointer of the event to dispatch.
argsFunction arguments that are passed to each handler.

◆ QueueEventReverse() [2/2]

template<class Bus , class Traits >
template<class Function , class ... InputArgs>
void AZ::BusInternal::EBusEventQueue< Bus, Traits >::QueueEventReverse ( const BusPtr ptr,
Function  func,
InputArgs &&...  args 
)
inlinestatic

Enqueues an asynchronous event to dispatch to handlers at a cached address in reverse order.

The event is not executed until ExecuteQueuedEvents() is called.

Parameters
ptrCached address ID. Handlers that are connected to this ID will receive the event.
funcFunction pointer of the event to dispatch.
argsFunction arguments that are passed to each handler.

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