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

Component type info for runtime operations. More...

#include <component.hpp>

Public Member Functions

constexpr ComponentTypeInfo (const ComponentTypeInfo &) noexcept=default
constexpr ComponentTypeInfo (ComponentTypeInfo &&) noexcept=default
constexpr ~ComponentTypeInfo () noexcept=default
constexpr ComponentTypeInfooperator= (const ComponentTypeInfo &) noexcept=default
constexpr ComponentTypeInfooperator= (ComponentTypeInfo &&) noexcept=default
constexpr bool operator== (const ComponentTypeInfo &other) const noexcept
constexpr bool operator!= (const ComponentTypeInfo &other) const noexcept
constexpr bool operator< (const ComponentTypeInfo &other) const noexcept
constexpr ComponentTypeIndex TypeIndex () const noexcept
 Get the component type index.
constexpr size_t Size () const noexcept
 Get the size of the component type.
constexpr size_t Alignment () const noexcept
 Get the alignment of the component type.
constexpr ComponentStorageType StorageType () const noexcept
 Get the storage type of the component type.
constexpr bool IsTag () const noexcept
 Check if the component type is a tag (empty).

Static Public Member Functions

template<ComponentTrait T>
static constexpr ComponentTypeInfo From () noexcept
 Create a ComponentTypeInfo from a component type.

Detailed Description

Component type info for runtime operations.

Definition at line 165 of file component.hpp.

Constructor & Destructor Documentation

◆ ComponentTypeInfo() [1/2]

helios::ecs::ComponentTypeInfo::ComponentTypeInfo ( const ComponentTypeInfo & )
constexprdefaultnoexcept

◆ ComponentTypeInfo() [2/2]

helios::ecs::ComponentTypeInfo::ComponentTypeInfo ( ComponentTypeInfo && )
constexprdefaultnoexcept

◆ ~ComponentTypeInfo()

helios::ecs::ComponentTypeInfo::~ComponentTypeInfo ( )
constexprdefaultnoexcept

Member Function Documentation

◆ Alignment()

size_t helios::ecs::ComponentTypeInfo::Alignment ( ) const
inlinenodiscardconstexprnoexcept

Get the alignment of the component type.

Returns
Alignment of the component type

Definition at line 217 of file component.hpp.

◆ From()

template<ComponentTrait T>
constexpr ComponentTypeInfo helios::ecs::ComponentTypeInfo::From ( )
inlinestaticnodiscardconstexprnoexcept

Create a ComponentTypeInfo from a component type.

Template Parameters
TComponent type
Returns
ComponentTypeInfo for the given component type

Definition at line 182 of file component.hpp.

◆ IsTag()

bool helios::ecs::ComponentTypeInfo::IsTag ( ) const
inlinenodiscardconstexprnoexcept

Check if the component type is a tag (empty).

Returns
True if the component type is a tag, false otherwise

Definition at line 233 of file component.hpp.

◆ operator!=()

bool helios::ecs::ComponentTypeInfo::operator!= ( const ComponentTypeInfo & other) const
inlineconstexprnoexcept

Definition at line 191 of file component.hpp.

◆ operator<()

bool helios::ecs::ComponentTypeInfo::operator< ( const ComponentTypeInfo & other) const
inlineconstexprnoexcept

Definition at line 195 of file component.hpp.

◆ operator=() [1/2]

ComponentTypeInfo & helios::ecs::ComponentTypeInfo::operator= ( ComponentTypeInfo && )
constexprdefaultnoexcept

◆ operator=() [2/2]

ComponentTypeInfo & helios::ecs::ComponentTypeInfo::operator= ( const ComponentTypeInfo & )
constexprdefaultnoexcept

◆ operator==()

bool helios::ecs::ComponentTypeInfo::operator== ( const ComponentTypeInfo & other) const
inlineconstexprnoexcept

Definition at line 188 of file component.hpp.

◆ Size()

size_t helios::ecs::ComponentTypeInfo::Size ( ) const
inlinenodiscardconstexprnoexcept

Get the size of the component type.

Returns
Size of the component type

Definition at line 211 of file component.hpp.

◆ StorageType()

ComponentStorageType helios::ecs::ComponentTypeInfo::StorageType ( ) const
inlinenodiscardconstexprnoexcept

Get the storage type of the component type.

Returns
Storage type of the component type

Definition at line 225 of file component.hpp.

◆ TypeIndex()

ComponentTypeIndex helios::ecs::ComponentTypeInfo::TypeIndex ( ) const
inlinenodiscardconstexprnoexcept

Get the component type index.

Returns
Component type index

Definition at line 203 of file component.hpp.