Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
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 size_t TypeId () const noexcept
 
constexpr size_t Size () const noexcept
 
constexpr size_t Alignment () const noexcept
 
constexpr bool IsTrivial () const noexcept
 

Static Public Member Functions

template<ComponentTrait T>
static constexpr ComponentTypeInfo Create () noexcept
 

Detailed Description

Component type info for runtime operations.

Definition at line 128 of file component.hpp.

Constructor & Destructor Documentation

◆ ComponentTypeInfo() [1/2]

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

◆ ComponentTypeInfo() [2/2]

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

◆ ~ComponentTypeInfo()

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

Member Function Documentation

◆ Alignment()

constexpr size_t helios::ecs::ComponentTypeInfo::Alignment ( ) const
inlineconstexprnoexcept

Definition at line 150 of file component.hpp.

150{ return alignment_; }

◆ Create()

template<ComponentTrait T>
static constexpr ComponentTypeInfo helios::ecs::ComponentTypeInfo::Create ( )
inlinestaticconstexprnoexcept

Definition at line 138 of file component.hpp.

138 {
141 }
BasicQuery< World, Allocator, Components... > Query
Type alias for query with mutable world access.
Definition query.hpp:2481
static constexpr size_t kSize
Definition component.hpp:97
static constexpr bool kIsTrivial
Definition component.hpp:92
static constexpr size_t kAlignment
Definition component.hpp:98

◆ IsTrivial()

constexpr bool helios::ecs::ComponentTypeInfo::IsTrivial ( ) const
inlineconstexprnoexcept

Definition at line 151 of file component.hpp.

151{ return is_trivial_; }

◆ operator!=()

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

Definition at line 144 of file component.hpp.

144{ return !(*this == other); }

◆ operator<()

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

Definition at line 146 of file component.hpp.

146{ return type_id_ < other.type_id_; }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

Definition at line 143 of file component.hpp.

143{ return type_id_ == other.type_id_; }

◆ Size()

constexpr size_t helios::ecs::ComponentTypeInfo::Size ( ) const
inlineconstexprnoexcept

Definition at line 149 of file component.hpp.

149{ return size_; }

◆ TypeId()

constexpr size_t helios::ecs::ComponentTypeInfo::TypeId ( ) const
inlineconstexprnoexcept

Definition at line 148 of file component.hpp.

148{ return type_id_; }