![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <ECS_Register.h>
Inheritance diagram for ComponentPool< T >:
Collaboration diagram for ComponentPool< T >:Public Member Functions | |
| ComponentPool () | |
| void | RemoveComponent (EntityID entity) override |
| template<typename... Args> | |
| void | AddComponent (EntityID entity, Args &&... args) |
| T & | GetComponent (EntityID entity) |
| bool | HasComponent (EntityID entity) const |
Public Member Functions inherited from IComponentPool | |
| virtual | ~IComponentPool ()=default |
Public Attributes | |
| std::vector< T > | m_data |
| std::unordered_map< EntityID, size_t > | m_entityToIndex |
| std::vector< EntityID > | m_indexToEntity |
Definition at line 19 of file ECS_Register.h.
|
inline |
Definition at line 29 of file ECS_Register.h.
|
inline |
Definition at line 67 of file ECS_Register.h.
References GetComponentTypeID_Static(), ComponentPool< T >::m_data, ComponentPool< T >::m_entityToIndex, and ComponentPool< T >::m_indexToEntity.
Referenced by World::AddComponent().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 79 of file ECS_Register.h.
References ComponentPool< T >::m_data, and ComponentPool< T >::m_entityToIndex.
Referenced by World::GetComponent().
Here is the caller graph for this function:Definition at line 88 of file ECS_Register.h.
References ComponentPool< T >::m_entityToIndex.
Referenced by World::HasComponent().
Here is the caller graph for this function:
|
inlineoverridevirtual |
Implements IComponentPool.
Definition at line 37 of file ECS_Register.h.
References GetComponentTypeID_Static(), ComponentPool< T >::m_data, ComponentPool< T >::m_entityToIndex, and ComponentPool< T >::m_indexToEntity.
Here is the call graph for this function:| std::vector<T> ComponentPool< T >::m_data |
Definition at line 23 of file ECS_Register.h.
Referenced by ComponentPool< T >::AddComponent(), ComponentPool< T >::GetComponent(), and ComponentPool< T >::RemoveComponent().
Definition at line 25 of file ECS_Register.h.
Referenced by ComponentPool< T >::AddComponent(), ComponentPool< T >::GetComponent(), ComponentPool< T >::HasComponent(), and ComponentPool< T >::RemoveComponent().
| std::vector<EntityID> ComponentPool< T >::m_indexToEntity |
Definition at line 27 of file ECS_Register.h.
Referenced by ComponentPool< T >::AddComponent(), and ComponentPool< T >::RemoveComponent().