Skip to main content

IsStrongIdCollisionResolverLike.ixx File

Concept for strong ID collision detection strategies. More...

Included Headers

#include <concepts> #include <helios.core.types>

Namespaces Index

namespacehelios
namespaceecs

Generic, reusable ECS primitives. More...

namespaceconcepts

Compile-time constraints for ECS extension points. More...

Description

Concept for strong ID collision detection strategies.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file IsStrongIdCollisionResolverLike.ixx
3 * @brief Concept for strong ID collision detection strategies.
4 */
5module;
6
7#include <concepts>
8
9export module helios.ecs.concepts.IsStrongIdCollisionResolverLike;
10
11import helios.core.types;
12
13using namespace helios::core::types;
14export namespace helios::ecs::concepts {
15
16 /**
17 * @brief Constraint for types that can track strong ID uniqueness.
18 *
19 * A type satisfying `IsStrongIdCollisionResolverLike` provides the
20 * minimal interface required by `EntityRegistry` to detect and prevent
21 * strong ID collisions during entity creation.
22 *
23 * @tparam T The lookup strategy type to check.
24 *
25 * @see EntityRegistry
26 * @see HashedLookupStrategy
27 * @see LinearLookupStrategy
28 */
29 template <typename T>
30 concept IsStrongIdCollisionResolverLike = requires(T& t, const StrongId_t id)
31 {
32 {t.add(id)}->std::same_as<bool>;
33 {t.remove(id)}->std::same_as<bool>;
34 {t.has(id)}->std::same_as<bool>;
35 };
36
37}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.