engine/ecs/EntityResolver.ixx File
Lightweight callable for resolving EntityHandles to GameObjects. More...
Included Headers
#include <optional>
#include <helios.engine.ecs.GameObject>
#include <helios.engine.ecs.EntityManager>
#include <helios.engine.ecs.EntityHandle>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | ecs |
|
Core Entity-Component-System architecture. More... | |
Classes Index
| struct | EntityResolver |
|
Callable that resolves an EntityHandle to a GameObject. More... | |
Description
Lightweight callable for resolving EntityHandles to GameObjects.
File Listing
The file content with the documentation metadata removed is:
15export namespace helios::engine::ecs {
31 struct EntityResolver {
36 helios::engine::ecs::EntityManager* const em;
45 [[nodiscard]] std::optional<GameObject> operator()(const EntityHandle handle) const noexcept {
46 if (!em->isValid(handle)) {
49 return GameObject(handle, em);
61 [[nodiscard]] std::optional<GameObject> find(const EntityHandle handle) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.