Minor - Start the Doxygen doc - V12.8.0
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
#include <typeindex>
|
||||
#include <typeinfo>
|
||||
|
||||
/**
|
||||
* namespace for the Entity-Component-System (ECS)
|
||||
*/
|
||||
namespace ecs {
|
||||
|
||||
// Classe de base pour tous les composants
|
||||
@@ -19,21 +22,34 @@ public:
|
||||
Component(Component&&) = default;
|
||||
Component& operator=(Component&&) = default;
|
||||
|
||||
// Fonction virtuelle pour initialiser le composant
|
||||
/**
|
||||
* Virtual function to initialize the component.
|
||||
*/
|
||||
virtual void Initialize() {}
|
||||
|
||||
// Fonction virtuelle pour la mise <20> jour du composant
|
||||
|
||||
/**
|
||||
* Virtual function to update the component.
|
||||
* @param deltaTime Time since the last update.
|
||||
*/
|
||||
virtual void Update(float deltaTime) {}
|
||||
|
||||
// virtual std::string Serialize() {}
|
||||
// virtual void Deserialize(const std::string& data) {}
|
||||
};
|
||||
|
||||
// Alias utiles
|
||||
/**
|
||||
* Type alias for a shared pointer to a Component.
|
||||
*/
|
||||
using ComponentPtr = std::shared_ptr<Component>;
|
||||
|
||||
/**
|
||||
* Type alias for a unique identifier for a component type.
|
||||
*/
|
||||
using ComponentTypeID = std::type_index;
|
||||
|
||||
// Fonction pour obtenir l'ID de type d'un composant
|
||||
/**
|
||||
* Function to get the unique type ID for a component type.
|
||||
*/
|
||||
template<typename T>
|
||||
ComponentTypeID GetComponentTypeID() {
|
||||
static_assert(std::is_base_of<Component, T>::value, "T must derive from Component");
|
||||
|
||||
Reference in New Issue
Block a user