Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs Namespace Reference

Namespaces

namespace  anonymous_namespace{schedule.cpp}
namespace  anonymous_namespace{scheduler.cpp}
namespace  details

Classes

class  AccessPolicy
 Stores data access requirements for a system at compile time. More...
class  AccessPolicyBuilder
 Fluent builder for constructing an AccessPolicy. More...
class  AddComponentsCmd
 Command to add multiple components to an entity. More...
class  Archetype
 Stores entities and their component data in a Structure-of-Arrays layout for a specific archetype. More...
class  ArchetypeId
 Unique identifier for an archetype, represented as a sorted set of component type indices. More...
class  AsyncMessageQueue
 Async queue for managing multiple message types via lock-free concurrent queues. More...
class  AsyncMessageReader
 Type-safe, move-based reader for async messages. More...
class  AsyncMessageWrapper
 A wrapper around an async message that provides convenient access to the message's data and type information. More...
class  AsyncMessageWriter
 Type-safe writer for async messages. More...
class  BasicMessageWriter
 Type-safe writer for regular messages with a configurable queue allocator. More...
class  BasicQuery
 Query result object for iterating over matching entities and components. More...
class  BasicQueryIter
 Iterator for query results without entity information. More...
class  BasicQueryWithEntity
 Wrapper that provides entity-aware iteration over query results. More...
class  BasicQueryWithEntityIter
 Iterator for query results including the entity. More...
struct  ClearAllMessagesCmd
 Command to clear all message queues without removing registration. More...
class  ClearComponentsCmd
 Command to clear all components from an entity. More...
struct  ClearMessagesCmd
 Command to clear all messages of a specific type from the queue. More...
class  CmdQueue
 Command queue for deferred ECS operations. More...
class  Commands
 Thin wrapper over command queue and world for deferred ECS operations. More...
class  ComponentAddedMsg
 Message sent when a component is added. More...
struct  ComponentConflictInfo
 Describes a single component access conflict between two policies. More...
class  ComponentManager
 Central manager for all component storage (archetype and sparse-set). More...
 Runtime metadata for a registered component type. More...
class  ComponentRemovedMsg
 Message sent when a component is removed. More...
class  ComponentsClearedMsg
 Message sent when all components are cleared from an entity. More...
struct  ComponentTraits
 Component traits for optimization decisions. More...
class  ComponentTypeInfo
 Component type info for runtime operations. More...
struct  CompositeSystemParam
 Helper for implementing SystemParamTraits on aggregate parameters. More...
class  ConsumableMessageReader
 Type-safe, zero-copy reader for consumable messages with consume support. More...
class  ConsumableMessageWrapper
 A wrapper around a message that provides convenient access to the message's data, type information, and the ability to mark the message as consumed. More...
class  ConsumableMessageWrapperIter
 Bidirectional iterator that yields ConsumableMessageWrapper<T> instances with consume support. More...
class  ConsumedMessagesRegistry
 Per-system registry for tracking consumed message indices. More...
class  Dag
 Directed acyclic graph used to compute the topological execution order of systems within a schedule. More...
struct  DagError
class  DestroyEntitiesCmd
 Command to destroy multiple entities. More...
class  DestroyEntityCmd
 Command to destroy a single entity. More...
class  Entity
 Unique identifier for entities with generation counter to handle recycling. More...
class  EntityAddedMsg
 Message sent when an entity is added. More...
class  EntityCmdBuffer
 Command buffer for deferred entity operations. More...
class  EntityDestroyedMsg
 Message sent when an entity is destroyed. More...
class  EntityManager
 Entity manager responsible for entity creation, destruction, and validation. More...
class  Executor
 Abstract interface for schedule executors. More...
class  FunctionCmd
 Command that executes a function with World reference. More...
class  InsertResourceCmd
 Command to insert a resource into the world. More...
class  Local
 Read-only or mutable access to a system-local resource. More...
class  MainThreadExecutor
 Main-thread executor that runs systems sequentially on the calling thread. More...
class  MessageManager
 Central coordinator for message lifecycle with double buffering and consumed message removal. More...
 Metadata for a registered message type. More...
class  MessageQueue
 Queue for managing multiple message types using type-erased contiguous storage. More...
class  MessageReader
 Type-safe, zero-copy reader for regular messages. More...
class  MessageReaderBase
 CRTP base class for message readers providing common functionality. More...
class  MessageWrapper
 A wrapper around a message that provides convenient access to the message's data and type information. More...
class  MessageWrapperIter
 Bidirectional iterator that yields MessageWrapper<T> instances. More...
class  MultiThreadedExecutor
 Multi-threaded executor that runs systems in parallel using work-stealing. More...
class  RemoveComponentsCmd
 Command to remove multiple components from an entity. More...
struct  RemoveResourceCmd
 Command to remove resource from the world. More...
class  Res
 Read-only or mutable access to resource. More...
struct  ResourceConflictInfo
 Describes a single resource access conflict between two policies. More...
struct  ResourceInsertedMsg
 Message sent when a resource is inserted. More...
class  ResourceManager
 Resource manager for storing and managing resources of various types. More...
