From 3e99a6fe36e63a1e14ba62f2a6e5a3827484e4e6 Mon Sep 17 00:00:00 2001 From: Max-001 <80035972+Max-001@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:21:01 +0200 Subject: DeleteAllComponents created --- mwe/ecs-homemade/inc/ComponentManager.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mwe/ecs-homemade/inc/ComponentManager.h') diff --git a/mwe/ecs-homemade/inc/ComponentManager.h b/mwe/ecs-homemade/inc/ComponentManager.h index 763c28e..893aa56 100644 --- a/mwe/ecs-homemade/inc/ComponentManager.h +++ b/mwe/ecs-homemade/inc/ComponentManager.h @@ -18,12 +18,16 @@ public: ComponentManager& operator=(ComponentManager&&) = delete; //Singleton template - void AddComponent(std::uint32_t id, Args&&... args); //Add a component - //TODO: void DeleteAllComponentsOfId(std::uint32_t id); //Deletes all components of a specific id - //TODO: void DeleteAllComponents(); //Deletes all components + void AddComponent(std::uint32_t id, Args&&... args); //Add a component of a specific type + template + void DeleteComponentsById(std::uint32_t id); //Deletes all components of a specific type and id + template + void DeleteComponents(); //Deletes all components of a specific type + void DeleteAllComponentsOfId(std::uint32_t id); //Deletes all components of a specific id + void DeleteAllComponents(); //Deletes all components template - std::vector> GetComponentsByID(std::uint32_t id) const; //Get a vector<> of all components at specific id + std::vector> GetComponentsByID(std::uint32_t id) const; //Get a vector<> of all components at specific type and id template std::vector, std::uint32_t>> GetComponentsByType() const; //Get a vector<> of all components of a specific type -- cgit v1.2.3