EntityResolver Struct
Callable that resolves an EntityHandle to a GameObject. More...
Declaration
Public Operators Index
| std::optional< GameObject > | operator() (const EntityHandle handle) const noexcept |
|
Resolves an EntityHandle to a GameObject. More... | |
Public Member Functions Index
| std::optional< GameObject > | find (const EntityHandle handle) const noexcept |
|
Resolves an EntityHandle to a GameObject. More... | |
Public Member Attributes Index
| helios::engine::ecs::EntityManager *const | em |
|
Non-owning pointer to the EntityManager used for validation. More... | |
Description
Callable that resolves an EntityHandle to a GameObject.
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 GameObject wrapper if the handle is still alive.
Supports both function-call syntax and a named `find()` method.
- See Also
- See Also
- See Also
Definition at line 31 of file EntityResolver.ixx.
Public Operators
operator()()
| inline nodiscard noexcept |
Resolves an EntityHandle to a GameObject.
- Parameters
-
handle The entity handle to resolve.
- Returns
A GameObject if the handle is valid, std::nullopt otherwise.
Definition at line 45 of file EntityResolver.ixx.
Reference em.
Public Member Functions
find()
| inline nodiscard noexcept |
Resolves an EntityHandle to a GameObject.
Delegates to `operator()`.
- Parameters
-
handle The entity handle to resolve.
- Returns
A GameObject if the handle is valid, std::nullopt otherwise.
Definition at line 61 of file EntityResolver.ixx.
Public Member Attributes
em
|
Non-owning pointer to the EntityManager used for validation.
Definition at line 36 of file EntityResolver.ixx.
Referenced by operator().
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.