Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::EntityEvents Class Reference

Interface for the AZ::EntityBus, which is the EBus for notification events dispatched by a specific entity. More...

Inherits AZ::ComponentBus.

Public Types

using ConnectionPolicy
 With this connection policy, an AZ::EntityEvents::OnEntityActivated event is immediately dispatched if the entity is active when a handler connects to the bus. More...
 
- Public Types inherited from AZ::ComponentBus
typedef  BusIdType
 Overrides the default AZ::EBusTraits ID type so that entity IDs are used to access the addresses of the bus. More...
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType
 Allocator used by the EBus. More...
 
using BusIdType
 The type of ID that is used to address the EBus. More...
 
using BusIdOrderCompare
 Sorting function for EBus address IDs. More...
 
using BusHandlerOrderCompare
 Sorting function for EBus event handlers. More...
 
using MutexType
 Locking primitive that is used when connecting handlers to the EBus or executing events. More...
 
using EventQueueMutexType
 Locking primitive that is used when adding and removing events from the queue. More...
 
using ConnectionPolicy
 Enables custom logic to run when a handler connects or disconnects from the EBus. More...
 
using StoragePolicy
 Specifies where EBus data is stored. More...
 
using RouterPolicy
 Controls the flow of EBus events. More...
 

Public Member Functions

virtual ~EntityEvents ()
 Destroys the instance of the class. More...
 
virtual void OnEntityActivated (const AZ::EntityId &)
 Signals that an entity was activated. More...
 
virtual void OnEntityDeactivated (const AZ::EntityId &)
 Signals that an entity is being deactivated. More...
 
virtual void OnEntityNameChanged (const AZStd::string &name)
 Signals that the name of an entity changed. More...
 
- Public Member Functions inherited from AZ::ComponentBus
virtual ~ComponentBus ()=default
 Destroys a component bus. More...
 

Additional Inherited Members

- Static Public Attributes inherited from AZ::ComponentBus
static const EBusAddressPolicy AddressPolicy
 Overrides the default AZ::EBusTraits address policy so that the bus has multiple addresses at which to receive messages. More...
 
- Static Public Attributes inherited from AZ::EBusTraits
static const EBusHandlerPolicy HandlerPolicy
 Defines how many handlers can connect to an address on the EBus and the order in which handlers at each address receive events. More...
 
static const EBusAddressPolicy AddressPolicy
 Defines how many addresses exist on the EBus. More...
 
static const bool EnableEventQueue
 Specifies whether the EBus supports an event queue. More...
 
- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 A destructor. More...
 

Detailed Description

Interface for the AZ::EntityBus, which is the EBus for notification events dispatched by a specific entity.

Member Typedef Documentation

◆ ConnectionPolicy

template<class Bus >
using AZ::EntityEvents::ConnectionPolicy = EntityEventsConnectionPolicy<Bus>

With this connection policy, an AZ::EntityEvents::OnEntityActivated event is immediately dispatched if the entity is active when a handler connects to the bus.

Constructor & Destructor Documentation

◆ ~EntityEvents()

virtual AZ::EntityEvents::~EntityEvents ( )
inlinevirtual

Destroys the instance of the class.

Member Function Documentation

◆ OnEntityActivated()

virtual void AZ::EntityEvents::OnEntityActivated ( const AZ::EntityId )
inlinevirtual

Signals that an entity was activated.

This event is dispatched after the activation of the entity is complete. It is also dispatched immediately if the entity is already active when a handler connects to the bus.

Parameters
EntityIdThe ID of the entity that was activated.

◆ OnEntityDeactivated()

virtual void AZ::EntityEvents::OnEntityDeactivated ( const AZ::EntityId )
inlinevirtual

Signals that an entity is being deactivated.

This event is dispatched immediately before the entity is deactivated.

Parameters
EntityIdThe ID of the entity that is being deactivated.

◆ OnEntityNameChanged()

virtual void AZ::EntityEvents::OnEntityNameChanged ( const AZStd::string &  name)
inlinevirtual

Signals that the name of an entity changed.

Parameters
nameThe new name of the entity.

The documentation for this class was generated from the following file:
  • C:/lumberyard-root/dev/Code/Framework/AzCore/AzCore/Component/EntityBus.h