TypedHandleWorld.ixx File
Multi-domain entity world with compile-time handle-to-manager dispatch. More...
Included Headers
#include <ostream>
#include <tuple>
#include <utility>
#include <vector>
#include <type_traits>
#include <optional>
#include <cstddef>
#include <helios.ecs.Entity>
#include <helios.ecs.View>
Namespaces Index
| namespace | helios |
| namespace | ecs |
Classes Index
| struct | HandleToManager<THandle, THead, TTail...> |
| struct | HandleToManager<THandle, THead> |
| struct | HandleToManager<THandle> |
| class | TypedHandleWorld<TEntityManagers> |
|
A multi-domain entity world that dispatches operations to the correct EntityManager based on the handle type. More... | |
Description
Multi-domain entity world with compile-time handle-to-manager dispatch.
File Listing
The file content with the documentation metadata removed is:
33struct HandleToManager;
36struct HandleToManager<THandle, THead, TTail...> {
37 static constexpr size_t value = [] {
41 return size_t{1} + HandleToManager<THandle, TTail...>::value;
47struct HandleToManager<THandle, THead> {
52 static constexpr size_t value = 0;
57struct HandleToManager<THandle> {
61export namespace helios::ecs {
121 class TypedHandleWorld {
126 using EntityManager_types = std::tuple<TEntityManagers...>;
140 auto& entityManager() {
141 constexpr size_t idx = HandleToManager<THandle, TEntityManagers...>::value;
154 const auto& entityManager() const {
155 constexpr size_t idx = HandleToManager<THandle, TEntityManagers...>::value;
176 return Entity{handle, &em};
192 return Entity{handle, &em};
227 [[nodiscard]] auto findEntity(THandle handle) {
231 using Entity_type = Entity<EM>;
253 [[nodiscard]] auto cloneEntity(THandle source) noexcept {
281 return View<EM, TComponents...>(&em);
286 EntityManager_types entityManagers_;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.