Skip to main content

IsSystemLike.ixx File

Concept constraining types eligible for system 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 system registration.

File Listing

The file content with the documentation metadata removed is:

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

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.