Open 3D Engine AzCore API Reference  22.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Namespaces | Macros
EBus.h File Reference
#include <AzCore/EBus/BusImpl.h>
#include <AzCore/EBus/Environment.h>
#include <AzCore/EBus/Results.h>
#include <AzCore/EBus/Internal/Debug.h>
#include <AzCore/std/typetraits/typetraits.h>
#include <AzCore/std/smart_ptr/unique_ptr.h>
#include <AzCore/std/containers/unordered_set.h>
#include <AzCore/std/typetraits/is_same.h>
#include <AzCore/std/utils.h>
#include <AzCore/std/parallel/scoped_lock.h>
#include <AzCore/std/parallel/shared_mutex.h>

Classes

struct  AZ::EBusTraits
 
class  AZ::EBus< Interface, BusTraits >
 

Namespaces

 AZStd
 AZ namespace needs to be closed in order to specialize the AZStd::hash struct for AddressTypeElement and AddressType.
 
 AZ
 Reopen namespace to define DataPatch class.
 

Macros

#define DEPRECATE_EBUS(_Interface, _BusName, _message)   DEPRECATE_EBUS_WITH_TRAITS(_Interface, _Interface, _BusName, _message)
 
#define DEPRECATE_EBUS_WITH_TRAITS(_Interface, _BusTraits, _BusName, _message)
 
#define EBUS_EVENT_PTR(_BusPtr, _EBUS, ...)   _EBUS::Event(_BusPtr, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a cached address.
 
#define EBUS_EVENT_PTR_RESULT(_Result, _BusPtr, _EBUS, ...)   _EBUS::EventResult(_Result, _BusPtr, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a cached address and receives results.
 
#define EBUS_EVENT_ID(_BusId, _EBUS, ...)   _EBUS::Event(_BusId, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a specific address.
 
#define EBUS_EVENT_ID_RESULT(_Result, _BusId, _EBUS, ...)   _EBUS::EventResult(_Result, _BusId, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a specific address and receives results.
 
#define EBUS_EVENT(_EBUS, ...)   _EBUS::Broadcast(&_EBUS::Events::__VA_ARGS__)
 Dispatches an event to all handlers.
 
#define EBUS_EVENT_RESULT(_Result, _EBUS, ...)   _EBUS::BroadcastResult(_Result, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to all handlers and receives results.
 
#define EBUS_EVENT_PTR_REVERSE(_BusPtr, _EBUS, ...)   _EBUS::EventReverse(_BusPtr, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a cached address in reverse order.
 
#define EBUS_EVENT_PTR_RESULT_REVERSE(_Result, _BusPtr, _EBUS, ...)   _EBUS::EventResultReverse(_Result, _BusPtr, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a cached address in reverse order and receives results.
 
#define EBUS_EVENT_ID_REVERSE(_BusId, _EBUS, ...)   _EBUS::EventReverse(_BusId, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a specific address in reverse order.
 
#define EBUS_EVENT_ID_RESULT_REVERSE(_Result, _BusId, _EBUS, ...)   _EBUS::EventReverse(_Result, _BusId, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to handlers at a specific address in reverse order and receives results.
 
#define EBUS_EVENT_REVERSE(_EBUS, ...)   _EBUS::BroadcastReverse(&_EBUS::Events::__VA_ARGS__)
 Dispatches an event to all handlers in reverse order.
 
#define EBUS_EVENT_RESULT_REVERSE(_Result, _EBUS, ...)   _EBUS::BroadcastResultReverse(_Result, &_EBUS::Events::__VA_ARGS__)
 Dispatches an event to all handlers in reverse order and receives results.
 
#define EBUS_QUEUE_EVENT(_EBUS, ...)   _EBUS::QueueBroadcast(&_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to all handlers.
 
#define EBUS_QUEUE_EVENT_PTR(_BusPtr, _EBUS, ...)   _EBUS::QueueEvent(_BusPtr, &_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to handlers at a cached address.
 
#define EBUS_QUEUE_EVENT_ID(_BusId, _EBUS, ...)   _EBUS::QueueEvent(_BusId, &_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to handlers at a specific address.
 
#define EBUS_QUEUE_EVENT_REVERSE(_EBUS, ...)   _EBUS::QueueBroadcastReverse(&_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to all handlers in reverse order.
 
#define EBUS_QUEUE_EVENT_PTR_REVERSE(_BusPtr, _EBUS, ...)   _EBUS::QueueEventReverse(_BusPtr, &_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to handlers at a cached address in reverse order.
 
#define EBUS_QUEUE_EVENT_ID_REVERSE(_BusId, _EBUS, ...)   _EBUS::QueueEventReverse(_BusId, &_EBUS::Events::__VA_ARGS__)
 Enqueues an asynchronous event to dispatch to handlers at a specific address in reverse order.
 
