Skip to main content

types Namespace

Definition

namespace helios::ecs::types { ... }

Classes Index

structComponentOps

Container for type-erased component lifecycle function pointers. More...

classComponentTypeId<THandle>

Unique type identifier for component types, scoped per domain. More...

structEntityHandle<TDomainTag>

A versioned handle for referencing entities in a registry. More...

structno_init_t

Tag type used to indicate skipping default initialization. More...

structStrongId<Tag>

A strongly-typed identifier using tag-based type safety. More...

Typedefs Index

usingVersionId = uint32_t

Version number for detecting stale entity references. More...

usingEntityId = uint32_t

Unique identifier for an entity within an EntityPool. More...

usingStrongId_t = uint32_t

Underlying integer type for all strong identifiers. More...

Functions Index

constexpr uint32_tfnv1a_hash (const std::string_view str) noexcept

Computes a 32-bit FNV-1a hash from a string. More...

Variables Index

constexpr autoInvalidVersion = VersionId{0}

Sentinel version indicating an invalid or uninitialized handle. More...

constexpr autoInitialVersion = VersionId{1}

The initial version assigned to newly created entities. More...

constexpr size_tEntityTombstone = std::numeric_limits<size_t>::max()

Sentinel value indicating an invalid or removed sparse index. More...

constexpr no_init_tno_init

Tag constant for requesting uninitialized construction. More...

Typedefs

EntityId

using helios::ecs::types::EntityId = typedef uint32_t

Unique identifier for an entity within an EntityPool.

Used as the index into the sparse array of an EntityPool. Combined with a VersionId in an EntityHandle, it enables safe entity references that detect stale handles after entity removal.

See Also

EntityHandle

See Also

VersionId

See Also

EntityPool

Definition at line 44 of file TypeDefs.ixx.

44 using EntityId = uint32_t;

StrongId_t

using helios::ecs::types::StrongId_t = typedef uint32_t

Underlying integer type for all strong identifiers.

StrongId_t is the common numeric representation used by StrongId<Tag> and related lookup structures (e.g., EntityRegistry, LinearLookupStrategy, HashedLookupStrategy). Centralising the typedef ensures a consistent width across the entire identifier subsystem.

See Also

helios::ecs::types::StrongId

See Also

EntityId

See Also

VersionId

Definition at line 72 of file TypeDefs.ixx.

72 using StrongId_t = uint32_t;

VersionId

using helios::ecs::types::VersionId = typedef uint32_t

Version number for detecting stale entity references.

Each entity slot in an EntityPool has an associated version that is incremented when the entity is removed. EntityHandles store both the EntityId and VersionId, allowing the pool to detect when a handle refers to a recycled slot.

A valid version starts at 1 (uninitialized handles have version 0).

See Also

EntityHandle

See Also

EntityId

See Also

EntityPool

Definition at line 31 of file TypeDefs.ixx.

31 using VersionId = uint32_t;

Functions

fnv1a_hash()

constexpr uint32_t helios::ecs::types::fnv1a_hash (const std::string_view str)
constexpr noexcept

Computes a 32-bit FNV-1a hash from a string.

Implements the Fowler–Noll–Vo hash function (FNV-1a variant), a fast, non-cryptographic hash suitable for hash tables and identifier generation. The function is constexpr, enabling compile-time hashing of string literals.

Definition at line 49 of file FuncDefs.ixx.

49 [[nodiscard]] constexpr uint32_t fnv1a_hash(const std::string_view str) noexcept {
50 uint32_t hash = 2166136261U;
51 for (char c: str) {
52 hash ^= static_cast<uint8_t>(c);
53 hash *= 16777619U;
54 }
55 return hash;
56 }

Variables

EntityTombstone

constexpr size_t helios::ecs::types::EntityTombstone = std::numeric_limits<size_t>::max()
constexpr

Sentinel value indicating an invalid or removed sparse index.

Used in sparse-set data structures (e.g., EntityPool, EntityPool) to mark slots that do not contain valid entity references. When a slot contains this value, the corresponding entity has been removed or was never assigned.

See Also

EntityPool

See Also

EntityPool

Definition at line 57 of file TypeDefs.ixx.

57 constexpr size_t EntityTombstone = std::numeric_limits<size_t>::max();

InitialVersion

constexpr auto helios::ecs::types::InitialVersion = VersionId{1}
constexpr

The initial version assigned to newly created entities.

Versions start at 1 to distinguish valid handles from default-initialized handles that may have a version of 0.

Definition at line 31 of file EntityHandle.ixx.

31 constexpr auto InitialVersion = VersionId{1};

InvalidVersion

constexpr auto helios::ecs::types::InvalidVersion = VersionId{0}
constexpr

Sentinel version indicating an invalid or uninitialized handle.

Definition at line 23 of file EntityHandle.ixx.

23 constexpr auto InvalidVersion = VersionId{0};

Referenced by helios::ecs::EntityRegistry< TDomainTag, TLookupStrategy, TAllowRemoval, TCapacity >::version.

no_init

constexpr no_init_t helios::ecs::types::no_init
constexpr

Tag constant for requesting uninitialized construction.

This is a convenience instance of no_init_t that can be passed to constructors supporting uninitialized construction.

 helios::engine::util::Guid id{helios::ecs::types::no_init};
See Also

no_init_t

See Also

helios::engine::util::Guid

Definition at line 121 of file TypeDefs.ixx.

121 inline constexpr no_init_t no_init;

The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.