Skip to main content

CommandBufferTypeId Class

Unique type identifier for command buffer types. More...

Declaration

class helios::engine::runtime::messaging::command::types::CommandBufferTypeId { ... }

Private Member Typedefs Index

usingComponentType = helios_engine_common_tag_CommandTypes

Friends Index

constexpr booloperator==

Public Constructors Index

CommandBufferTypeId (const size_t id)

Constructs a CommandBufferTypeId with a specific value. More...

CommandBufferTypeId (helios::ecs::types::no_init_t)

Constructs an uninitialized CommandBufferTypeId. More...

Public Member Functions Index

size_tvalue () const noexcept

Returns the underlying ID value. More...

Private Member Attributes Index

size_tid_ {0}

The underlying ID value. More...

Public Static Functions Index

template <typename T>
static CommandBufferTypeIdid ()

Returns the CommandBufferTypeId for a specific command type. More...

Description

Unique type identifier for command buffer types.

CommandBufferTypeId assigns a unique, monotonically increasing integer ID to each command buffer type at compile time. The ID is generated once per type via TypeIndexer and cached in a function-local static.

Used by CommandBufferRegistry as an index for O(1) type-based lookup.

See Also

CommandBufferRegistry

See Also

TypeIndexer

See Also

ResourceTypeId

Definition at line 30 of file CommandBufferTypeId.ixx.

Private Member Typedefs

ComponentType

using helios::engine::runtime::messaging::command::types::CommandBufferTypeId::ComponentType = helios_engine_common_tag_CommandTypes

Definition at line 37 of file CommandBufferTypeId.ixx.

37 using ComponentType = helios_engine_common_tag_CommandTypes;

Friends

operator==

friend constexpr bool CommandBufferTypeId, CommandBufferTypeId
constexpr noexcept default

Definition at line 90 of file CommandBufferTypeId.ixx.

Public Constructors

CommandBufferTypeId()

helios::engine::runtime::messaging::command::types::CommandBufferTypeId::CommandBufferTypeId (const size_t id)
inline explicit

Constructs a CommandBufferTypeId with a specific value.

Parameters
id

The type ID value.

Definition at line 53 of file CommandBufferTypeId.ixx.

53 explicit CommandBufferTypeId(const size_t id) : id_(id) {}

CommandBufferTypeId()

helios::engine::runtime::messaging::command::types::CommandBufferTypeId::CommandBufferTypeId (helios::ecs::types::no_init_t)
inline explicit

Constructs an uninitialized CommandBufferTypeId.

Parameters
no_init_t

Tag to indicate no initialization.

Definition at line 61 of file CommandBufferTypeId.ixx.

61 explicit CommandBufferTypeId(helios::ecs::types::no_init_t) {}

Public Member Functions

value()

size_t helios::engine::runtime::messaging::command::types::CommandBufferTypeId::value ()
inline noexcept

Returns the underlying ID value.

Returns

The numeric type ID.

Definition at line 69 of file CommandBufferTypeId.ixx.

70 return id_;
71 }

Private Member Attributes

id_

size_t helios::engine::runtime::messaging::command::types::CommandBufferTypeId::id_ {0}

The underlying ID value.

Definition at line 42 of file CommandBufferTypeId.ixx.

42 size_t id_{0};

Public Static Functions

id()

template <typename T>
CommandBufferTypeId helios::engine::runtime::messaging::command::types::CommandBufferTypeId::id ()
inline static

Returns the CommandBufferTypeId for a specific command type.

Uses TypeIndexer to generate a unique ID per type. The ID is generated once and cached.

Template Parameters
T

The command type.

Returns

The unique CommandBufferTypeId for type T.

Definition at line 85 of file CommandBufferTypeId.ixx.

86 static const size_t tid = helios::ecs::TypeIndexer<ComponentType>::typeIndex<T>();
88 }

Reference helios::engine::runtime::registerComponents.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.