EntityResolver.ixx File
Lightweight callable for resolving EntityHandles to Entity wrappers. More...
Included Headers
#include <optional>
#include <helios.ecs.types.EntityHandle>
#include <helios.ecs.Entity>
#include <helios.ecs.EntityManager>
Namespaces Index
| namespace | helios |
| namespace | ecs |
Classes Index
| struct | EntityResolver<TEntityManager> |
|
Callable that resolves an EntityHandle to an Entity facade. More... | |
Description
Lightweight callable for resolving EntityHandles to Entity wrappers.
File Listing
The file content with the documentation metadata removed is:
16using namespace helios::ecs::types;
17export namespace helios::ecs {
37 struct EntityResolver {
39 using Handle_type = TEntityManager::Handle_type;
40 using Entity_type = Entity<TEntityManager>;
54 [[nodiscard]] std::optional<Entity_type> operator()(const Handle_type handle) const noexcept {
55 if (!em->isValid(handle)) {
58 return Entity_type(handle, em);
70 [[nodiscard]] std::optional<Entity_type> find(const Handle_type handle) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.