Skip to main content

PrefabIdComponent Class Template

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

Declaration

template <typename THandle> class helios::engine::runtime::pooling::components::PrefabIdComponent<THandle> { ... }

Public Constructors Index

template <typename THandle>
PrefabIdComponent (const PrefabIdComponent &)=delete

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

template <typename THandle>
PrefabIdComponent (PrefabIdComponent &&)=default

Move constructor. More...

template <typename THandle>
PrefabIdComponent (const PrefabId prefabId)

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

Public Destructor Index

template <typename THandle>
~PrefabIdComponent ()=default

Destructor. More...

Public Operators Index

template <typename THandle>
PrefabIdComponent &operator= (const PrefabIdComponent &)=delete

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

template <typename THandle>
PrefabIdComponent &operator= (PrefabIdComponent &&)=default

Move assignment operator. More...

Public Member Functions Index

template <typename THandle>
PrefabIdprefabId () const noexcept

Returns the stored prefab identifier. More...

Private Member Attributes Index

template <typename THandle>
PrefabIdprefabId_

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

Description

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

PrefabIdComponent is attached to pooled Entities 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

EntityPoolConfig

See Also

EntityFactory::withPrefabId

Definition at line 34 of file PrefabIdComponent.ixx.

Public Constructors

PrefabIdComponent()

template <typename THandle>
helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::PrefabIdComponent (const PrefabIdComponent &)
delete

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

Definition at line 49 of file PrefabIdComponent.ixx.

PrefabIdComponent()

template <typename THandle>
helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::PrefabIdComponent (PrefabIdComponent &&)
default

Move constructor.

Definition at line 55 of file PrefabIdComponent.ixx.

PrefabIdComponent()

template <typename THandle>
helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::PrefabIdComponent (const PrefabId prefabId)
inline explicit

Constructs a PrefabIdComponent with the given prefab identifier.

Parameters
prefabId

The prefab identifier to store.

Definition at line 65 of file PrefabIdComponent.ixx.

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

Public Destructor

~PrefabIdComponent()

template <typename THandle>
helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::~PrefabIdComponent ()
default

Destructor.

Definition at line 46 of file PrefabIdComponent.ixx.

Public Operators

operator=()

template <typename THandle>
PrefabIdComponent & helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::operator= (const PrefabIdComponent &)
delete

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

Definition at line 52 of file PrefabIdComponent.ixx.

operator=()

template <typename THandle>
PrefabIdComponent & helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::operator= (PrefabIdComponent &&)
default

Move assignment operator.

Definition at line 58 of file PrefabIdComponent.ixx.

Public Member Functions

prefabId()

template <typename THandle>
PrefabId helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::prefabId ()
inline noexcept

Returns the stored prefab identifier.

Returns

The PrefabId identifying the prefab template.

Definition at line 72 of file PrefabIdComponent.ixx.

73 return prefabId_;
74 }

Private Member Attributes

prefabId_

template <typename THandle>
PrefabId helios::engine::runtime::pooling::components::PrefabIdComponent< THandle >::prefabId_

The prefab identifier for this entity's template origin.

Definition at line 39 of file PrefabIdComponent.ixx.

39 PrefabId prefabId_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.