EntityResolver Struct Template
Callable that resolves an EntityHandle to an Entity facade. More...
Declaration
Public Member Typedefs Index
template <typename TEntityManager> | |
| using | Handle_type = TEntityManager::Handle_type |
template <typename TEntityManager> | |
| using | Entity_type = Entity< TEntityManager > |
Public Operators Index
template <typename TEntityManager> | |
| auto | operator() (const Handle_type handle) const noexcept -> std::optional< Entity_type > |
|
Resolves an EntityHandle to an Entity. More... | |
Public Member Functions Index
template <typename TEntityManager> | |
| auto | find (const Handle_type handle) const noexcept -> std::optional< Entity_type > |
|
Resolves an EntityHandle to an Entity. More... | |
Public Member Attributes Index
template <typename TEntityManager> | |
| TEntityManager *const | em |
|
Non-owning pointer to the EntityManager used for validation. More... | |
Description
Callable that resolves an EntityHandle to an Entity facade.
EntityResolver wraps an EntityManager pointer and provides a validation-and-wrap operation: given an EntityHandle, it checks validity via the EntityManager's versioned registry and returns a lightweight Entity wrapper if the handle is still alive.
Supports both function-call syntax and a named `find()` method.
- Template Parameters
-
TEntityManager The concrete `EntityManager` specialisation used for handle validation and Entity construction.
- See Also
- See Also
- See Also
Definition at line 37 of file EntityResolver.ixx.
Public Member Typedefs
Entity_type
|
Definition at line 40 of file EntityResolver.ixx.
Handle_type
|
Definition at line 39 of file EntityResolver.ixx.
Public Operators
operator()()
| inline nodiscard noexcept |
Resolves an EntityHandle to an Entity.
- Parameters
-
handle The entity handle to resolve.
- Returns
An Entity if the handle is valid, std::nullopt otherwise.
Definition at line 54 of file EntityResolver.ixx.
Reference helios::ecs::EntityResolver< TEntityManager >::em.
Public Member Functions
find()
| inline nodiscard noexcept |
Resolves an EntityHandle to an Entity.
Delegates to `operator()`.
- Parameters
-
handle The entity handle to resolve.
- Returns
An Entity if the handle is valid, std::nullopt otherwise.
Definition at line 70 of file EntityResolver.ixx.
Public Member Attributes
em
|
Non-owning pointer to the EntityManager used for validation.
Definition at line 45 of file EntityResolver.ixx.
Referenced by helios::ecs::EntityResolver< TEntityManager >::operator().
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.