Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::EntityComponentIdPair Class Reference

A pair of entity and component IDs that are used to access an address of an AZ::EntityComponentBus. More...

Public Member Functions

 AZ_CLASS_ALLOCATOR (EntityComponentIdPair, AZ::SystemAllocator, 0)
 Specifies that this class should use AZ::SystemAllocator for memory management by default. More...
 
 AZ_RTTI (EntityComponentIdPair, "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}")
 Adds run-time type information to this class. More...
 
 EntityComponentIdPair ()
 Creates an empty entity-component ID pair. More...
 
 EntityComponentIdPair (const AZ::EntityId &entityId, const AZ::ComponentId &componentId)
 Creates an empty entity-component ID pair with the specified entity and component ID. More...
 
virtual ~EntityComponentIdPair ()=default
 Destroys the entity-ID pair. More...
 
AZ::EntityId GetEntityId () const
 Gets the ID of the entity so that it can be hashed and combined with the ID of the component to find which address to use on the message bus. More...
 
AZ::ComponentId GetComponentId () const
 Gets the ID of the component so that it can be hashed and combined with the ID of the entity to find which address to use on the message bus. More...
 
bool operator== (const EntityComponentIdPair &other) const
 Overloads the == operator so that entity-component ID pairs can be checked for equality. More...
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 Reflects this class into a variety of contexts (script, serialize, edit, and so on). More...
 

Detailed Description

A pair of entity and component IDs that are used to access an address of an AZ::EntityComponentBus.

Constructor & Destructor Documentation

◆ EntityComponentIdPair() [1/2]

AZ::EntityComponentIdPair::EntityComponentIdPair ( )
inline

Creates an empty entity-component ID pair.

Entity-component ID pairs are used to access addresses of an AZ::EntityComponentBus.

◆ EntityComponentIdPair() [2/2]

AZ::EntityComponentIdPair::EntityComponentIdPair ( const AZ::EntityId entityId,
const AZ::ComponentId componentId 
)
inline

Creates an empty entity-component ID pair with the specified entity and component ID.

Entity-component ID pairs are used to access addresses of an AZ::EntityComponentBus.

Parameters
entityIdID of an entity.
componentIdID of a component.

◆ ~EntityComponentIdPair()

virtual AZ::EntityComponentIdPair::~EntityComponentIdPair ( )
virtualdefault

Destroys the entity-ID pair.

Member Function Documentation

◆ AZ_CLASS_ALLOCATOR()

AZ::EntityComponentIdPair::AZ_CLASS_ALLOCATOR ( EntityComponentIdPair  ,
AZ::SystemAllocator  ,
 
)

Specifies that this class should use AZ::SystemAllocator for memory management by default.

◆ AZ_RTTI()

AZ::EntityComponentIdPair::AZ_RTTI ( EntityComponentIdPair  ,
"{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}"   
)

Adds run-time type information to this class.

◆ GetComponentId()

AZ::ComponentId AZ::EntityComponentIdPair::GetComponentId ( ) const
inline

Gets the ID of the component so that it can be hashed and combined with the ID of the entity to find which address to use on the message bus.

Returns
The ID of the specified component.

◆ GetEntityId()

AZ::EntityId AZ::EntityComponentIdPair::GetEntityId ( ) const
inline

Gets the ID of the entity so that it can be hashed and combined with the ID of the component to find which address to use on the message bus.

Returns
The ID of the specified component.

◆ operator==()

bool AZ::EntityComponentIdPair::operator== ( const EntityComponentIdPair other) const
inline

Overloads the == operator so that entity-component ID pairs can be checked for equality.

Parameters
otherAn entity-component ID pair whose equality you want to check against.
Returns
Returns true if the entity-component ID pairs are equal.

◆ Reflect()

static void AZ::EntityComponentIdPair::Reflect ( AZ::ReflectContext context)
static

Reflects this class into a variety of contexts (script, serialize, edit, and so on).

Parameters
reflectionA pointer to the reflection context.

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