struct  ResourceRemovedMsg
 Message sent when a resource is removed. More...
struct  RunConditionStorage
 Storage for a run condition — predicate + access policy + local data. More...
class  Schedule
 A collection of systems, sets, and run conditions with ordering constraints. More...
struct  ScheduleError
 Error type returned when schedule compilation fails. More...
class  ScheduleOrdering
 Handle returned when adding a schedule to the scheduler for configuring ordering. More...
class  Scheduler
 Orchestrates multiple named schedules, handles transitions, and executes them in topological order. More...
struct  ScheduleSettings
 Settings that control how a schedule is compiled and executed. More...
struct  ScheduleSystemId
 Unique identifier for a system within a schedule. More...
 Metadata attached to a system entry for ordering and configuration. More...
class  SingleThreadedExecutor
 Single-threaded executor that runs systems sequentially on a single thread. More...
class  SparseComponentStorage
 Concrete sparse-set storage for a single component type (non-polymorphic). More...
class  StageOrdering
 Handle returned when configuring stage ordering. More...
class  SystemGroupHandle
 Handle returned by variadic Schedule::Add for configuring a batch of systems added together. More...
class  SystemHandle
 Handle returned by Schedule::Add for configuring a system. More...
struct  SystemId
 Id for systems. More...
struct  SystemLocalData
 Local data for a system. More...
struct  SystemLocalDataOptions
 Options for system local data. More...
struct  SystemParamTraits
 Primary template — deliberately incomplete. More...
struct  SystemParamTraits< AsyncMessageReader< T > >
struct  SystemParamTraits< AsyncMessageWriter< T > >
struct  SystemParamTraits< BasicMessageWriter< T, Allocator > >
struct  SystemParamTraits< Commands >
struct  SystemParamTraits< ConsumableMessageReader< T > >
struct  SystemParamTraits< Local< const T > >
struct  SystemParamTraits< Local< T > >
struct  SystemParamTraits< MessageReader< T > >
struct  SystemParamTraits< MessageWriter< T > >
struct  SystemParamTraits< Query< Args... > >
struct  SystemParamTraits< Res< const T > >
struct  SystemParamTraits< Res< T > >
struct  SystemParamTraits< std::optional< Local< const T > > >
struct  SystemParamTraits< std::optional< Local< T > > >
struct  SystemParamTraits< std::optional< Res< const T > > >
struct  SystemParamTraits< std::optional< Res< T > > >
struct  SystemParamTraits< WorldView >
class  SystemSet
 A group of systems that share ordering, run conditions, and other properties. More...
class  SystemSetHandle
 Handle returned by Schedule::Set for configuring a named system set. More...
struct  SystemSetId
 Identifier for a system set. More...
struct  SystemStorage
 Storage for a system. More...
class  TryAddComponentsCmd
 Command to try add multiple components (only missing ones). More...
class  TryDestroyEntitiesCmd
 Command to try destroy multiple entities. More...
class  TryDestroyEntityCmd
 Command to try destroy a single entity. More...
class  TryInsertResourceCmd
 Command to try insert a resource (only if missing). More...
class  TryRemoveComponentsCmd
 Command to try remove multiple components (only those present). More...
struct  TryRemoveResourceCmd
 Command to try remove resource (only if present). More...
class  TypedAsyncMessageStorage
 Typed async message storage backed by a lock-free concurrent queue. More...
class  World
 The World class manages entities with their components and systems. More...
class  WorldCmdBuffer
 Command buffer for deferred World operations. More...
class  WorldView
 Thread-safe read-only view into the world. More...

Concepts

concept  AnyMessageTrait
 Concept for any valid message type.
concept  ArchetypeComponentTrait
 Concept for components that are stored in an archetype.
concept  AsyncMessageTrait
 Concept for valid async message types.
concept  AsyncResourceTrait
 Concept for async resources.
concept  CommandTrait
 Concept that defines the requirements for a command trait.
concept  ComponentTrait
 Concept to check if a type can be used as a component.
concept  ComponentWithNameTrait
 Concept for components that provide a name.
concept  ComponentWithStorageTypeTrait
 Concept for components that provide a storage type.
concept  ConsumableMessageTrait
 Concept for consumable message types.
concept  FunctorSystemTrait
 Concept for system types that are not lambda closures.
concept  LambdaSystemTrait
 Concept for lambda closure types that satisfy SystemTrait.
concept  MessageTrait
 Concept for valid message types.
concept  MessageWithClearPolicy
 Concept for messages with custom clear policy.
concept  MessageWithNameTrait
 Concept for messages with custom names.
concept  ResourceTrait
 Concept for valid resource types.
concept  ResourceWithInsertionCallbackTrait
 Concept for resources that provide insertion callback.
concept  ResourceWithNameTrait
 Concept for resources that provide custom names.
concept  ResourceWithRemovalCallbackTrait
 Concept for resources that provide removal callback.
concept  ResourceWithThreadSafetyTrait
 Concept for resources that provide thread-safety trait.
concept  ScheduleTrait
 Concept for schedules.
concept  ScheduleWithNameTrait
 Concept for schedules that provide a name.
