BindingComponent Class Template
Generic component that stores a handle reference to another entity. More...
Declaration
Public Constructors Index
template <typename TOwnerHandle, typename TTargetHandle> | |
| BindingComponent (const TTargetHandle targetHandle) | |
|
Creates a binding from an explicit target handle. More... | |
template <typename TTargetEntity> | |
| BindingComponent (const TTargetEntity targetEntity) | |
|
Creates a binding from a target entity instance. More... | |
Public Member Functions Index
template <typename TOwnerHandle, typename TTargetHandle> | |
| TTargetHandle | targetHandle () const noexcept |
|
Returns the bound target handle. More... | |
Private Member Attributes Index
template <typename TOwnerHandle, typename TTargetHandle> | |
| TTargetHandle | targetHandle_ {} |
Description
Generic component that stores a handle reference to another entity.
BindingComponent models a directed relationship from an owner entity to a target entity via the target's handle type. It is used as a lightweight link primitive for higher-level components such as scene, camera, and viewport bindings.
- Template Parameters
-
TOwnerHandle Handle type of the entity owning this component.
TTargetHandle Handle type of the referenced target entity.
Definition at line 21 of file BindingComponent.ixx.
Public Constructors
BindingComponent()
| inline explicit |
Creates a binding from an explicit target handle.
- Parameters
-
targetHandle Handle of the referenced target entity.
Definition at line 32 of file BindingComponent.ixx.
BindingComponent()
| inline explicit |
Creates a binding from a target entity instance.
This constructor is enabled only if the entity's Handle_type matches TTargetHandle.
- Template Parameters
-
TTargetEntity Entity type exposing Handle_type and handle().
- Parameters
-
targetEntity Referenced target entity.
Definition at line 45 of file BindingComponent.ixx.
Public Member Functions
targetHandle()
| inline noexcept |
Returns the bound target handle.
- Returns
Handle of the referenced target entity.
Definition at line 52 of file BindingComponent.ixx.
Private Member Attributes
targetHandle_
|
Definition at line 23 of file BindingComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.