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

Message sent when a component is added. More...

#include <builtin_messages.hpp>

Public Member Functions

constexpr ComponentAddedMsg (Entity entity) noexcept
 Constructs component added message.
constexpr ComponentAddedMsg (const ComponentAddedMsg &) noexcept=default
constexpr ComponentAddedMsg (ComponentAddedMsg &&) noexcept=default
constexpr ~ComponentAddedMsg () noexcept=default
constexpr ComponentAddedMsgoperator= (const ComponentAddedMsg &) noexcept=default
constexpr ComponentAddedMsgoperator= (ComponentAddedMsg &&) noexcept=default
constexpr Entity GetEntity () const noexcept
 Gets the entity that the component was added to.

Static Public Attributes

static constexpr std::string_view kName = "ComponentAddedMsg"
static constexpr auto kClearPolicy = MessageClearPolicy::kAutomatic
static constexpr bool kConsumable = false
static constexpr bool kAsync = false

Detailed Description

template<ComponentTrait T>
class helios::ecs::ComponentAddedMsg< T >

Message sent when a component is added.

Definition at line 86 of file builtin_messages.hpp.

Constructor & Destructor Documentation

◆ ComponentAddedMsg() [1/3]

template<ComponentTrait T>
helios::ecs::ComponentAddedMsg< T >::ComponentAddedMsg ( Entity entity)
inlineexplicitconstexprnoexcept

Constructs component added message.

Warning
Triggers assertion if entity is invalid.
Parameters
entityEntity that component was added to

Definition at line 98 of file builtin_messages.hpp.

◆ ComponentAddedMsg() [2/3]

template<ComponentTrait T>
helios::ecs::ComponentAddedMsg< T >::ComponentAddedMsg ( const ComponentAddedMsg< T > & )
constexprdefaultnoexcept

◆ ComponentAddedMsg() [3/3]

template<ComponentTrait T>
helios::ecs::ComponentAddedMsg< T >::ComponentAddedMsg ( ComponentAddedMsg< T > && )
constexprdefaultnoexcept

◆ ~ComponentAddedMsg()

template<ComponentTrait T>
helios::ecs::ComponentAddedMsg< T >::~ComponentAddedMsg ( )
constexprdefaultnoexcept

Member Function Documentation

◆ GetEntity()

template<ComponentTrait T>
Entity helios::ecs::ComponentAddedMsg< T >::GetEntity ( ) const
inlinenodiscardconstexprnoexcept

Gets the entity that the component was added to.

Returns
Entity that the component was added to

Definition at line 116 of file builtin_messages.hpp.

◆ operator=() [1/2]

template<ComponentTrait T>
ComponentAddedMsg & helios::ecs::ComponentAddedMsg< T >::operator= ( ComponentAddedMsg< T > && )
constexprdefaultnoexcept

◆ operator=() [2/2]

template<ComponentTrait T>
ComponentAddedMsg & helios::ecs::ComponentAddedMsg< T >::operator= ( const ComponentAddedMsg< T > & )
constexprdefaultnoexcept

Member Data Documentation

◆ kAsync

template<ComponentTrait T>
bool helios::ecs::ComponentAddedMsg< T >::kAsync = false
staticconstexpr

Definition at line 91 of file builtin_messages.hpp.

◆ kClearPolicy

template<ComponentTrait T>
auto helios::ecs::ComponentAddedMsg< T >::kClearPolicy = MessageClearPolicy::kAutomatic
staticconstexpr

Definition at line 89 of file builtin_messages.hpp.

◆ kConsumable

template<ComponentTrait T>
bool helios::ecs::ComponentAddedMsg< T >::kConsumable = false
staticconstexpr

Definition at line 90 of file builtin_messages.hpp.

◆ kName

template<ComponentTrait T>
std::string_view helios::ecs::ComponentAddedMsg< T >::kName = "ComponentAddedMsg"
staticconstexpr

Definition at line 88 of file builtin_messages.hpp.