R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ecs::IComponent Class Referenceabstract

Base interface for all ECS components. More...

#include <IComponent.hpp>

Inheritance diagram for ecs::IComponent:
Inheritance graph
Collaboration diagram for ecs::IComponent:
Collaboration graph

Public Member Functions

virtual ~IComponent ()=default
 Virtual destructor.
 
virtual ComponentType getType () const =0
 Get the unique type identifier for this component.
 

Detailed Description

Base interface for all ECS components.

All components in the Entity-Component-System must inherit from this interface. Each component type is assigned a unique ID for identification and bitmask operations.

Note
Components should be data-only structures (POD when possible).
Logic should be implemented in Systems, not in Components.

Definition at line 31 of file IComponent.hpp.

Constructor & Destructor Documentation

◆ ~IComponent()

virtual ecs::IComponent::~IComponent ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ getType()

virtual ComponentType ecs::IComponent::getType ( ) const
pure virtual

Get the unique type identifier for this component.

Returns
ComponentType The unique ID of this component type.

Implemented in ecs::Animation, ecs::AnimationSet, ecs::Buff, ecs::Collectible, ecs::Collider, ecs::Enemy, ecs::Health, ecs::LuaScript, ecs::MapData, ecs::OrbitalModule, ecs::PendingDestroy, ecs::Player, ecs::Projectile, ecs::Spawner, ecs::Sprite, ecs::Transform, ecs::Velocity, ecs::Wall, and ecs::Weapon.


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