Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::EntityComponentIdPair Class Reference

#include <ComponentBus.h>

Public Member Functions

 AZ_CLASS_ALLOCATOR (EntityComponentIdPair, AZ::SystemAllocator)
 
 AZ_RTTI (EntityComponentIdPair, "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}")
 
 EntityComponentIdPair ()
 
 EntityComponentIdPair (const AZ::EntityId &entityId, const AZ::ComponentId &componentId)
 
virtual ~EntityComponentIdPair ()=default
 
AZ::EntityId GetEntityId () const
 
AZ::ComponentId GetComponentId () const
 
bool operator== (const EntityComponentIdPair &other) const
 
bool operator!= (const EntityComponentIdPair &other) const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

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 difference.

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

◆ 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: