Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
ECS::Entity< E > Class Template Reference

#include <Entity.h>

+ Inheritance diagram for ECS::Entity< E >:

Public Member Functions

EntityTypeId GetStaticEntityTypeID () const override
 
 Entity ()
 
virtual ~Entity ()
 
- Public Member Functions inherited from ECS::IEntity
 IEntity ()
 
virtual ~IEntity ()
 
template<class T >
T * GetComponent () const
 
template<class T , class ... P>
T * AddComponent (P &&... param)
 
template<class T >
void RemoveComponent ()
 
void RemoveAllComponents ()
 
void PassDataToAllComponents (const ECS::CustomEvent &evt)
 
bool operator== (const IEntity &rhs) const
 
bool operator!= (const IEntity &rhs) const
 
bool operator== (const IEntity *rhs) const
 
bool operator!= (const IEntity *rhs) const
 
virtual EntityTypeId GetStaticEntityTypeID () const =0
 
EntityId GetEntityID () const
 
void SetActive (bool active)
 
bool IsActive () const
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Static Public Attributes

static const EntityTypeId STATIC_ENTITY_TYPE_ID = util::Internal::FamilyTypeID<IEntity>::Get<E>()
 

Additional Inherited Members

- Protected Attributes inherited from ECS::IEntity
DECLARE_STATIC_LOGGER EntityId m_EntityID
 
bool m_Active
 
- Static Protected Attributes inherited from ECS::IEntity
static std::shared_mutex s_ComponentManagerLock
 

Detailed Description

template<class E>
class ECS::Entity< E >

Class: Entity

Summary: CRTP class. Any entity object should derive form the Entity class and passes itself as template parameter to the Entity class.

Author: Tobias Stein

Date: 30/09/2017

Typeparams:

E - Type of the e.

Definition at line 35 of file Entity.h.

Constructor & Destructor Documentation

◆ Entity()

template<class E >
ECS::Entity< E >::Entity ( )
inline

Definition at line 45 of file Entity.h.

◆ ~Entity()

template<class E >
virtual ECS::Entity< E >::~Entity ( )
inlinevirtual

Definition at line 48 of file Entity.h.

Member Function Documentation

◆ GetStaticEntityTypeID()

template<class E >
EntityTypeId ECS::Entity< E >::GetStaticEntityTypeID ( ) const
inlineoverridevirtual

Implements ECS::IEntity.

Definition at line 43 of file Entity.h.

Member Data Documentation

◆ STATIC_ENTITY_TYPE_ID

template<class E >
const EntityTypeId ECS::Entity< E >::STATIC_ENTITY_TYPE_ID = util::Internal::FamilyTypeID<IEntity>::Get<E>()
static

Definition at line 39 of file Entity.h.


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