Skip to main content

IsManagerLike.ixx File

Concept constraining types eligible for manager registration. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespaceworld

World state management, resource registry, and per-frame update context. More...

namespacecommon

Shared type definitions, concepts, and tags used across engine subsystems. More...

namespaceconcepts

Compile-time concepts for engine role classification and capability detection. More...

Description

Concept constraining types eligible for manager registration.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file IsManagerLike.ixx
3 * @brief Concept constraining types eligible for manager registration.
4 */
5module;
6
7#include <concepts>
8
9export module helios.engine.common.concepts.IsManagerLike;
10
11import helios.engine.common.concepts.HasTag;
12import helios.engine.common.tags.ManagerRole;
13
14export namespace helios::engine::runtime::world {
15 class UpdateContext;
16}
17
19
20 /**
21 * @brief Constrains T to types that provide `flush(UpdateContext&)` and
22 * declare `EngineRoleTag = ManagerRole`.
23 *
24 * @details A type satisfies IsManagerLike if it:
25 * 1 Provides a `void flush(UpdateContext&)` method for batch processing.
26 * 2 Declares `using EngineRoleTag = ManagerRole;` to explicitly opt in.
27 *
28 * Used by `GameWorld::registerResource<T>()` to gate registration.
29 *
30 * @tparam T The type to constrain.
31 *
32 * @see ManagerRole
33 * @see HasTag
34 * @see Manager
35 */
36 template<class T>
37 concept IsManagerLike = requires(T& t, helios::engine::runtime::world::UpdateContext& updateContext) {
38 {t.flush(updateContext) } -> std::same_as<void>;
39 } && HasTag<T, tags::ManagerRole>;
40}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.