concept  SparseComponentTrait
 Concept for components that are stored in a sparse set.
concept  StageTrait
 Concept for stages.
concept  StageWithNameTrait
 Concept for stages that provide a name.
concept  SystemParam
 Concept for types usable as system function parameters.
concept  SystemSetTrait
 Concept for system sets.
concept  SystemSetWithNameTrait
 Concept for system sets that provide a name.
concept  SystemTrait
 Concept for systems that declare all data access via parameter types.
concept  SystemWithNameTrait
 Concept for systems that declare all data access via parameter types.
concept  TagComponentTrait
 Concept to check if the type is considered a tag component.

Typedefs

using PmrEntityCmdBuffer
 Command buffer for deferred entity operations that uses a polymorphic allocator.
using PmrCmdQueue = CmdQueue<std::pmr::polymorphic_allocator<std::byte>>
 Command queue for deferred ECS operations that uses a polymorphic allocator.
using PmrWorldCmdBuffer
 Command buffer for deferred World operations that uses a polymorphic allocator.
using ComponentTypeIndex = utils::TypeIndex
 Type index for components.
using ComponentTypeId = utils::TypeId
 Type id for components.
using AsyncMessageQueueProducerToken = moodycamel::ProducerToken
using AsyncMessageQueueConsumerToken = moodycamel::ConsumerToken
using PmrConsumedMessagesRegistry
using MessageTypeIndex = utils::TypeIndex
 Type index for messages.
using PmrMessageQueue
template<MessageTrait T>
using PmrBasicMessageWriter
template<MessageTrait T>
using MessageWriter = PmrBasicMessageWriter<T>
 Alias for BasicMessageWriter bound to a PMR allocator.
template<typename... Components>
using QueryIter = BasicQueryIter<false, Components...>
 Iterator for query results without entity information.
template<typename... Components>
using ReadOnlyQueryIter = BasicQueryIter<true, Components...>
 Read-only iterator for query results without entity information.
template<typename... Components>
using QueryWithEntityIter = BasicQueryWithEntityIter<false, Components...>
 Iterator for query results including the entity.
template<typename... Components>
using ReadOnlyQueryWithEntityIter
 Read-only iterator for query results including the entity.
template<typename Alloc, QueryArg... Args>
using MutBasicQuery = BasicQuery<World, Alloc, Args...>
template<typename Alloc, QueryArg... Args>
using ReadOnlyBasicQuery = BasicQuery<const World, Alloc, Args...>
template<typename Alloc, QueryArg... Args>
using MutBasicQueryWithEntity = BasicQueryWithEntity<World, Alloc, Args...>
template<typename Alloc, QueryArg... Args>
using ReadOnlyBasicQueryWithEntity
template<QueryArg... Args>
using PmrBasicQuery
template<QueryArg... Args>
using PmrReadOnlyBasicQuery
template<QueryArg... Args>
using PmrBasicQueryWithEntity
template<QueryArg... Args>
using PmrReadOnlyBasicQueryWithEntity
template<QueryArg... Args>
using Query = BasicQuery<World, std::pmr::polymorphic_allocator<>, Args...>
 Alias for BasicQuery bound to World with a PMR allocator.
template<AsyncResourceTrait T>
using AsyncRes = Res<T>
 Read-only access to thread-safe resources.
using ResourceTypeIndex = utils::TypeIndex
 Type index for resources.
using ResourceTypeId = utils::TypeId
 Type id for resources.
template<typename T>
using DagResult = std::expected<T, DagError>
using RunCondition = std::function<bool(World&, SystemLocalData&)>
 Type-erased run condition: returns bool, receives World& + local data.
using ScheduleTypeIndex = utils::TypeIndex
 Type index for schedules.
using ScheduleTypeId = utils::TypeId
 Type id for schedules.
template<typename T>
using ScheduleResult = std::expected<T, ScheduleError>
 Result type for schedule operations that can fail.
using StageTypeIndex = utils::TypeIndex
 Type index for stages.
using StageTypeId = utils::TypeId
 Type id for stages.
using SystemSetTypeIndex = utils::TypeIndex
 Type index for system sets.
using SystemSetTypeId = utils::TypeId
 Type id for system sets.
using SystemCallable = std::function<void(World&, SystemLocalData&)>
using SystemTypeId = utils::TypeId
 Type id for systems.
using SystemTypeIndex = utils::TypeIndex
 Type index for systems.

Enumerations

enum class  ComponentStorageType : uint8_t { kArchetype , kSparseSet }
 Storage type for components. More...
enum class  MessageClearPolicy : uint8_t { kAutomatic , kManual }
 Policy for message clearing behavior. More...
enum class  DagErrorKind : uint8_t { kUnknownNode , kCycleDetected }
enum class  ExecutorKind : uint8_t { kMainThread , kSingleThreaded , kMultiThreaded }
 Kind of executor to use for schedule execution. More...
enum class  ScheduleErrorKind : uint8_t {
  kUnknown , kCycleDetected , kAmbiguousAccess , kUnknownSet ,
  kUnknownNode
}
 Kind of error produced during schedule compilation. More...

Functions

