Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
ECS::IEntity Class Referenceabstract

#include <IEntity.h>

+ Inheritance diagram for ECS::IEntity:

Public Member Functions

 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 ()
 

Protected Attributes

DECLARE_STATIC_LOGGER EntityId m_EntityID
 
bool m_Active
 

Static Protected Attributes

static std::shared_mutex s_ComponentManagerLock
 

Private Attributes

ComponentManagerm_ComponentManagerInstance
 

Friends

class EntityManager
 

Detailed Description

Definition at line 27 of file IEntity.h.

Constructor & Destructor Documentation

◆ IEntity()

ECS::IEntity::IEntity ( )

Definition at line 21 of file IEntity.cpp.

◆ ~IEntity()

ECS::IEntity::~IEntity ( )
virtual

Definition at line 25 of file IEntity.cpp.

Member Function Documentation

◆ AddComponent()

template<class T , class ... P>
T * ECS::IEntity::AddComponent ( P &&...  param)
inline

Definition at line 61 of file IEntity.h.

◆ GetComponent()

template<class T >
T * ECS::IEntity::GetComponent ( ) const
inline

Definition at line 54 of file IEntity.h.

◆ GetEntityID()

EntityId ECS::IEntity::GetEntityID ( ) const
inline

Definition at line 87 of file IEntity.h.

◆ GetStaticEntityTypeID()

virtual EntityTypeId ECS::IEntity::GetStaticEntityTypeID ( ) const
pure virtual

◆ IsActive()

bool ECS::IEntity::IsActive ( ) const
inline

Definition at line 91 of file IEntity.h.

◆ OnDisable()

virtual void ECS::IEntity::OnDisable ( )
inlinevirtual

Definition at line 94 of file IEntity.h.

◆ OnEnable()

virtual void ECS::IEntity::OnEnable ( )
inlinevirtual

Definition at line 93 of file IEntity.h.

◆ operator!=() [1/2]

bool ECS::IEntity::operator!= ( const IEntity rhs) const
inline

Definition at line 80 of file IEntity.h.

◆ operator!=() [2/2]

bool ECS::IEntity::operator!= ( const IEntity rhs) const
inline

Definition at line 82 of file IEntity.h.

◆ operator==() [1/2]

bool ECS::IEntity::operator== ( const IEntity rhs) const
inline

Definition at line 79 of file IEntity.h.

◆ operator==() [2/2]

bool ECS::IEntity::operator== ( const IEntity rhs) const
inline

Definition at line 81 of file IEntity.h.

◆ PassDataToAllComponents()

void ECS::IEntity::PassDataToAllComponents ( const ECS::CustomEvent evt)

Definition at line 51 of file IEntity.cpp.

◆ RemoveAllComponents()

void ECS::IEntity::RemoveAllComponents ( )

Definition at line 45 of file IEntity.cpp.

◆ RemoveComponent()

template<class T >
void ECS::IEntity::RemoveComponent ( )
inline

Definition at line 68 of file IEntity.h.

◆ SetActive()

void ECS::IEntity::SetActive ( bool  active)

Definition at line 28 of file IEntity.cpp.

Friends And Related Function Documentation

◆ EntityManager

friend class EntityManager
friend

Definition at line 29 of file IEntity.h.

Member Data Documentation

◆ m_Active

bool ECS::IEntity::m_Active
protected

Definition at line 46 of file IEntity.h.

◆ m_ComponentManagerInstance

ComponentManager* ECS::IEntity::m_ComponentManagerInstance
private

Definition at line 34 of file IEntity.h.

◆ m_EntityID

DECLARE_STATIC_LOGGER EntityId ECS::IEntity::m_EntityID
protected

Definition at line 43 of file IEntity.h.

◆ s_ComponentManagerLock

std::shared_mutex ECS::IEntity::s_ComponentManagerLock
staticprotected

Definition at line 47 of file IEntity.h.


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