Skip to main content

HasInit.ixx File

Concept detecting an optional init(GameWorld&) method. More...

Included Headers

#include <concepts>

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 detecting an optional init(GameWorld&) method.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file HasInit.ixx
3 * @brief Concept detecting an optional init(GameWorld&) method.
4 */
5module;
6
7#include <concepts>
8
9export module helios.engine.common.concepts.HasInit;
10
12 class GameWorld;
13}
14
16
17 /**
18 * @brief Detects whether T provides a `void init(GameWorld&)` method.
19 *
20 * @details Used by the System type-erasure wrapper to conditionally
21 * forward one-time initialization calls. If a concrete system does
22 * not satisfy this concept, the init step is a no-op.
23 *
24 * @tparam T The type to inspect.
25 *
26 * @see System
27 */
28 template<typename T>
29 concept HasInit = requires(T& t, helios::engine::runtime::world::GameWorld& gameWorld) {
30 {t.init(gameWorld) } -> std::same_as<void>;
31 };
32
33
34}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.