template<typename G>
 FunctionCmd (G &&) -> FunctionCmd< std::remove_cvref_t< G > >
template<ComponentTrait... Us>
 AddComponentsCmd (Entity, Us &&...) -> AddComponentsCmd< std::remove_cvref_t< Us >... >
template<ComponentTrait... Us>
 TryAddComponentsCmd (Entity, Us &&...) -> TryAddComponentsCmd< std::remove_cvref_t< Us >... >
template<ComponentTrait T>
constexpr std::string_view ComponentNameOf () noexcept
 Component name for debugging and serialization.
template<ComponentTrait T>
constexpr std::string_view ComponentNameOf (const T &) noexcept
 Component name for debugging and serialization.
template<ComponentTrait T>
consteval ComponentStorageType ComponentStorageTypeOf () noexcept
 Component storage type.
template<ComponentTrait T>
consteval ComponentStorageType ComponentStorageTypeOf (const T &) noexcept
 Component storage type.
template<AnyMessageTrait T>
constexpr std::string_view MessageNameOf () noexcept
 Gets the name of an message.
template<AnyMessageTrait T>
constexpr std::string_view MessageNameOf (const T &) noexcept
 Gets the name of an message.
template<AnyMessageTrait T>
consteval MessageClearPolicy MessageClearPolicyOf () noexcept
 Gets the clear policy of an message.
template<AnyMessageTrait T>
consteval MessageClearPolicy MessageClearPolicyOf (const T &) noexcept
 Gets the clear policy of an message.
template<ResourceTrait T>
constexpr std::string_view ResourceNameOf () noexcept
 Gets name for a resource type.
template<ResourceTrait T>
constexpr std::string_view ResourceNameOf (const T &) noexcept
 Gets name for a resource type.
template<ResourceTrait T>
consteval bool IsResourceThreadSafe () noexcept
 Checks if a resource type is thread-safe.
template<ResourceTrait T>
consteval bool IsResourceThreadSafe (const T &) noexcept
 Checks if a resource type is thread-safe.
template<ResourceTrait T>
constexpr void ResourceCallOnInsert (T &resource, World &world) noexcept
 Calls insertion callback for a resource type if it exists.
template<ResourceTrait T>
constexpr void ResourceCallOnRemove (T &resource, World &world) noexcept
 Calls removal callback for a resource type if it exists.
template<ScheduleTrait T>
constexpr std::string_view ScheduleNameOf (const T &={}) noexcept
 Schedule name for debugging and serialization.
template<StageTrait T>
constexpr std::string_view StageNameOf (const T &={}) noexcept
 Stage name for debugging and serialization.
template<SystemSetTrait T>
constexpr std::string_view SystemSetNameOf () noexcept
 System set name for debugging and serialization.
template<SystemSetTrait T>
constexpr std::string_view SystemSetNameOf (const T &) noexcept
 System set name for debugging and serialization.
template<typename... Params>
constexpr void RegisterParamAccess (AccessPolicyBuilder &builder)
 Registers access declarations for each parameter type.
template<ComponentTrait... Cs>
requires utils::UniqueTypes<Cs...>
constexpr void DeclareReadComponents (AccessPolicyBuilder &builder)
 Declares read-only component access.
template<ComponentTrait... Cs>
requires utils::UniqueTypes<Cs...>
constexpr void DeclareWriteComponents (AccessPolicyBuilder &builder)
 Declares mutable component access.
template<typename... AccessTypes>
constexpr void DeclareQueryAccess (AccessPolicyBuilder &builder)
 Declares component access using query access specifiers.
template<typename... Params>
constexpr AccessPolicy BuildPolicyFromParams ()
 Builds an AccessPolicy by calling RegisterAccess on each system parameter type.
template<SystemTrait T>
constexpr AccessPolicy BuildPolicyFromSystem ()
 Deduces parameter types from the system's operator() signature and builds the access policy.
template<SystemTrait T>
constexpr std::string_view SystemNameOf () noexcept
 Gets the name of a system.
template<SystemTrait T>
constexpr std::string_view SystemNameOf (const T &) noexcept
 Gets the name of a system.

Typedef Documentation

◆ AsyncMessageQueueConsumerToken

using helios::ecs::AsyncMessageQueueConsumerToken = moodycamel::ConsumerToken

Definition at line 52 of file async_queue.hpp.

◆ AsyncMessageQueueProducerToken

using helios::ecs::AsyncMessageQueueProducerToken = moodycamel::ProducerToken

Definition at line 51 of file async_queue.hpp.

◆ AsyncRes

template<AsyncResourceTrait T>
using helios::ecs::AsyncRes = Res<T>

Read-only access to thread-safe resources.

Definition at line 48 of file param.hpp.

◆ ComponentTypeId

Type id for components.

Definition at line 17 of file component.hpp.

◆ ComponentTypeIndex

Type index for components.

Definition at line 14 of file component.hpp.

◆ DagResult

template<typename T>
using helios::ecs::DagResult = std::expected<T, DagError>

Definition at line 27 of file dag.hpp.

◆ MessageTypeIndex

Type index for messages.

Definition at line 14 of file message.hpp.

◆ MessageWriter

template<MessageTrait T>
using helios::ecs::MessageWriter = PmrBasicMessageWriter<T>

Alias for BasicMessageWriter bound to a PMR allocator.

The canonical message writer type for system parameters. Users who need a different allocator can use BasicMessageWriter directly.

Template Parameters
TMessage type satisfying MessageTrait
void MySystem(MessageWriter<DeathEvent> writer) {
writer.Write(DeathEvent{...});
}
void Write(U &&message) const
Writes a single message to the local queue.
Definition writer.hpp:49
PmrBasicMessageWriter< T > MessageWriter
Alias for BasicMessageWriter bound to a PMR allocator.
Definition writer.hpp:97

Definition at line 97 of file writer.hpp.

◆ MutBasicQuery

template<typename Alloc, QueryArg... Args>
using helios::ecs::MutBasicQuery = BasicQuery<World, Alloc, Args...>

Definition at line 2222 of file query.hpp.

◆ MutBasicQueryWithEntity

template<typename Alloc, QueryArg... Args>
using helios::ecs::MutBasicQueryWithEntity = BasicQueryWithEntity<World, Alloc, Args...>

Definition at line 2228 of file query.hpp.

◆ PmrBasicMessageWriter

template<MessageTrait T>
using helios::ecs::PmrBasicMessageWriter
Initial value:
Type-safe writer for regular messages with a configurable queue allocator.
Definition writer.hpp:26

Definition at line 81 of file writer.hpp.

◆ PmrBasicQuery

template<QueryArg... Args>
using helios::ecs::PmrBasicQuery
Initial value:
Query result object for iterating over matching entities and components.
Definition query.hpp:659

Definition at line 2235 of file query.hpp.

◆ PmrBasicQueryWithEntity

template<QueryArg... Args>
using helios::ecs::PmrBasicQueryWithEntity
Initial value:
Wrapper that provides entity-aware iteration over query results.
Definition query.hpp:80

Definition at line 2243 of file query.hpp.

◆ PmrCmdQueue

using helios::ecs::PmrCmdQueue = CmdQueue<std::pmr::polymorphic_allocator<std::byte>>

Command queue for deferred ECS operations that uses a polymorphic allocator.

Provides a queue for commands that will be executed during World::Update(). Commands are executed in the order they were enqueued, ensuring predictable behavior.

Note
Not thread-safe.

Definition at line 174 of file queue.hpp.

◆ PmrConsumedMessagesRegistry

Initial value:
std::pmr::polymorphic_allocator<std::byte>>
Per-system registry for tracking consumed message indices.

Definition at line 404 of file consumed_registry.hpp.

◆ PmrEntityCmdBuffer

Initial value:

Command buffer for deferred entity operations that uses a polymorphic allocator.

Collects commands and then pushes them into a queue. Commands are enqueued in the order they were added, ensuring predictable behavior.

Note
Not thread-safe.
Template Parameters
AllocatorAllocator type for command storage (default: std::allocator<std::byte>)

Definition at line 280 of file entity_buffer.hpp.

◆ PmrMessageQueue

Initial value:
Queue for managing multiple message types using type-erased contiguous storage.
Definition queue.hpp:26

Definition at line 362 of file queue.hpp.

◆ PmrReadOnlyBasicQuery

template<QueryArg... Args>
using helios::ecs::PmrReadOnlyBasicQuery
Initial value:

Definition at line 2239 of file query.hpp.

◆ PmrReadOnlyBasicQueryWithEntity

template<QueryArg... Args>
using helios::ecs::PmrReadOnlyBasicQueryWithEntity
Initial value:

Definition at line 2247 of file query.hpp.

◆ PmrWorldCmdBuffer

Initial value:

Command buffer for deferred World operations that uses a polymorphic allocator.

Collects commands and then pushes them into a queue. Commands are enqueued in the order they were added, ensuring predictable behavior.

Note
Not thread-safe.
Template Parameters
AllocatorAllocator type for command storage (default: std::allocator<std::byte>)

Definition at line 209 of file world_buffer.hpp.

◆ Query

template<QueryArg... Args>
using helios::ecs::Query = BasicQuery<World, std::pmr::polymorphic_allocator<>, Args...>

Alias for BasicQuery bound to World with a PMR allocator.

The canonical query type for system parameters. Users who need a different world type or allocator can use BasicQuery directly.

Template Parameters
ArgsComponent access types and optional With/Without filters
void MySystem(Query<Transform&, const Velocity&, With<Player>> query) {
for (auto&& [transform, velocity] : query) { ... }
}
BasicQuery< World, std::pmr::polymorphic_allocator<>, Args... > Query
Alias for BasicQuery bound to World with a PMR allocator.
Definition query.hpp:2264

Definition at line 2264 of file query.hpp.

◆ QueryIter

template<typename... Components>
using helios::ecs::QueryIter = BasicQueryIter<false, Components...>

Iterator for query results without entity information.

Provides bidirectional iteration over entities matching the query criteria, returning tuples of requested component references/values. Supports all access patterns including const ref, mutable ref, rvalue ref (move), value copy, and nullable pointer (T*, const T*).

Note
Not thread-safe.
Template Parameters
ComponentsRequested component access types (may include const qualifiers, references, T*, const T*)

Definition at line 302 of file iterator.hpp.

◆ QueryWithEntityIter

template<typename... Components>
using helios::ecs::QueryWithEntityIter = BasicQueryWithEntityIter<false, Components...>

Iterator for query results including the entity.

Same as BasicQueryIter but each dereferenced value is a tuple starting with the Entity, followed by the requested component access values.

Note
Not thread-safe.
Template Parameters
ComponentsRequested component access types

Definition at line 731 of file iterator.hpp.

◆ ReadOnlyBasicQuery

template<typename Alloc, QueryArg... Args>
using helios::ecs::ReadOnlyBasicQuery = BasicQuery<const World, Alloc, Args...>

Definition at line 2225 of file query.hpp.

◆ ReadOnlyBasicQueryWithEntity

template<typename Alloc, QueryArg... Args>
using helios::ecs::ReadOnlyBasicQueryWithEntity
Initial value:
BasicQueryWithEntity<const World, Alloc, Args...>
The World class manages entities with their components and systems.
Definition world.hpp:39

Definition at line 2231 of file query.hpp.

◆ ReadOnlyQueryIter

template<typename... Components>
using helios::ecs::ReadOnlyQueryIter = BasicQueryIter<true, Components...>

Read-only iterator for query results without entity information.

Provides bidirectional iteration over entities matching the query criteria, returning tuples of requested component references/values. Supports all access patterns including const ref, mutable ref, rvalue ref (move), value copy, and nullable pointer (T*, const T*).

Note
Not thread-safe.
Template Parameters
ComponentsRequested component access types (may include const qualifiers, references, T*, const T*)

Definition at line 315 of file iterator.hpp.

◆ ReadOnlyQueryWithEntityIter

template<typename... Components>
using helios::ecs::ReadOnlyQueryWithEntityIter
Initial value:
BasicQueryWithEntityIter<true, Components...>
Iterator for query results including the entity.
Definition iterator.hpp:330

Read-only iterator for query results including the entity.

Same as BasicQueryIter but each dereferenced value is a tuple starting with the Entity, followed by the requested component access values.

Note
Not thread-safe.
Template Parameters
ComponentsRequested component access types

Definition at line 741 of file iterator.hpp.

◆ ResourceTypeId

Type id for resources.

Definition at line 17 of file resource.hpp.

◆ ResourceTypeIndex

Type index for resources.

Definition at line 14 of file resource.hpp.

◆ RunCondition

using helios::ecs::RunCondition = std::function<bool(World&, SystemLocalData&)>

Type-erased run condition: returns bool, receives World& + local data.

Definition at line 20 of file run_condition.hpp.

◆ ScheduleResult

template<typename T>
using helios::ecs::ScheduleResult = std::expected<T, ScheduleError>

Result type for schedule operations that can fail.

Definition at line 173 of file schedule.hpp.

◆ ScheduleTypeId

Type id for schedules.

Definition at line 44 of file schedule.hpp.

◆ ScheduleTypeIndex

Type index for schedules.

Definition at line 41 of file schedule.hpp.

◆ StageTypeId

Type id for stages.

Definition at line 15 of file stage.hpp.

◆ StageTypeIndex

Type index for stages.

Definition at line 12 of file stage.hpp.

◆ SystemCallable

using helios::ecs::SystemCallable = std::function<void(World&, SystemLocalData&)>

Definition at line 21 of file system_storage.hpp.

◆ SystemSetTypeId

Type id for system sets.

Definition at line 22 of file system_set.hpp.

◆ SystemSetTypeIndex

Type index for system sets.

Definition at line 19 of file system_set.hpp.

◆ SystemTypeId

Type id for systems.

Definition at line 16 of file system.hpp.

◆ SystemTypeIndex

Type index for systems.

Definition at line 19 of file system.hpp.

Enumeration Type Documentation

◆ ComponentStorageType

enum class helios::ecs::ComponentStorageType : uint8_t
strong

Storage type for components.

Enumerator
kArchetype 

Component is stored in an archetype.

kSparseSet 

Component is stored in a sparse set.

Definition at line 20 of file component.hpp.

◆ DagErrorKind

enum class helios::ecs::DagErrorKind : uint8_t
strong
Enumerator
kUnknownNode 
kCycleDetected 

Definition at line 15 of file dag.hpp.

◆ ExecutorKind

enum class helios::ecs::ExecutorKind : uint8_t
strong

Kind of executor to use for schedule execution.

Enumerator
kMainThread 

Systems run sequentially on the calling (main) thread. Required for APIs with main-thread affinity (rendering, platform).

kSingleThreaded 

Systems run sequentially on a single thread.

kMultiThreaded 

Systems run in parallel using work-stealing.

Definition at line 11 of file executor.hpp.

◆ MessageClearPolicy

enum class helios::ecs::MessageClearPolicy : uint8_t
strong

Policy for message clearing behavior.

Enumerator
kAutomatic 

Messages are automatically cleared after double buffer cycle.

kManual 

Messages persist until manually cleared.

Definition at line 17 of file message.hpp.

◆ ScheduleErrorKind

enum class helios::ecs::ScheduleErrorKind : uint8_t
strong

Kind of error produced during schedule compilation.

Enumerator
kUnknown 
kCycleDetected 
kAmbiguousAccess 
kUnknownSet 
kUnknownNode 

Definition at line 156 of file schedule.hpp.

Function Documentation

◆ AddComponentsCmd()

template<ComponentTrait... Us>
helios::ecs::AddComponentsCmd ( Entity ,
Us && ... ) -> AddComponentsCmd< std::remove_cvref_t< Us >... >

◆ BuildPolicyFromParams()

template<typename... Params>
AccessPolicy helios::ecs::BuildPolicyFromParams ( )
nodiscardconstexpr

Builds an AccessPolicy by calling RegisterAccess on each system parameter type.

Template Parameters
ParamsSystem parameter types
Returns
The accumulated access policy

Definition at line 19 of file param_policy.hpp.

◆ BuildPolicyFromSystem()

template<SystemTrait T>
AccessPolicy helios::ecs::BuildPolicyFromSystem ( )
nodiscardconstexpr

Deduces parameter types from the system's operator() signature and builds the access policy.

Template Parameters
TSystem type satisfying SystemTrait
Returns
The accumulated access policy

Definition at line 32 of file param_policy.hpp.

◆ ComponentNameOf() [1/2]

template<ComponentTrait T>
std::string_view helios::ecs::ComponentNameOf ( )
nodiscardconstexprnoexcept

Component name for debugging and serialization.

Template Parameters
TComponent type
Returns
Component name

Definition at line 76 of file component.hpp.

◆ ComponentNameOf() [2/2]

template<ComponentTrait T>
std::string_view helios::ecs::ComponentNameOf ( const T & )
nodiscardconstexprnoexcept

Component name for debugging and serialization.

Template Parameters
TComponent type
Parameters
instanceComponent instance
Returns
Component name

Definition at line 91 of file component.hpp.

◆ ComponentStorageTypeOf() [1/2]

template<ComponentTrait T>
ComponentStorageType helios::ecs::ComponentStorageTypeOf ( )
nodiscardconstevalnoexcept

Component storage type.

If component does not provide a storage type, it defaults to:

Definition at line 105 of file component.hpp.

◆ ComponentStorageTypeOf() [2/2]

template<ComponentTrait T>
ComponentStorageType helios::ecs::ComponentStorageTypeOf ( const T & )
nodiscardconstevalnoexcept

Component storage type.

If component does not provide a storage type, it defaults to ComponentStorageType::kArchetype.

Template Parameters
TComponent type
Parameters
instanceComponent instance
Returns
Component storage type

Definition at line 126 of file component.hpp.

◆ DeclareQueryAccess()

template<typename... AccessTypes>
void helios::ecs::DeclareQueryAccess ( AccessPolicyBuilder & builder)
constexpr

Declares component access using query access specifiers.

Template Parameters
AccessTypesComponent access types (const T&, T&, etc.)
Parameters
builderAccess policy builder

Definition at line 49 of file access_decl.hpp.

◆ DeclareReadComponents()

template<ComponentTrait... Cs>
requires utils::UniqueTypes<Cs...>
void helios::ecs::DeclareReadComponents ( AccessPolicyBuilder & builder)
constexpr

Declares read-only component access.

Template Parameters
CsComponent types
Parameters
builderAccess policy builder

Definition at line 28 of file access_decl.hpp.

◆ DeclareWriteComponents()

template<ComponentTrait... Cs>
requires utils::UniqueTypes<Cs...>
void helios::ecs::DeclareWriteComponents ( AccessPolicyBuilder & builder)
constexpr

Declares mutable component access.

Template Parameters
CsComponent types
Parameters
builderAccess policy builder

Definition at line 39 of file access_decl.hpp.

◆ FunctionCmd()

template<typename G>
helios::ecs::FunctionCmd ( G && ) -> FunctionCmd< std::remove_cvref_t< G > >

◆ IsResourceThreadSafe() [1/2]

template<ResourceTrait T>
bool helios::ecs::IsResourceThreadSafe ( )
nodiscardconstevalnoexcept

Checks if a resource type is thread-safe.

Template Parameters
TResource type
Returns
True if resource is thread-safe, false otherwise

Definition at line 119 of file resource.hpp.

◆ IsResourceThreadSafe() [2/2]

template<ResourceTrait T>
bool helios::ecs::IsResourceThreadSafe ( const T & )
nodiscardconstevalnoexcept

Checks if a resource type is thread-safe.

Template Parameters
TResource type
Parameters
resourceResource instance
Returns
True if resource is thread-safe, false otherwise

Definition at line 130 of file resource.hpp.

◆ MessageClearPolicyOf() [1/2]

template<AnyMessageTrait T>
MessageClearPolicy helios::ecs::MessageClearPolicyOf ( )
nodiscardconstevalnoexcept

Gets the clear policy of an message.

Returns provided policy or MessageClearPolicy::kAutomatic as default.

Template Parameters
TMessage type
Returns
Message clear policy

Definition at line 126 of file message.hpp.

◆ MessageClearPolicyOf() [2/2]

template<AnyMessageTrait T>
MessageClearPolicy helios::ecs::MessageClearPolicyOf ( const T & )
nodiscardconstevalnoexcept

Gets the clear policy of an message.

Returns provided policy or MessageClearPolicy::kAutomatic as default.

Template Parameters
TMessage type
Parameters
instanceMessage instance
Returns
Message clear policy

Definition at line 143 of file message.hpp.

◆ MessageNameOf() [1/2]

template<AnyMessageTrait T>
std::string_view helios::ecs::MessageNameOf ( )
nodiscardconstexprnoexcept

Gets the name of an message.

Returns provided name or type name as fallback.

Template Parameters
TMessage type
Returns
Message name

Definition at line 97 of file message.hpp.

◆ MessageNameOf() [2/2]

template<AnyMessageTrait T>
std::string_view helios::ecs::MessageNameOf ( const T & )
nodiscardconstexprnoexcept

Gets the name of an message.

Returns provided name or type name as fallback.

Template Parameters
TMessage type
Parameters
instanceMessage instance
Returns
Message name

Definition at line 113 of file message.hpp.

◆ RegisterParamAccess()

template<typename... Params>
void helios::ecs::RegisterParamAccess ( AccessPolicyBuilder & builder)
constexpr

Registers access declarations for each parameter type.

Template Parameters
ParamsSystem parameter types
Parameters
builderAccess policy builder to accumulate into

Definition at line 16 of file access_decl.hpp.

◆ ResourceCallOnInsert()

template<ResourceTrait T>
void helios::ecs::ResourceCallOnInsert ( T & resource,
World & world )
constexprnoexcept

Calls insertion callback for a resource type if it exists.

Template Parameters
TResource type
Parameters
resourceResource instance
worldReference to the world

Definition at line 142 of file resource.hpp.

◆ ResourceCallOnRemove()

template<ResourceTrait T>
void helios::ecs::ResourceCallOnRemove ( T & resource,
World & world )
constexprnoexcept

Calls removal callback for a resource type if it exists.

Template Parameters
TResource type
Parameters
resourceResource instance
worldReference to the world

Definition at line 155 of file resource.hpp.

◆ ResourceNameOf() [1/2]

template<ResourceTrait T>
std::string_view helios::ecs::ResourceNameOf ( )
nodiscardconstexprnoexcept

Gets name for a resource type.

Template Parameters
TResource type
Returns
Name of the resource

Definition at line 93 of file resource.hpp.

◆ ResourceNameOf() [2/2]

template<ResourceTrait T>
std::string_view helios::ecs::ResourceNameOf ( const T & )
nodiscardconstexprnoexcept

Gets name for a resource type.

Template Parameters
TResource type
Parameters
resourceResource instance
Returns
Name of the resource

Definition at line 108 of file resource.hpp.

◆ ScheduleNameOf()

template<ScheduleTrait T>
std::string_view helios::ecs::ScheduleNameOf ( const T & = {})
nodiscardconstexprnoexcept

Schedule name for debugging and serialization.

Template Parameters
TSchedule type
Parameters
instanceSchedule instance
Returns
Schedule name

Definition at line 71 of file schedule.hpp.

◆ StageNameOf()

template<StageTrait T>
std::string_view helios::ecs::StageNameOf ( const T & = {})
nodiscardconstexprnoexcept

Stage name for debugging and serialization.

Template Parameters
TStage type
Parameters
instanceStage instance
Returns
Stage name

Definition at line 42 of file stage.hpp.

◆ SystemNameOf() [1/2]

template<SystemTrait T>
std::string_view helios::ecs::SystemNameOf ( )
nodiscardconstexprnoexcept

Gets the name of a system.

Returns provided name or type name as fallback.

Template Parameters
TSystem type
Returns
System name

Definition at line 125 of file system.hpp.

◆ SystemNameOf() [2/2]

template<SystemTrait T>
std::string_view helios::ecs::SystemNameOf ( const T & )
nodiscardconstexprnoexcept

Gets the name of a system.

Template Parameters
TSystem type
Parameters
instanceSystem instance
Returns
System name

Definition at line 140 of file system.hpp.

◆ SystemSetNameOf() [1/2]

template<SystemSetTrait T>
std::string_view helios::ecs::SystemSetNameOf ( )
nodiscardconstexprnoexcept

System set name for debugging and serialization.

Template Parameters
TSystem set type
Returns
System set name

Definition at line 49 of file system_set.hpp.

◆ SystemSetNameOf() [2/2]

template<SystemSetTrait T>
std::string_view helios::ecs::SystemSetNameOf ( const T & )
nodiscardconstexprnoexcept

System set name for debugging and serialization.

Template Parameters
TSystem set type
Parameters
instanceSystem set instance
Returns
System set name

Definition at line 64 of file system_set.hpp.

◆ TryAddComponentsCmd()

template<ComponentTrait... Us>
helios::ecs::TryAddComponentsCmd ( Entity ,
Us && ... ) -> TryAddComponentsCmd< std::remove_cvref_t< Us >... >