Easys
A minimalist, header-only C++ ECS library for efficient and fuss-free entity and component management.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Easys::Registry< AllComponentTypes > Class Template Reference

#include <registry.hpp>

Public Member Functions

template<typename ComponentType >
void addComponent (const Entity entity, const ComponentType &component)
 
template<typename ComponentType >
void removeComponent (const Entity entity)
 
void removeComponents (const Entity entity)
 
template<typename... ComponentTypes>
void removeComponents (const Entity entity)
 
template<typename ComponentType >
ComponentType & getComponent (const Entity entity)
 
template<typename ComponentType >
const ComponentType & getComponent (const Entity entity) const
 
template<typename ComponentType >
bool hasComponent (const Entity entity) const
 
template<typename ComponentType >
const std::vector< Entity > & getEntitiesByComponent () const
 
template<typename... ComponentTypes>
std::vector< EntitygetEntitiesByComponents () const
 
size_t size () const
 
template<typename... ComponentTypes>
size_t size () const
 
void clear ()
 
template<typename... ComponentTypes>
void clear ()
 

Member Function Documentation

◆ addComponent()

template<typename... AllComponentTypes>
template<typename ComponentType >
void Easys::Registry< AllComponentTypes >::addComponent ( const Entity  entity,
const ComponentType &  component 
)
inline

◆ clear() [1/2]

template<typename... AllComponentTypes>
void Easys::Registry< AllComponentTypes >::clear ( )
inline

◆ clear() [2/2]

template<typename... AllComponentTypes>
template<typename... ComponentTypes>
void Easys::Registry< AllComponentTypes >::clear ( )
inline

◆ getComponent() [1/2]

template<typename... AllComponentTypes>
template<typename ComponentType >
ComponentType & Easys::Registry< AllComponentTypes >::getComponent ( const Entity  entity)
inline

◆ getComponent() [2/2]

template<typename... AllComponentTypes>
template<typename ComponentType >
const ComponentType & Easys::Registry< AllComponentTypes >::getComponent ( const Entity  entity) const
inline

◆ getEntitiesByComponent()

template<typename... AllComponentTypes>
template<typename ComponentType >
const std::vector< Entity > & Easys::Registry< AllComponentTypes >::getEntitiesByComponent ( ) const
inline

◆ getEntitiesByComponents()

template<typename... AllComponentTypes>
template<typename... ComponentTypes>
std::vector< Entity > Easys::Registry< AllComponentTypes >::getEntitiesByComponents ( ) const
inline

◆ hasComponent()

template<typename... AllComponentTypes>
template<typename ComponentType >
bool Easys::Registry< AllComponentTypes >::hasComponent ( const Entity  entity) const
inline

◆ removeComponent()

template<typename... AllComponentTypes>
template<typename ComponentType >
void Easys::Registry< AllComponentTypes >::removeComponent ( const Entity  entity)
inline

◆ removeComponents() [1/2]

template<typename... AllComponentTypes>
void Easys::Registry< AllComponentTypes >::removeComponents ( const Entity  entity)
inline

◆ removeComponents() [2/2]

template<typename... AllComponentTypes>
template<typename... ComponentTypes>
void Easys::Registry< AllComponentTypes >::removeComponents ( const Entity  entity)
inline

◆ size() [1/2]

template<typename... AllComponentTypes>
size_t Easys::Registry< AllComponentTypes >::size ( ) const
inline

◆ size() [2/2]

template<typename... AllComponentTypes>
template<typename... ComponentTypes>
size_t Easys::Registry< AllComponentTypes >::size ( ) const
inline

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