#define EBUS_QUEUE_FUNCTION(_EBUS, ...)   _EBUS::QueueFunction(__VA_ARGS__)
 Enqueues an arbitrary callable function to be executed asynchronously.
 
#define EBUS_DBG_EVENT_PTR(_BusPtr, _EBUS, ...)
 Dispatches an event to handlers at a cached address.
 
#define EBUS_DBG_EVENT_PTR_RESULT(_Result, _BusPtr, _EBUS, ...)
 Dispatches an event to handlers at a cached address and receives results.
 
#define EBUS_DBG_EVENT_ID(_BusId, _EBUS, ...)
 Dispatches an event to handlers at a specific address.
 
#define EBUS_DBG_EVENT_ID_RESULT(_Result, _BusId, _EBUS, ...)
 Dispatches an event to handlers at a specific address and receives results.
 
#define EBUS_DBG_EVENT(_EBUS, ...)
 Dispatches an event to all handlers.
 
#define EBUS_DBG_EVENT_RESULT(_Result, _EBUS, ...)
 Dispatches an event to all handlers and receives results.
 
#define EBUS_DBG_EVENT_PTR_REVERSE(_BusPtr, _EBUS, ...)
 Dispatches an event to handlers at a cached address in reverse order.
 
#define EBUS_DBG_EVENT_PTR_RESULT_REVERSE(_Result, _BusPtr, _EBUS, ...)
 Dispatches an event to handlers at a cached address in reverse order and receives results.
 
#define EBUS_DBG_EVENT_ID_REVERSE(_BusId, _EBUS, ...)
 Dispatches an event to handlers at a specific address in reverse order.
 
#define EBUS_DBG_EVENT_ID_RESULT_REVERSE(_Result, _BusId, _EBUS, ...)
 Dispatches an event to handlers at a specific address in reverse order and receives results.
 
#define EBUS_DBG_EVENT_REVERSE(_EBUS, ...)
 Dispatches an event to all handlers in reverse order.
 
#define EBUS_DBG_EVENT_RESULT_REVERSE(_Result, _EBUS, ...)
 Dispatches an event to all handlers in reverse order and receives results.
 
#define EBUS_DBG_QUEUE_EVENT(_EBUS, ...)
 Enqueues an asynchronous event to dispatch to all handlers.
 
#define EBUS_DBG_QUEUE_EVENT_PTR(_BusPtr, _EBUS, ...)
 Enqueues an asynchronous event to dispatch to handlers at a cached address.
 
#define EBUS_DBG_QUEUE_EVENT_ID(_BusId, _EBUS, ...)
 Enqueues an asynchronous event to dispatch to handlers at a specific address.
 
#define EBUS_DBG_QUEUE_EVENT_REVERSE(_EBUS, ...)
 Enqueues an asynchronous event to dispatch to all handlers in reverse order.
 
#define EBUS_DBG_QUEUE_EVENT_PTR_REVERSE(_BusPtr, _EBUS, ...)
 Enqueues an asynchronous event to dispatch to handlers at a cached address in reverse order.
 
#define EBUS_DBG_QUEUE_EVENT_ID_REVERSE(_BusId, _EBUS, ...)
 Enqueues an asynchronous event to dispatch to handlers at a specific address in reverse order.
 
#define EBUS_DBG_QUEUE_FUNCTION(_EBUS, ...)
 Enqueues an arbitrary callable function to be executed asynchronously.
 

Detailed Description

Header file for event bus (EBus), a general-purpose communication system that Open 3D Engine uses to dispatch notifications and receive requests. EBuses are configurable and support many different use cases. For more information about EBuses, see AZ::EBus in this guide and Event Bus in the Open 3D Engine Developer Guide.

Macro Definition Documentation

◆ DEPRECATE_EBUS

#define DEPRECATE_EBUS (   _Interface,
  _BusName,
  _message 
)    DEPRECATE_EBUS_WITH_TRAITS(_Interface, _Interface, _BusName, _message)

Helper macro to deprecate the helper typedef EBus<_Interface> _BusName Where _Interface is a deprecated EBus API class

◆ DEPRECATE_EBUS_WITH_TRAITS

#define DEPRECATE_EBUS_WITH_TRAITS (   _Interface,
  _BusTraits,
  _BusName,
  _message 
)
Value:
AZ_PUSH_DISABLE_WARNING(4996, "-Wdeprecated-declarations") \
typedef AZ::EBus<_Interface, _BusTraits> DeprecatedBus_##_Interface##_BusTraits; \
AZ_POP_DISABLE_WARNING \
AZ_DEPRECATED(typedef DeprecatedBus_##_Interface##_BusTraits _BusName, _message);

Helper macro to deprecate the helper typedef EBus<_Interface, _BusTraits> _BusName Where _Interface is a deprecated EBus API class and/or _BusTraits is a deprecated EBusTraits class

AZ::EBus
Definition: EBus.h:403