CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TComponentType< C > Class Template Reference

An implementation of the ComponentType interface that implements type-erased operations for components. More...

#include <CeresEngine/Entity/Component.hpp>

Inheritance diagram for CeresEngine::TComponentType< C >:
CeresEngine::ComponentType

Public Member Functions

const Class * getClass () const noexcept final
 Returns the meta class of the component.
 
Type getType () const noexcept final
 Returns the meta type of the component.
 
const Class * getAccessorClass () const noexcept final
 Returns the component accessor meta class.
 
Type getAccessorType () const noexcept final
 Returns the component accessor meta type.
 
Box getAny (AbstractComponent &component) const noexcept final
 
Box getAny (const AbstractComponent &component) const noexcept final
 
void setAny (AbstractComponent &component, const Box &value) const noexcept final
 
void setAny (AbstractComponent &component, Box &&value) const noexcept final
 
void emitComponentAdded (const Entity &entity) const final
 
void emitComponentRemoved (const Entity &entity) const final
 
- Public Member Functions inherited from CeresEngine::ComponentType
 ComponentType (const ComponentType &)=delete
 
ComponentType & operator= (const ComponentType &)=delete
 
 ComponentType (ComponentType &&)=delete
 
ComponentType & operator= (ComponentType &&)=delete
 

Static Protected Member Functions

static ComponentID getComponentID () noexcept
 

Private Member Functions

 TComponentType ()
 Creates a new instance of a component type object for the given C component type.
 

Friends

class ComponentType
 

Additional Inherited Members

- Static Public Member Functions inherited from CeresEngine::ComponentType
template<typename C >
static const TComponentType< C > & get () noexcept
 The type instance for a component of the C.
 
- Public Attributes inherited from CeresEngine::ComponentType
const ComponentID componentID
 The component type ID.
 
const ComponentMask componentMask
 
- Protected Member Functions inherited from CeresEngine::ComponentType
 ComponentType (const ComponentID componentID)
 
- Static Protected Attributes inherited from CeresEngine::ComponentType
static ComponentID nextComponentID
 The next component ID to be statically allocated by the compiler.
 

Detailed Description

template<typename C>
class CeresEngine::TComponentType< C >

An implementation of the ComponentType interface that implements type-erased operations for components.

Constructor & Destructor Documentation

◆ TComponentType()

template<typename C >
CeresEngine::TComponentType< C >::TComponentType ( )
inlineexplicitprivate

Creates a new instance of a component type object for the given C component type.

Member Function Documentation

◆ emitComponentAdded()

template<typename C >
void CeresEngine::TComponentType< C >::emitComponentAdded ( const Entity &  entity) const
finalvirtual

◆ emitComponentRemoved()

template<typename C >
void CeresEngine::TComponentType< C >::emitComponentRemoved ( const Entity &  entity) const
finalvirtual

◆ getAccessorClass()

template<typename C >
const Class * CeresEngine::TComponentType< C >::getAccessorClass ( ) const
inlinefinalvirtualnoexcept

Returns the component accessor meta class.

Implements CeresEngine::ComponentType.

◆ getAccessorType()

template<typename C >
Type CeresEngine::TComponentType< C >::getAccessorType ( ) const
inlinefinalvirtualnoexcept

Returns the component accessor meta type.

Implements CeresEngine::ComponentType.

◆ getAny() [1/2]

template<typename C >
Box CeresEngine::TComponentType< C >::getAny ( AbstractComponent &  component) const
inlinefinalvirtualnoexcept

◆ getAny() [2/2]

template<typename C >
Box CeresEngine::TComponentType< C >::getAny ( const AbstractComponent &  component) const
inlinefinalvirtualnoexcept

◆ getClass()

template<typename C >
const Class * CeresEngine::TComponentType< C >::getClass ( ) const
inlinefinalvirtualnoexcept

Returns the meta class of the component.

Implements CeresEngine::ComponentType.

◆ getComponentID()

template<typename C >
static ComponentID CeresEngine::TComponentType< C >::getComponentID ( )
inlinestaticprotectednoexcept
Returns
This component type ID

◆ getType()

template<typename C >
Type CeresEngine::TComponentType< C >::getType ( ) const
inlinefinalvirtualnoexcept

Returns the meta type of the component.

Implements CeresEngine::ComponentType.

◆ setAny() [1/2]

template<typename C >
void CeresEngine::TComponentType< C >::setAny ( AbstractComponent &  component,
Box &&  value 
) const
inlinefinalvirtualnoexcept

◆ setAny() [2/2]

template<typename C >
void CeresEngine::TComponentType< C >::setAny ( AbstractComponent &  component,
const Box &  value 
) const
inlinefinalvirtualnoexcept

Friends And Related Symbol Documentation

◆ ComponentType

template<typename C >
friend class ComponentType
friend

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