|
CeresEngine 0.2.0
A game development framework
|
Components serve as the base for data storage for an entity. More...
#include <CeresEngine/Entity/Component.hpp>
Classes | |
| struct | Accessor |
| An accessor class that implements high-level access to an entity that has the given component. More... | |
Public Member Functions | |
| const ComponentType & | getComponentType () const noexcept final |
| Gets the component type. | |
Public Member Functions inherited from CeresEngine::AbstractComponent | |
| virtual CE_DISABLE_WARNING_MISSING_OVERRIDE ::CeresEngine::ClassInfo | getClassInfo () noexcept |
| virtual ::CeresEngine::ClassInfo | getClassInfo () const noexcept |
| virtual | ~AbstractComponent ()=default |
| Defaulted virtual destructor. | |
Static Public Attributes | |
| static const ComponentID | componentID = getComponentID() |
| This component type ID. | |
| static const ComponentMask | mask |
| The component mask. | |
| static const ComponentType & | componentType = ComponentType::get<C>() |
| Gets the component type. | |
Static Private Member Functions | |
| static ComponentID | getComponentID () noexcept |
Components serve as the base for data storage for an entity.
All data for an entity must be stored in a component. The storage, lifetime and allocation of the component is managed by the EntityManager.
All components should implement serialization via RTTI to allow them to be transferred over the network or persisted into a file for save/load support.
Components are also encouraged to implement an Accessor type that acts as a high-level interface to access data in an entity, as direct access to the component data is discouraged.
| T | the component implementation type |
|
staticprivatenoexcept |
|
inlinefinalvirtualnoexcept |
Gets the component type.
This object can be used to compare if two components are of the same type.
Implements CeresEngine::AbstractComponent.
|
inlinestatic |
This component type ID.
|
static |
Gets the component type.
This object can be used to compare if two components are of the same type.
|
inlinestatic |
The component mask.
Can be used with the or operator to join multiple component masks.