1 #ifndef RADIX_COMPONENT_HPP
2 #define RADIX_COMPONENT_HPP
7 #include <serine/Serializable.hpp>
16 template<
typename T>
struct _ComponentTypeId {
static ComponentTypeId id; };
42 static_assert(std::is_base_of<Component, T>::value,
"T must be a Component");
43 return _ComponentTypeId<typename std::remove_cv<T>::type>::id;
49 virtual const char*
getName()
const = 0;
std::size_t ComponentTypeId
Definition: Component.hpp:11
Definition: GameController.hpp:7
Component(const Component &)=delete
ECS entity, Component container It is created like this:
Definition: Entity.hpp:23
Component(Entity &ent) noexcept
Definition: Component.hpp:46
ComponentTypeId getNewComponentTypeId()
Definition: Component.hpp:55
Base class to create entity components.
Definition: Component.hpp:25
Entity & entity
Definition: Component.hpp:32
static TypeId getTypeId()
Gets a component's type ID.
Definition: Component.hpp:41
virtual ~Component()
Definition: Component.hpp:52
static constexpr TypeId MaxId
Definition: Component.hpp:36
ComponentTypeId TypeId
Definition: Component.hpp:35
Component & operator=(const Component &)=delete
virtual const char * getName() const =0