Skip to main content

PrefabIdComponent Class

Component that stores the PrefabId identifying a GameObject's prefab origin. More...

Declaration

class helios::engine::runtime::pooling::components::PrefabIdComponent { ... }

Public Constructors Index

PrefabIdComponent (const PrefabIdComponent &)=delete

Copy construction is deleted (prefab identity is not cloneable). More...

PrefabIdComponent (PrefabIdComponent &&)=default

Move constructor. More...

PrefabIdComponent (const PrefabId prefabId)

Constructs a PrefabIdComponent with the given prefab identifier. More...

Public Destructor Index

~PrefabIdComponent ()=default

Destructor. More...

Public Operators Index

PrefabIdComponent &operator= (const PrefabIdComponent &)=delete

Copy assignment is deleted (prefab identity is not cloneable). More...

PrefabIdComponent &operator= (PrefabIdComponent &&)=default

Move assignment operator. More...

Public Member Functions Index

PrefabIdprefabId () const noexcept

Returns the stored prefab identifier. More...

Private Member Attributes Index

PrefabIdprefabId_

The prefab identifier for this entity's template origin. More...

Description

Component that stores the PrefabId identifying a GameObject's prefab origin.

PrefabIdComponent is attached to pooled GameObjects to record which prefab template they were cloned from. The pool system uses this ID to associate entities with their originating pool configuration.

Copy construction and assignment are explicitly deleted because prefab identity is intrinsic to the original template - cloned instances receive their own PrefabIdComponent via move during pool initialization, not through the blueprint copy path.

See Also

PrefabId

See Also

GameObjectPoolConfig

See Also

GameObjectFactory::withPrefabId

Definition at line 33 of file PrefabIdComponent.ixx.

Public Constructors

PrefabIdComponent()

helios::engine::runtime::pooling::components::PrefabIdComponent::PrefabIdComponent (const PrefabIdComponent &)
delete

Copy construction is deleted (prefab identity is not cloneable).

Definition at line 48 of file PrefabIdComponent.ixx.

Reference PrefabIdComponent.

Referenced by operator=, operator=, PrefabIdComponent and PrefabIdComponent.

PrefabIdComponent()

helios::engine::runtime::pooling::components::PrefabIdComponent::PrefabIdComponent (PrefabIdComponent &&)
default

Move constructor.

Definition at line 54 of file PrefabIdComponent.ixx.

Reference PrefabIdComponent.

PrefabIdComponent()

helios::engine::runtime::pooling::components::PrefabIdComponent::PrefabIdComponent (const PrefabId prefabId)
inline explicit

Constructs a PrefabIdComponent with the given prefab identifier.

Parameters
prefabId

The prefab identifier to store.

Definition at line 64 of file PrefabIdComponent.ixx.

64 explicit PrefabIdComponent(const PrefabId prefabId) : prefabId_(prefabId) {}

Reference prefabId.

Public Destructor

~PrefabIdComponent()

helios::engine::runtime::pooling::components::PrefabIdComponent::~PrefabIdComponent ()
default

Destructor.

Definition at line 45 of file PrefabIdComponent.ixx.

Public Operators

operator=()

PrefabIdComponent & helios::engine::runtime::pooling::components::PrefabIdComponent::operator= (const PrefabIdComponent &)
delete

Copy assignment is deleted (prefab identity is not cloneable).

Definition at line 51 of file PrefabIdComponent.ixx.

Reference PrefabIdComponent.

operator=()

PrefabIdComponent & helios::engine::runtime::pooling::components::PrefabIdComponent::operator= (PrefabIdComponent &&)
default

Move assignment operator.

Definition at line 57 of file PrefabIdComponent.ixx.

Reference PrefabIdComponent.

Public Member Functions

prefabId()

PrefabId helios::engine::runtime::pooling::components::PrefabIdComponent::prefabId ()
inline nodiscard noexcept

Returns the stored prefab identifier.

Returns

The PrefabId identifying the prefab template.

Definition at line 71 of file PrefabIdComponent.ixx.

71 [[nodiscard]] PrefabId prefabId() const noexcept {
72 return prefabId_;
73 }

Referenced by PrefabIdComponent.

Private Member Attributes

prefabId_

PrefabId helios::engine::runtime::pooling::components::PrefabIdComponent::prefabId_

The prefab identifier for this entity's template origin.

Definition at line 38 of file PrefabIdComponent.ixx.

38 PrefabId prefabId_;

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.