Untitled Game engine no.5  1.0
Public Member Functions | List of all members
Engine::ComponentDataArray< T > Class Template Reference

An array of components of type T. More...

#include <ComponentArray.hpp>

Inheritance diagram for Engine::ComponentDataArray< T >:
Inheritance graph
[legend]
Collaboration diagram for Engine::ComponentDataArray< T >:
Collaboration graph
[legend]

Public Member Functions

 ComponentDataArray ()
 Constructor.
 
Ref< T > Insert (EntityID id, Ref< T > c)
 
Ref< T > Insert (EntityID id, T c)
 
void Remove (EntityID id)
 
Ref< T > GetComp (EntityID id)
 
void EntityDestroyed (EntityID id)
 

Detailed Description

template<typename T>
class Engine::ComponentDataArray< T >

An array of components of type T.

Member Function Documentation

◆ EntityDestroyed()

template<typename T >
void Engine::ComponentDataArray< T >::EntityDestroyed ( EntityID  id)
inlinevirtual

Get rid of stuff when the entity is destroyed

Parameters
idthe entity that was destroyed

Implements Engine::IComponentDataArray.

◆ GetComp()

template<typename T >
Ref<T> Engine::ComponentDataArray< T >::GetComp ( EntityID  id)
inline

Gives you a reference to a component on an entity

Parameters
idthe entity we want this component from
Returns
the component

◆ Insert() [1/2]

template<typename T >
Ref<T> Engine::ComponentDataArray< T >::Insert ( EntityID  id,
Ref< T >  c 
)
inline

Add a component to an entity

Parameters
idthe entity we want to attatch to
cthe component we want to attatch

◆ Insert() [2/2]

template<typename T >
Ref<T> Engine::ComponentDataArray< T >::Insert ( EntityID  id,
c 
)
inline

Add a component to an entity

Parameters
idthe entity we want to attatch to
cthe component we want to attatch

◆ Remove()

template<typename T >
void Engine::ComponentDataArray< T >::Remove ( EntityID  id)
inline

Removes a component from an entity

Parameters
idthe entity we want to remove a component from

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